VLC Chromecast casting via command line?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
NiN^_^NiN
Blank Cone
Blank Cone
Posts: 24
Joined: 26 Apr 2008 12:05

VLC Chromecast casting via command line?

Postby NiN^_^NiN » 10 Mar 2018 19:38

I tried to cast a video with VLC through command line and I don't seem to be able to do it.

I can cast via gui without issues but this won't work with the below code

vlc "D:\test.avi" --sout-chromecast-ip=192.168.1.1

I've also tried various combo's like

vlc "D:\test.avi" --sout-chromecast-ip="192.168.1.1"
vlc "D:\test.avi" --sout-chromecast-ip="192.168.1.1" --sout-chromecast-video
vlc "D:\test.avi" --sout-chromecast-ip=192.168.1.1 --sout-chromecast-video

I have confirmed that the IP address is correct for the chromecast as wel

Any ideas?

Also found out that I can't cast if i turn HTTP on for web interfaces

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC Chromecast casting via command line?

Postby Jean-Baptiste Kempf » 06 Jun 2018 13:27

--sout "#chromecast" --sout-chromecast-ip=192.168.1.1
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

o0lll0o
New Cone
New Cone
Posts: 2
Joined: 21 Jun 2018 00:08

Re: VLC Chromecast casting via command line?

Postby o0lll0o » 21 Jun 2018 00:14

--sout "#chromecast" --sout-chromecast-ip=192.168.1.1
While casting using the GUI works perfectly fine, I can't get the command line to work properly.
It launches, but quickly stops because the playback is like fast forwarding.

I'm looking forward to use this in my personal scripts, and hoping for a fix :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC Chromecast casting via command line?

Postby Jean-Baptiste Kempf » 22 Jun 2018 00:02

You need the demux_filter too.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

o0lll0o
New Cone
New Cone
Posts: 2
Joined: 21 Jun 2018 00:08

Re: VLC Chromecast casting via command line?

Postby o0lll0o » 22 Jun 2018 14:18

Thank you for the fast reply.

Gotcha! I will try that :)

NiN^_^NiN
Blank Cone
Blank Cone
Posts: 24
Joined: 26 Apr 2008 12:05

Re: VLC Chromecast casting via command line?

Postby NiN^_^NiN » 19 Jul 2018 04:03

Totally didn't see these replies so I thought i'd post the full command as I have seen some people having issues.

Code: Select all

vlc "c:\video\test.mp4" --sout "#chromecast" --sout-chromecast-ip=192.168.0.103 --demux-filter=demux_chromecast

jbeadle
New Cone
New Cone
Posts: 2
Joined: 28 Mar 2019 15:34

Re: VLC Chromecast casting via command line?

Postby jbeadle » 29 Mar 2019 19:22

I can't seem to auto stream it to a group, but I can to one google audio. Any suggestions on how to get it to send to a group? I can do it in the GUI, but not sure on cmd.

jsdray
New Cone
New Cone
Posts: 1
Joined: 30 Mar 2019 20:41

Re: VLC Chromecast casting via command line?

Postby jsdray » 30 Mar 2019 20:49

I would also like to know if group casting from command line is possible. Pulling out my hair trying to find some way of doing it! :D Hope somebody will post soon.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: VLC Chromecast casting via command line?

Postby unidan » 01 Apr 2019 11:29

Hi, I don't think group casting is currently supported for the control part.

jasper314
New Cone
New Cone
Posts: 2
Joined: 26 Oct 2019 00:16

Re: VLC Chromecast casting via command line?

Postby jasper314 » 26 Oct 2019 00:24

I managed to cast to an audio group. For me, the group had the same ip as one of the chromecasts in the group, but with different port, which I could set with --sout-chromecast-port=42276
I found the port using pychromecast in python:
> import pychromecast
> chromecasts = pychromecast.get_chromecasts()
> chromecasts
[Chromecast('192.168.0.200', port=8009, device=DeviceStatus(friendly_name='Family Room TV', model_name='Chromecast', manufacturer='Unknown manufacturer', uuid=UUID('9e4a41b9-2e18-9b6b-899d-2244eaad2f39'), cast_type='cast')),
Chromecast('192.168.0.242', port=8009, device=DeviceStatus(friendly_name='Dining Room speaker', model_name='Chromecast Audio', manufacturer='Unknown manufacturer', uuid=UUID('553b3b0f-8094-6941-1bba-2b9898a91268'), cast_type='audio')),
Chromecast('192.168.0.242', port=42276, device=DeviceStatus(friendly_name='Living + Dining', model_name='Google Cast Group', manufacturer='Unknown manufacturer', uuid=UUID('c244a41e-8112-471e-acf8-434d3da0c13e'), cast_type='group')),
Chromecast('192.168.0.87', port=8009, device=DeviceStatus(friendly_name='School room TV', model_name='Chromecast', manufacturer='Unknown manufacturer', uuid=UUID('25be69ff-09c6-a94b-6cba-fa4fe65ffbb2'), cast_type='cast'))]

Not sure how to find the port without python, if anyone knows?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests