GrandAdmiralThrawn
11th February 2016, 15:39
Hello,
I've just now fetched x265 from Videolan to start playing around with it and comparing it to my x264 encodes.
I would like to ask about good settings for animated content (hand-drawn cartoons and Anime, not CGI), as x265 doesn't have --tune animation like x264. Resolutions are 1280x720 and 1920x1080.
Also, I stuck to the same preset I've been using for x264, "veryslow".
I compiled the code for both x86_64 Linux as well as WinXP x64, 64-bit binaries in both cases. The assembly has been handled by yasm 1.3.0, so I have the optimizations.
Now, I don't really understand most of the options, but what I've been doing is this (transcoding some H.264/AVC to H.265/HEVC), here on Windows:
avconv -r 24000/1001 -i video-input.h264 -f yuv4mpegpipe -pix_fmt yuv420p - 2>NUL | x265 - --wpp --y4m -D 12 -p veryslow^
--bframes 16 --bitrate 2000 --pass 1 --slow-firstpass --stats v.stats --sar 1 --range full -o pass1.h265
avconv -r 24000/1001 -i video-input.h264 -f yuv4mpegpipe -pix_fmt yuv420p - 2>NUL | x265 - --wpp --y4m -D 12 -p veryslow^
--bframes 16 --bitrate 2000 --pass 2 --stats v.stats --sar 1 --range full -o pass2.h265
As you can see I'm using libavs' avconv to decode H.264 and pipe it as raw YUV 4:2:0 into x265...
Some options I picked might be redundant though. And it's 2-pass instead of 1-pass CRF because I am targeting file sizes instead of quality levels.
Ok, now there are some "problems" with this, and I'd like to ask you what I should do about them:
1.) Here I chose 12-bit per pixel. I take it hardware players will only support 10-bit for H.265/HEVC? I remember that 10-bit was a good choice for animated content with x264 to reduce banding artifacts on gradients. Will 12-bit result in a similar boost over 10-bit? Playback devices would be the PC (MPC-HC and mplayer), Android devices and possibly some hardware players like TVs or so. Maybe even iOS devices in the future. So I might risk locking out hardware players if going for the 12-bit route. But it has to pay off as well, otherwise I won't do that. Do you think it might provide a good improvement for animated content?
2.) The encoder is abysmally slow on my machines, an i7 950 quadcore and a Xeon X5690 hexcore (basically an i7 990X). It's about 10 times (!!) as slow as x264 on --preset veryslow --bframes 16. Can I do something to speed it up without losing too much quality? Or should I just switch to the slow(er) or even medium presets, turning most of the knobs back a little? I'm also wondering if it might be because I'm lacking the AVX/AVX2 and FMA instruction set extensions. Could that be? I just don't want to sacrifice too much quality..
3.) Generally, all I did to tune for animated content was --bframes 16, but is there anything else I should do?
Thank you for your time!
I've just now fetched x265 from Videolan to start playing around with it and comparing it to my x264 encodes.
I would like to ask about good settings for animated content (hand-drawn cartoons and Anime, not CGI), as x265 doesn't have --tune animation like x264. Resolutions are 1280x720 and 1920x1080.
Also, I stuck to the same preset I've been using for x264, "veryslow".
I compiled the code for both x86_64 Linux as well as WinXP x64, 64-bit binaries in both cases. The assembly has been handled by yasm 1.3.0, so I have the optimizations.
Now, I don't really understand most of the options, but what I've been doing is this (transcoding some H.264/AVC to H.265/HEVC), here on Windows:
avconv -r 24000/1001 -i video-input.h264 -f yuv4mpegpipe -pix_fmt yuv420p - 2>NUL | x265 - --wpp --y4m -D 12 -p veryslow^
--bframes 16 --bitrate 2000 --pass 1 --slow-firstpass --stats v.stats --sar 1 --range full -o pass1.h265
avconv -r 24000/1001 -i video-input.h264 -f yuv4mpegpipe -pix_fmt yuv420p - 2>NUL | x265 - --wpp --y4m -D 12 -p veryslow^
--bframes 16 --bitrate 2000 --pass 2 --stats v.stats --sar 1 --range full -o pass2.h265
As you can see I'm using libavs' avconv to decode H.264 and pipe it as raw YUV 4:2:0 into x265...
Some options I picked might be redundant though. And it's 2-pass instead of 1-pass CRF because I am targeting file sizes instead of quality levels.
Ok, now there are some "problems" with this, and I'd like to ask you what I should do about them:
1.) Here I chose 12-bit per pixel. I take it hardware players will only support 10-bit for H.265/HEVC? I remember that 10-bit was a good choice for animated content with x264 to reduce banding artifacts on gradients. Will 12-bit result in a similar boost over 10-bit? Playback devices would be the PC (MPC-HC and mplayer), Android devices and possibly some hardware players like TVs or so. Maybe even iOS devices in the future. So I might risk locking out hardware players if going for the 12-bit route. But it has to pay off as well, otherwise I won't do that. Do you think it might provide a good improvement for animated content?
2.) The encoder is abysmally slow on my machines, an i7 950 quadcore and a Xeon X5690 hexcore (basically an i7 990X). It's about 10 times (!!) as slow as x264 on --preset veryslow --bframes 16. Can I do something to speed it up without losing too much quality? Or should I just switch to the slow(er) or even medium presets, turning most of the knobs back a little? I'm also wondering if it might be because I'm lacking the AVX/AVX2 and FMA instruction set extensions. Could that be? I just don't want to sacrifice too much quality..
3.) Generally, all I did to tune for animated content was --bframes 16, but is there anything else I should do?
Thank you for your time!