20

I just downloaded VLC 3.0 Beta (using ubuntu ppa) and I wanted to know how to set it up to stream to chromecast. It's in the repo's NEWS that the feature has been added. Numerous news outlets are covering it. But, there is no example of how to actually use it yet.

I know it's not in the GUI (having searched the source code). And, I have no idea how to use the code from the command line.

Here is the Ubuntu PPA that I used to install it. However, it shouldn't matter. Nor, should the OS or system matter. It's just software. You can build it yourself or download a binary ("nightly") here.

1
  • I would recommend mkchromecast Worked like a charm with me from Ubuntu. VLC didn't work for me.
    – Jayesh
    Mar 29, 2018 at 15:34

7 Answers 7

27

Building VLC

If you have to build vlc yourself, make sure you have

  • --enable-sout
  • --enable-chromecast

Using VLC

Thus far this feature is not available under the GUI, however you can stream to Chromecast like this,

$ vlc --sout="#chromecast{ip=ip_address}" ./video.mp4

You can watch the video at the same time with

$ vlc --sout="#duplicate{dst=display,#chromecast{ip=ip_address}}" ./video.mp4

To make matters even better, you can actually add a delay on the video so it better syncs with the audio (sets the delay to 3100ms).

$ vlc --sout="#duplicate{dst=display{delay=3100},#chromecast{ip=ip_address}}" ./video.mp4

You can find the list of options support to chromecast here, they currently include

  • ip
  • port
  • http-port
  • mux
  • mime
  • video
3
  • That's great. It works for me perfectly (Chromecast 2)! (first command). Installed nightly VLC 3.0 (the Renderer couldn't detect the device but command line version is working like a charm)
    – bakytn
    Oct 7, 2016 at 14:56
  • I have a stream open, and I am trying to restream it through chromecast. However, I am getting the error: error: Failed to start player: "/usr/bin/vlc --sout='#chromecast{ip=192.168.1.80}' ./video.mp4" ([Errno 2] No such file or directory)
    – Bobby S
    Mar 12, 2017 at 0:24
  • Almost worked but VLC progress bar goes through the 1h30m of video in a few seconds and then stops streaming
    – golimar
    Nov 17, 2021 at 20:34
8

I was unhappy w/ VLC's casting support, so I wrote a dedicated linux GUI for casting a video file. Might be of use to you, assuming your underlying goal is casting a file, not specifically with VLC.

https://github.com/keredson/gnomecast

enter image description here

1
  • 1
    ^^^ Wonderful app ^^^ No need to futz about with VLC building from source. ^^^ does require Python 3 run-time to be installed -- Runs great on Mint 18.2
    – RyanNerd
    Mar 23, 2018 at 22:55
4

There's a post on how to use it via GUI now: http://www.howtogeek.com/269272/how-to-stream-from-vlc-to-your-chromecast/

Basically:

Video > Renderer > Scan
Video > Renderer > "Chromecast"
Play media with VLC! 
4
  • 11
    This currently only works for Windows
    – kurdtpage
    Mar 4, 2017 at 8:48
  • 3
    @kurdtpage just tested, works on KDE Linux VLC 3.0.8 Mar 27, 2020 at 21:25
  • Also works here on VLC 3.0.10, but in Playback > Renderer > [my TV name]
    – golimar
    Nov 17, 2021 at 20:41
  • It sometimes does not work on Windows either. When your Win desktop has more than network interface, VLC can not find chromecast using mDNS
    – ibre5041
    May 20 at 16:58
2

This now seems to be available via the GUI using VLC v3 on linux:

  1. Play video
  2. Playback > Renderer > your_chromecast_device_name

That's working for me with a .mkv video.

1

If VLC doesn`t stream to your chromecast device is because the firewall blocks the ports. Turn the firewall off and enjoy!

1
  • 1
    Why would someone who's gone to the effort of setting up a firewall want to turn it off? Surely it would be better to relax one or more of the restrictions?
    – roaima
    May 24, 2020 at 23:19
1

If you have Chrome/ium, you can cast any window to Chromecast. This is how you do it:

  1. From any page on your browser (i.e., its startpage), right click an choose "Cast"
  2. From the pop-up window, choose to cast your desktop (instead of just one tab)
  3. On the next screen, choose to cast from a particular window (instead of the whole desktop)
  4. Then, choose VLC or whatever else you'd like to cast

P.S.: Audio won't be cast using this method.
P.P.S.: Chromium may have trouble finding your Chromecast; to solve it, you must enable its chrome://flags/#load-media-router-component-extension flag.

Sources:

0

Bit late to the party, but a solution I found could be helpful.

I encountered an issue where streaming through chromecast was resulting in the demux locally running faster than on the cast, this was fixed by adding --demux-filter=demux_chromecast to the command:

cvlc --sout="#chromecast{ip=<ip_address>}" --demux-filter=demux_chromecast <source>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.