mkchromecast icon indicating copy to clipboard operation
mkchromecast copied to clipboard

Transcoding Video Files

Open JP-Ellis opened this issue 5 years ago • 0 comments

Is it possible for mkchromecast to do on-the-fly transcoding of video files?

In my particular case, I have files with the video encoded in HEVC, but my 1st generation Chromecast only support H.264 or VP8 video codecs. I was hoping that

mkchromecast --video -vcodec libx264 -i /path/to/file.mkv

would work, but it appears to ignore the vcodec option as it defaults to copy for both channels.

Would such a feature be desirable?


As a workaround for the time being, the following works:

$ cast-any() {
    mkchromecast --video --command "ffmpeg \
        -re \
        -i '$1' \
        -c:v libx264 -preset ultrafast -tune zerolatency \
        -c:a aac \
        -f mp4 -movflags frag_keyframe+empty_moov \
        pipe:1"
}

$ cast-any /path/to/file

JP-Ellis avatar Mar 26 '20 05:03 JP-Ellis