Chromecast MKV with internal SSA subtitles to Chromecast

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
rsd
New Cone
New Cone
Posts: 2
Joined: 29 Jul 2023 00:59

Chromecast MKV with internal SSA subtitles to Chromecast

Postby rsd » 26 Dec 2024 21:18

This outlines a technique for streaming MKV videos with internal SSA subtitles to first-generation Chromecast devices. Due to the limited codec support of these devices, the process involves real-time transcoding to MP2V, with subtitles burned into the MPEG Transport Stream (TS). This is achieved using two VLC media player instances. The first instance transcodes the source video to an HTTP TS stream (http://localhost:8080/play). After a brief initialization period (approximately 30 seconds), a second VLC instance streams this HTTP output directly to the Chromecast.

change to whatever your chromecast device ip is.
--sout-chromecast-ip=192.168.1.101

windows batch cmd

play.bat

Code: Select all

@echo off setlocal :get_url echo Please paste the remote URL of the MKV file and press Enter: set /p "remote_url=" if "%remote_url%"=="" ( echo URL cannot be empty. Please try again. goto get_url ) :transcoder echo Starting transcoder... set "vlc_path=%PROGRAMFILES%\VideoLAN\VLC\vlc.exe" start "" "%vlc_path%" "%remote_url%" :sout=#transcode{vcodec=mp2v,vb=10800,scale=Auto,soverlay}:http{mux=ts,dst=:8080/play} :no-sout-all :sout-keep echo. echo Waiting 30 seconds for transcoder to start... timeout /t 30 /nobreak > nul :streaming echo Starting streaming... set "vlc_path=%PROGRAMFILES%\VideoLAN\VLC\vlc.exe" start "" "%vlc_path%" "http://localhost:8080/play" --sout "#chromecast" --sout-chromecast-ip=192.168.1.101 echo. echo Transcoder and streaming have been started using URL: %remote_url% pause endlocal

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests