Add FFMPEG x265 support for HEVC video encoding
UPDATE 2025-01-21:
Done for the upcoming v4.4:
#129119 - ffmpeg: Support H.265 video output codec - blender - Blender Projects
I know Blender already uses FFMPEG according to its video encoding options. I might be wrong, but I think it could support x265 codec, which is one of the best (if not the best?) HEVC video encoding library.
And that's what this request is all about: Make HEVC encoding possible within Blender.
Right now our best option for a nice compromise quality/filesize is x264, which is fine and widely supported around the world. But x265 is slowly becoming a new standard (and might replace x264, at least for every "lowest file size" encoding purpose).
Besides that, x265 does have some advantages which might interest a lot of people :
pros :
- better compression
- better quality
- about same visual quality as x264 but for half the file size
- supported by all the major modern softwares, hardwares and services (including Youtube \o/ )
cons :
- almost twice slower to encode than x264
- for high bitrates (like 20Mbs), only a slight better quality than x264 which doesn't justify the 2x encoding time anymore
- probably not supported by your grandma's TV
- Not in Blender (boooo)
9 Comments
This wouldn't be difficult to add... though the encoding panel has always been a bit of a mess. Might be best to address re-organizing that first.
Pity that this got forgotten. I actually made a kind of proof-of-concept script for my own needs tat uses external ffmpeg to unlock all the ffmpeg implemented formats in Blender. Here you go: github.com/ichlubna/blenderScripts/blob/master/MISC/ffExport.py
I hope it comes soon as h.265 is better than h/264 for it is the standard for all new video now it seems. h.264 was good but h.265 is better objectively. I get adding in more options to encode your animation and/or video into will make the application more bulky and more bloated with options not all will use but taking out h.264 and adding h.265 might fix that if it is an issue they are using for "bloat".
* @yumri04 * Removing x264 would be a terrible idea, it's the current standard for hardware, software and Internet, and he'll probably keep at least a good usage %age for a few years still. It remains the good trade-of for encoding time vs quality & file size, while other codecs like x265, vp9 and now av1 fight for the standard of higher encoding time but better quality & file size, they compete in two categories.
Plus adding one codec in the codec drop down menu won't bloat anything.
But I think * @Jason van Gumster * is right: the encoding panel is a mess and I think it also needs a lot of rework.
And if I was asked, I'd say it would also need a form of "custom" entry. I.E as a checkbox below the Container drop down menu, and would replace the Video & Audio subpanel by a bloc-text input where we could write a proper ffmpeg command line. That way, we could basically use anything ffmpeg can offer even when there's no UI for it, and with no UI bloating.
H.264 shouldn't be removed because it's the only video format that works on all web browsers natively. H.265 results in higher image quality for given bitrate but support for it is still lacking in many devices and environments.
anynews about this?
Yes! I've wanted this for years...
While we're at it, support for VP9/WEBM would be good as well. Both VP9 and HEVC achieve very similar compression ratios, but the CPU implementation of LibVPX (the VP9 encoder bundled with FFmpeg) seems to be more efficient than x265's.
x265 doesn't seem to utilize multiple cores very well whereas LibVPX does a fantastic job, especially with the
row-mtoption enabled.@quargzon: Actually, i did happen to see VP9 in the encoding options for Blender 2.8 Beta. Might want to check that and confirm.
@corruptinatorx01: I noticed that too; it's definitely new. I couldn't, however, find any way to output to webm. It's a bit strange to offer VP9 support without the webm container format. I supposed they expect you to just use MKV. Opus doesn't appear to be supported either, which is typically used together with VP9, so for the time being I'll continue rendering lossless and transcoding afterwards.