In today’s short article, I’ll explain how to use Castnow on a Manjaro KDE installation to mirror MP4s and other video formats (ex: MKV with FFmpeg) to a Chromecast device such as the new Ooredoo TV.
- Chromecast capable device on the same network as your computer. Ooredoo Qatar’s latest Ooredoo TV is an example of this.
- A Linux installation. (I will be using Manjaro KDE for this tutorial, an arch-based system with KDE).
- A capable router / Internal connection. A gigabit link between your computer and the chromecast device is ideal. (Internet speed doesn’t matter).
- A capable computer for MKVs and things that require FFmpeg, you’ll be transcoding on the fly.
- Installed Castnow/FFmpeg. (Castnow is opensource & on GitHub).
Open up Pamac or Octopi (or use pacman with an AUR helper like trizen) to install castnow from the AUR (Arch User Repository). Do the same for the FFmpeg package. This is most likely already installed.
Open a terminal window where your media file is located.[ifpaid 1 USD]
If it is an MP4, use the following command:
castnow ./name-of-video.mp4 --subtitles ./subs.srt --subtitle-scale 1.5
If it is an MKV file or some other video format, use the following command:
castnow ./name-of-video.mkv --tomp4 --subtitles ./subs.srt --ffmpeg-maxrate 7000k --ffmpeg-bufsize 4500k --subtitle-scale 1.5
You can adjust the maxrate and bufsize as you see fit, depending on your compute and networking power. Castnow should now stream your video off to your chromecast automatically!
Control & Options:
Here are the options you can use in the commands above:
--tomp4Transcode a video file to mp4 during playback. This option requires ffmpeg to be installed on your computer. The play / pause controls are currently not supported in transcode mode.
--device "my chromecast"If you have more than one Chromecast on your network, use the
--deviceoption to specify the device on which you want to start casting. Otherwise, castnow will just use the first device it finds in the network.
--address 192.168.1.4The IP address or hostname of your chromecast. This will skip the MDNS scan.
--subtitles <path/URL>This can be a path or URL to a vtt or srt file that contains subtitles.
--subtitle-scale 1.5Scaling factor for the size of the subtitle font. Default is 1.0.
--subtitle-color #FFFFFFFFForeground RGBA color of the subtitle font.
--myip 192.168.1.8Your main IP address (useful if you have multiple network adapters)
--quietHide the player timeline.
--peerflix-<option> <argument>Pass options to peerflix.
--ffmpeg-<option> <argument>Pass options to ffmpeg.
--type <type>Explicitly set the mime-type of the first item in the playlist (e.g. ‘video/mp4’).
--seek <hh:mm:ss>Seek to the specified time on start using the format hh:mm:ss or mm:ss.
--bypass-srt-encodingDisable automatic UTF-8 encoding of SRT subtitles.
--loopPlay the list of files over and over in a loop, forever.
--shufflePlay the list of files in random order.
--recursiveList all files in directories recursively.
--volume-stepStep at which the volume changes. Helpful for speakers that are softer or louder than normal. Value ranges from 0 to 1. Default is 0.05.
--command <key1>,<key2>,...Execute key command(s) (where each
<key>is one of the keys listed under player controls, below).
--exitExit when playback begins or
--helpDisplay help message.
And these are the controls you can use while casting on the Terminal window:
space // toggle between play and pause m // toggle mute t // toggle subtitles up // volume up down // volume down left // seek backward (keep pressed / multiple press for faster seek) right // seek forward (keep pressed / multiple press for faster seek) n // next item in the playlist (only supported in launch-mode) s // stop playback q // quit
That’s it! Hope you found this somewhat useful.
Is there any way to cast to ooredoo tv from Windows
Yup – the default casting behavior should work on the Ooredoo TV (the new one with chromecast).