Is there a way to output a H265 codec when recording through streamlink? I am trying to record some streams through twitch and would like to use H265 instead of the default. H265 saves about 65% file size vs the default. Here is an example batch file that I use.
streamlink https://www.twitch.tv/USER best --twitch-disable-hosting --ffmpeg-video-transcode h265 -o E:\Recs\Rec.mp4
This does not seem to work, even though it would seem it would through the docs. Any hints?
This parameter is only meant for plugins which require Streamlink to mux separate video and audio streams into one. With Twitch and other regular HLS streams, this is not the case. The docs need to be improved here...
If you want to re-encode streams on the fly, you need to use the --stdout/-O parameter and pipe the data into ffmpeg. This has been asked dozens of times, and you'll find all the answers here in the issue tracker:
https://github.com/streamlink/streamlink/issues?q=ffmpeg+pipe
Btw, depending on your hardware, (re)encoding live video into h265 can be quite an overwhelming task for your CPU, as it requires a lot more computation than its predecessor. Since you won't be gaining any quality improvements (you're re-encoding h264 data here), I don't think it's worth the cost and time. Storage space is super cheap and it's simply not worth the effort. If you're recording streams with a bitrate of 6Mbit/s, you need thousands of hours of video material in order to fill a regular 4TiB hard drive.
( 4 * 1024 * 1024 * 1024 * 1024 ) # storage space
/ ( 6 * 1024 * 1024 / 8 ) # bitrate
/ 3600 # per hour
= 1553.45 hours
= 64.73 days
Also, h265 is a dead codec and has just been killed by the industry last month. If you're trying to archive streams for personal reasons, you won't be doing yourself a favor by choosing h265.
@bastimeyer going a bit off-topic, but I'd be interested to read about the industry killing h265, is there a news article about it?
@beardypig
http://blog.chiariglione.org/2018/01/28/
The founder of the MPEG has realized that their HEVC licencing model is bad and he's complaining about open source software development and the royalty free AV1 of the AOmedia, which the industry has shifted to. This post is the reaction to Apple joining AOmedia, as one of the last remaining tech giants, which might have killed the MPEG...
http://aomedia.org/aom-in-the-news/
Most helpful comment
@beardypig
http://blog.chiariglione.org/2018/01/28/
The founder of the MPEG has realized that their HEVC licencing model is bad and he's complaining about open source software development and the royalty free AV1 of the AOmedia, which the industry has shifted to. This post is the reaction to Apple joining AOmedia, as one of the last remaining tech giants, which might have killed the MPEG...
http://aomedia.org/aom-in-the-news/