Trans-coding hevc / x265 video file using VLC and viewing it on a chromecast

chromecastcvlcvideovideo-encodingvlc

I've been successful at getting VLC to stream a x264 encoded file from a network file share to an old chromecast (which mine doesn't support hevc / x265 directly) using the commands below.

vlc -vv --sout "#chromecast" --sout-chromecast-ip=192.168.1.111 --sout-chromecast-conversion-quality=0 --demux-filter=demux_chromecast "/home/vid/nfst/video1_x264.mp4"

I'm trying to do the same thing with an HEVC / x265 file but it looks like it needs to be trans-coded "in real-time" before it gets to the chromecast. Does anybody know how I can go about doing this with VLC using command line syntax?

Note: I don't want to create another separate x264 file. I wan't to trans-code the x265 file "in-real-time" to a x264 format and have it somehow streamed / played on the chromecast using VLC.

PS: I have tried casting using the VLC GUI but my OLD chromecast doesn't support HEVC / x265 files. The audio in the file does play but the hevc / x265 video shows up as just a black screen on the chromecast.

PPS: I'm using VLC media player 3.0.7.1 Vetinari (revision 3.0.7.1-0-gf3940db4af) running Ubuntu 18.04 64bit.

Best Answer

I don't know if you still need it, but I was just dealing with this and maybe it will help someone else.

As my sout string I use: #transcode{venc=x264{preset=ultrafast},vcodec=h264,threads=1}:chromecast{ip=192.168.1.100,conversion-quality=0} Notice the colon between transcode and chromecast. I barely know anything about VLC or video transcoding, but this looks somewhat like piping the transcoder output to the chromecast thing.

Some observations

  • Apparently the venc=x264{preset=ultrafast}uses my GPU to aid the CPU in transcoding.

  • threads=1 is there so the cpu isn't at 100% usage. Increasing this could help if you have stuttering issues.

  • With an Intel i5 4590 and a RX580, on Windows 10, I'm real-time transcoding and casting a 1080p HEVC H.265 (40 minute, 1.04 GB file) with average 40% and 15% CPU and GPU usage respectively.

  • Beware that pausing or jumping time can be really glitchy.

Related Question