VLC audio to Bluetooh, video to Chromecast?

Solution 1:

Quick and Dirty (Idea)

You state that

  • Client 1: with vlc (or other) you are able to send the signal to your television via Chromecast
  • Client 2: with vlc you are able to use the Bluetooth speakers

the problem is that they will hardly be in sync.

So the quicker solution is to use (as made to have in sync different subtitles/languages)

  • Server 1: another instance of vlc as local streamer.
    You can first connect two clients (eventually other two instance of vlc) to this server (to its streaming IP and PORT) and after you can start to play or pausing the streaming.

This is the solution followed from the OP, after solving some problems peculiar to his OS, software, hardware...


Path for a less resource requiring solution (Ideas)

Only the ideas trying to be useful to a wider audience and cover different hardware sets.

Any streamer program will have many options. Vlc has two lists of options.
You can ask the huge one with -H (-h is not enough, size matters when it is case sensitive :-)).

There are many interesting options in this case, among them for the server --no-sout-display (default enabled), --sout-display default disabled, --sout-video... --no-sout-video for video, --sout-audio --no-sout-audio (default enabled)...

It is a good practice to specify always the important options, to avoid eventual unwilled interferences from the options saved by a previous execution of the program. You understand how it can be "vicious": one time happens, one time no... >>> BTW vlc was (and still is) used to remember the last preferences modified in the last GUI execution and saved on exit. <<<
If you specify an option you will force the execution with that option.

Here some paths to try to save resources:

  • Again assuming you were able to use the speakers with vlc, maybe you may be able to save the Client 2 instance disabling in the streamer (Server 1) the audio redirection to the stream and using the speakers from there (start trying with --no-sout-audio).

  • I had not fully understood the part that brings the signal to your TV, but I have the impression you can try to save the Client 1 instance too. It is hardware dependent.

    • In some box TV, as the ones with Kodi, it's possible to add an app to connect directly the box to a streaming, simply knowing the IP (and port) of the stream. You know them because you give from command-line/GUI. Some of those app are able to scan the local network or a range of local IPs (see below). Even automatically.
    • Your TV can be dlna compliant in many ways (so you can set the vlc streamer to be compliant with the specific TV capabilities).
    • Chromecast hardware devices, I suppose you need only the streamer (Server 1) on a correct IP/port and codex.
    • Chromecast via Chrome (well the streamer (Server 1) and Chrome acting as Client 1 and streamer for the TV, probably un-needed).

Note on the IP (IPv4) reserved for multicast:

The IP address reserved by IANA for multicast locally are in this range

239.0.0.0-239.255.255.255 Organization-Local Scope [David_Meyer][RFC2365] 1997-01-01

Solution 2:

This is not my idea but Hastur's answer. However, I have fallen into a few traps so I thought I will share my problems and the solutions I was able to find. Others might have better ideas but this works.

VLC seems to save settings to vlc-qt-interface.ini in AppData\Roaming\vlc. If you switch the renderer, it will switch both instances. Thus, you need two Windows users, I added a chromecast user.

  1. "C:\Program Files\VideoLAN\VLC\vlc.exe" movie.mkv --sout-all --sout="#rtp{dst=239.255.100.100,port=5004,mux=ts}". The IP address is not your wifi or some such, it's a multicast address. It needs to be in the range 224.0.0.0 through 239.255.255.255 or you won't be able to connect more than client to it. It seems you are free to choose whichever address you chose.
  2. "C:\Program Files\VideoLAN\VLC\vlc.exe" rtp://239.255.100.100:5004 --no-video. This will play the audio locally.
  3. runas /user:chromecast "C:\Program Files\VideoLAN\VLC\vlc.exe rtp://239.255.100.100:5004 --sout "#chromecast" --sout-chromecast-ip=192.168.1.152 --demux-filter=demux_chromecast". I believe all of these are required, even if you have only one Chromecast. I have no idea how to get the IP from Chromecast or Chrome for that matter -- I have found it from my router. Adding --no-audio has no effect as it seems the entire audio-video is handed wholesale to Chromecast. Mute your TV.

To create a .bat out of it, this answer has the solution: prefix each command with start /b.

One known issue is after a pause the Chromecasting VLC always warns "this video requires conversion". This is a major drawback.