Created
July 19, 2019 17:22
-
-
Save gatlin/daaf7da76dbdd8aa884b291861dd652a to your computer and use it in GitHub Desktop.
Use VLC without a UI to cast videos to chromecast
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MEDIA_FILE="$1" | |
if [ -z "$1" ]; then | |
echo "Please specify a media file as the first argument." | |
exit 1 | |
fi | |
CHROMECAST_IP4_ADDRESS="$2" | |
if [ -z "$CHROMECAST_IP4_ADDRESS" ]; then | |
if [ -e "$HOME/.castrc" ]; then | |
. $HOME/.castrc | |
else | |
echo "Please give a chromecast IP4 address as the second argument." | |
exit 1 | |
fi | |
fi | |
/usr/bin/env vlc "$MEDIA_FILE" \ | |
-I dummy \ | |
--sout "#chromecast" \ | |
--sout-chromecast-ip="$CHROMECAST_IP4_ADDRESS" \ | |
--demux-filter=demux_chromecast |
I want to stream a video and an audio file to the chromecast. The way I do it is:
cvlc "http://video" --input-slave="http://audo" --sout "#chromecast" --sout-chromecast-ip=192.168.178.51 --demux-filter=demux_chromecast
In this command the --input-slave is not played by the chromecast. If I remove the --demux-filter, the video and audio are played, but they are played like lightspeed.
Is there any solution? Thank you
Hello! You had no way of knowing this but I had two children between October of 2022 and March of 2024. I haven't been able to get to this yet but I don't want to ignore you either. If you find a solution before I do please do share!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to stream a video and an audio file to the chromecast. The way I do it is:
cvlc "http://video" --input-slave="http://audo" --sout "#chromecast" --sout-chromecast-ip=192.168.178.51 --demux-filter=demux_chromecast
In this command the --input-slave is not played by the chromecast. If I remove the --demux-filter, the video and audio are played, but they are played like lightspeed.
Is there any solution? Thank you