-
-
Notifications
You must be signed in to change notification settings - Fork 17
Playing content with media player app
If you do not have Chromecast, the content can be played using external media player application (e.g. MPV, VLC).
The main idea is that you have a PC with media files and another HTPC connected to TV (but it can also be a laptop or smartphone). Then you can select video on your main computer and play it on the other device (without connecting any additional cables) and the main PC will handle optional video conversion, so the other one can play it smoothly.
For easy streaming to other Linux running device, check out Playercast. It turns media player into Chromecast-like receiver for playing cast files and allows controlling playback over local network from GNOME Shell remote widget.
Direct link to selected content is: http://server_ip:port/cast
Where server_ip is the IP address of computer you are running this extension on and port is the port number selected in extension settings (default: 4000).
For example link might be: http://192.168.1.101:4000/cast
Tip: You can quickly try it out on your local computer (server) using "localhost" instead of IP address.
It is recommended to assign your PC a static IP address or custom hostname, then you will not have to check if IP has been changed.
This method is not suited for playing in web browser. If you want to play video in browser use integrated web player. To do so provide the link without the word "cast" at the end.
Simply run mpv using command below (replace IP as needed):
mpv --no-ytdl http://192.168.1.101:4000/cast
Choose subtitles by selecting video and pressing "Add Subtitles" button. Select and cast with your subs.
Play video with external subtitles by using command below.
mpv --no-ytdl http://192.168.1.101:4000/cast --sub-file=http://192.168.1.101:4000/subs
The --no-ytdl is an important part. Because the link we provide is a direct link to the video stream, there is no need for youtube-dl to try and extract information from source site. Not only it reduces loading time greatly, but without adding it, playback may not start at all.