7

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.

2 Answers 2

6

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.

2
  • Thank you very much Lucas! I have been trying to get a fully working streaming of some nasty hevc in an mkv, and this works!
    – reim
    Jan 6, 2022 at 22:05
  • AMAZING!!... I have been struggling with this for over a year, every so often I would try and get it working, read 10-20 results from google, but never be able to figure out the exact combo of params I needed --- tried yours, worked perfect first time! 👍🏼
    – Martin
    Feb 8 at 6:25
2

you can use ffmpeg to turn the video to h264.

ffmpeg -i input.mp4 -c:v libx264 -preset slower -crf 28 -c:a copy -maxrate 320 -minrate 20 output.mp4 You can change maxrate minrate preset and the crf to get the quality nice.

for 720p I'd suggest a maxrate of 1500-2500 depending on if the video has a lot of movement.

for crf lower is better quality at the expense of more computational power needed to be done in a reasonable time.

1
  • Thanks. This Line looks like it wants to fully convert the file first. I'm trying to have VLC transcode it "in real-time" while playing the file using the chromecast. I don't want to create a fully / separate x264 converted file. How would I integrate this line to my VLC line to do that if it's possible?
    – Rick T
    Aug 5, 2019 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .