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
Why can't you pair the speakers with the computer and cast to them directly? Why is Chromecast important? – harrymc – 2019-04-03T07:31:29.860
Chromecast allows me to play video on my HDTV wirelessly. I guess I could connect the Chromecast to the speaker but then I'd need to switch inputs between HDMI and Bluetooth and that's quite inconvenient. This should be solvable via software... – chx – 2019-04-03T07:54:55.420
To force Chromecast to speak to Bluetooth, you would need to add hardware that the Chromecast will think is a TV but will in fact be the Bluetooth speakers. Is this hardware really necessary? Wouldn't it be better to work on an easy method for switching between HDMI and Bluetooth? – harrymc – 2019-04-03T09:47:36.480
I do not understand your problem. I can play a video on my laptop and then the audio goes to Bluetooth. A solution to the problem could be two VLC instances sync'd together but netsync seems to be abandoned long ago. I will try, though.
– chx – 2019-04-03T16:20:55.630This might be getting clearer for me. Is the problem that you want to cast the video to the TV but the audio to the Bluetooth speakers? (Please add the text
@harrymc
to your answer so I get notified.) – harrymc – 2019-04-03T18:20:43.830@harrymc YES! That is exactly what I am asking. – chx – 2019-04-03T18:34:12.043
That's possible. I'll be adding an answer. – harrymc – 2019-04-03T18:39:54.083
Give it a look even here. You can do a vlc streamer and use other vlc as client(s)... It was for subtitles but I think that in principle it can be adapted for your case too...
– Hastur – 2019-04-05T19:37:34.313@chx I mean a no thinking solution would be to use a "streamer" instance of vlc and 2 vlc clients listening from the streamer: one redirecting to Chromecast and the other one using the Bluetooth. The two clients are in sync (on the same local network so it should be negligible, or at least manageable, the eventual delay). Pausing the stremer you pause both. It has to be a simpler solution inside a single VLC instance. I remember long ago it was possible to direct video and audio in different directions as a flux. I assume with vlc you can use Chromecast or speakers with no problems. – Hastur – 2019-04-06T12:35:53.020
@chx I added in an answer some words more. It may be able to solve some issue still open (namely on the vlc reading old saved settings) and give you something else to try... – Hastur – 2019-04-09T19:04:43.447