Log in

View Full Version : BD-Rebuilder - HEVC


Pages : [1] 2

HWK
20th September 2014, 21:00
I have decided to dedicate this thread to HEVC and BD-RB discussion, instead of using bug reports thread.

I recently finished testing 4K animation source and posting result here.

Common between x264 and x265

--crf 20 --input-res 4096x2160 --fps 24000/1001 --input-csp i420

X264
--output "F:\ Sintel 2010 4K.264"
Bitrate average 20694.40 kb/s
PSNR Mean Y 48.611 | U 54.778| V 54.238
PSNR Average 49.564
Final File Size 2.13 GB

X265
--output "F:\ Sintel 2010 4K.hevc"
Bitrate average 16249.31 kb/s
PSNR Mean Y 47.644 | U 54.269 | V 53.687
PSNR Average 49.288
Final File Size 1.67 GB

*Source is freely available for download to public under creative commons license, do google search if you need it.

gonca
21st September 2014, 00:03
here are some comparisons

HWK
21st September 2014, 01:05
I am gone be doing tear of steel next in 4K and post result, my aim is to see how psnr change with different source.

sneaker_ger
21st September 2014, 08:54
What does this have to do with BD-RB? This looks like a simple x265 vs x264 match. A large number of GUIs will or already do have x264 and x265 support. It doesn't make sense to create new threads for every GUI as the underlying encoders and results will be the same for all them. This rather belongs into the HEVC sub-forum.

Aside from that: CRF scales of x264 and x265 are not identical, so be careful. Since you provided both bitrate and PSNR this might have at least some value, though. Then again different psy defaults might skew the PSNR results.

HWK
21st September 2014, 16:14
I created this thread in hope of taking off hevc discussion posts found in bd-rb bugs report thread.

Only reason you see comparison is bd-rb uses x264 to compress and some of us want to do test and see how efficient x265 is over x264.

jdobbs
21st September 2014, 16:18
BD-RB will support x265 backups in the next release, so this can be useful so I can adjust default settings. What? Are we now limiting what people can say specific to their own method of backup? An extra thread isn't going to hurt anything.

gonca
21st September 2014, 16:52
HWK, jdobbs
any testing you need done let me know, I have some idle cpu time.

HWK
21st September 2014, 17:08
HWK, jdobbs
any testing you need done let me know, I have some idle cpu time.

Actually I was thinking so far I am the only one who has done 4K sources, beside me if someone else do it might help establish baseline.I recently got tear of steel and I think it would be good candidate since it is mix of animation and footage short on camera.

Here is my to do list

1. Do grainy video such as saving private ryan
2. Perform test on black and white video
3. Conduct two pass test on both encoders with challenge footage

Jdobbs, is there something we can do to help you or need help with?

sneaker_ger
21st September 2014, 20:31
An extra thread isn't going to hurt anything.
It is. A lot of people are looking for reviews of the x265 development progress but only few people will look into the BD-Rebuilder sub-forum. Outside people will miss out on the infos collected here and you guys will get less feedback and suggestions concerning your test setups. It's lose-lose.

gonca
21st September 2014, 20:33
Here's an idea, since you started the thread you can name test samples and parameters, etc to use. this way a more valid set of results can be achieved, instead of being all over the place

HWK
21st September 2014, 20:56
Here's an idea, since you started the thread you can name test samples and parameters, etc to use. this way a more valid set of results can be achieved, instead of being all over the place

Good call, I will post setting and sample later.

For testing purpose all of my sources are 4K and yuv format so far.

x264.exe --psnr --tune psnr --crf 20 --input-res 4096x2160 --fps 24000/1001 --input-csp i420 --output "F:\movie name.264" "movie name.yuv"

pause

x265.exe --psnr --tune psnr --crf 20 --input-res 4096x2160 --fps 24000/1001 --input-csp i420 --output "F:\movie name.hevc" "movie name.yuv"

pause

I will try to upload source later

HWK
21st September 2014, 21:20
It is. A lot of people are looking for reviews of the x265 development progress but only few people will look into the BD-Rebuilder sub-forum. Outside people will miss out on the infos collected here and you guys will get less feedback and suggestions concerning your test setups. It's lose-lose.

Ok, let me try to explain the purpose of this thread in case there is any doubt about it. I created this only for one purpose to remove post which is related to hevc and are posted in BD-RB bug report thread.

I never thought from feedback perspective, however I have included tags to help search engine.

HWK
21st September 2014, 22:04
PSNR (Tears of Steel 2012 UHD 4K)

Common between x264 and x265

--crf 20 --input-res 4096x2160 --fps 24000/1001 --input-csp i420

X264
--output "F:\ Tears of Steel 2012 UHD 4K.264
Bitrate average 36121.39 kb/s
PSNR Mean Y 44.808 | U 49.709| V 49.770
PSNR Average 45.791
Final File Size 3.08 GB

X265
--output "F:\ Tears of Steel 2012 UHD 4K.hevc"
Bitrate average 17710.16 kb/s
PSNR Mean Y 44.012 | U 49.213 | V 49.277
PSNR Average 45.321
Final File Size 1.51 GB

One thing I noticed bitrate was almost double for x264 to come close. Normally it is up to 30 % of x265.
I am gone upload the source for this one to try out.

sneaker_ger
21st September 2014, 22:16
Because of psy both x264 and x265 developers suggest using "--tune psnr" if you want to compare psnr. The psy optimizations increase subjective quality but reduce quality of metrics such as psnr and ssim.

But again: same crf does not result in same quality between 264 and x265.

HWK
21st September 2014, 22:21
I did use --tune psnr and --psnr, look at post 11 by me.

sneaker_ger
21st September 2014, 22:25
Ah, I see. I only looked at #13. To put into easier to grasp numbers this suggests x264 offered +9.4% quality but at +104% the bitrate (if measured via objective PSNR metric).

jdobbs
21st September 2014, 22:29
It is. A lot of people are looking for reviews of the x265 development progress but only few people will look into the BD-Rebuilder sub-forum. Outside people will miss out on the infos collected here and you guys will get less feedback and suggestions concerning your test setups. It's lose-lose.I disagree. So in your mind, once you made a post about any subject -- nobody can post anything similar anywhere else? When did DOOM9 become that dictatorial?

HWK
21st September 2014, 22:34
Ah, I see. I only looked at #13. To put into easier to grasp numbers this suggests x264 offered +9.4% quality but at +104% the bitrate (if measured via objective PSNR metric).

Much better :) that is why I am uploading the source for people to try out and report there findings.
This is my findings maybe someone will come up with something different.

sneaker_ger
21st September 2014, 22:53
I disagree. So in your mind, once you made a post about any subject -- nobody can post anything similar anywhere else?
No, I didn't say you can't make a new post. I'm saying you should do it in the correct sub-forum. There's a reason doom9 is divided into a bunch of them. Since this thread offers nothing specific to BD-RB it is in the wrong sub-forum.

But, well, I think I made my point. Last post from me on the sub-forum discussion.

Sharc
21st September 2014, 23:12
Black borders -- if any -- should be cropped for the PSNR tests because they bias (mask) the result.

HWK
21st September 2014, 23:36
Black borders -- if any -- should be cropped for the PSNR tests because they bias (mask) the result.

Yes, I did take into account to make sure no black borders.

gonca
22nd September 2014, 00:02
5 minute clip fom a movie 1:00:00 to 1:05:00
x265 preset medium crf 20 PSNR 49.31042
x264 preset medium 2 pass 5830kbps - matching bit rate PSNR 48.75296
Sorry ... I forgot to crop black borders.

Check this thread for comparisons http://forum.doom9.org/showthread.php?t=170236

Here are the frame by frame results

lauguru
24th September 2014, 15:47
BD-RB will support x265 backups in the next release, so this can be useful so I can adjust default settings. What? Are we now limiting what people can say specific to their own method of backup? An extra thread isn't going to hurt anything.

hello jdobbs

when estimates will be available the next version of bdrebuilder, to make the backup fullbd HVEC?
thanks

jdobbs
24th September 2014, 17:16
hello jdobbs

when estimates will be available the next version of bdrebuilder, to make the backup fullbd HVEC?
thanksI meant movie-only backup to MKV in that post. While full HEVC backups may be coming, since they can't be played by most players, I'm not sure when I might do that. If I did, it would likely be for archival purposes rather than playback.

[Edit] Hmmm... MPC-HC seems to recognize a movie-only BD that has HEVC and AAC in it. I'll do some testing on full backups, although it appears it only support playlist playback rather than menus, etc. Does anyone know exactly what its capabilities are? I'd really be interested in seeing how a full backup in HEVC might look on a single layer DVD.

lauguru
24th September 2014, 17:27
I meant movie-only backup to MKV in that post. While full HEVC backups may be coming, since they can't be played by most players, I'm not sure when I might do that. If I did, it would likely be for archival purposes rather than playback.

powerdvd 14 and tolalmedia6 playback perfectly h265, would be perfect, able to choose between a fullbluray encode in h264(avc) or h265(hvec) in the menu setup default option of bdrebuilder.

jdobbs
24th September 2014, 17:37
powerdvd 14 and tolalmedia6 playback perfectly h265, would be perfect, able to choose between a fullbluray encode in h264(avc) or h265(hvec) in the menu setup default option of bdrebuilder.Do you know of any guidelines as to what the limitations are that should be used? I'm wondering about b-frame limitations, GOP sizes, etc... I guess a start would be to use the same rules as AVC.

lauguru
24th September 2014, 17:49
Do you know of any guidelines as to what the limitations are that should be used? I'm wondering about b-frame limitations, GOP sizes, etc... I guess a start would be to use the same rules as AVC.

no, surely you and your experience, you get to do very well, or at least you can try.

HWK
24th September 2014, 17:54
Do you know of any guidelines as to what the limitations are that should be used? I'm wondering about b-frame limitations, GOP sizes, etc... I guess a start would be to use the same rules as AVC.

Jdobbs, I will do some test run and see what I can find out.

lauguru
24th September 2014, 17:57
Jdobbs, I will do some test run and see what I can find out.

thanks HWK , would be a breakthrough development for bdrebuilder!

jdobbs
24th September 2014, 18:18
Jdobbs, I will do some test run and see what I can find out.What'll you use for testing? PowerDVD 14?

HWK
24th September 2014, 18:25
What'll you use for testing? PowerDVD 14?

Yes, indeed. Unless you want something else.

I am gone use different preset in x265 and see what setting get use during encode with help of media info and also observe what works and what doesn't.

I already have mkv where average bitrate of video is around 10Mbits and aac audio with preset slow in x265.

Tip: By default x265 uses open gop with 4 b frames up to preset slow. After that in preset slower to placebo it uses 8 b frames.

jdobbs
24th September 2014, 18:33
Yes, indeed. Unless you want something else.

I am gone use different preset in x265 and see what setting get use during encode with help of media info and also observe what works and what doesn't.

I already have mkv where average bitrate of video is around 10Mbits and aac audio with preset slow in x265.

Tip: By default x265 uses open gop with 4 b frames up to preset slow. After that in preset slower to placebo it uses 8 b frames.I've read that the BD standard is going to use Rec. 2020 for 4K which means 10 bit color depth. That may be a consideration too.

HWK
24th September 2014, 18:50
http://i59.tinypic.com/if2alu.png

Setting used with preset slow

Encoding settings : wpp / ctu=64 / tu-intra-depth=1 / tu-inter-depth=1 / me=3 / subme=3 / merange=57 / rect / no-amp / max-merge=3 / no-early-skip / no-fast-cbf / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / interlace=0 / keyint=240 / min-keyint=23 / scenecut=40 / rc-lookahead=25 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=3 / weightp / no-weightb / aq-mode=2 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=4 / psy-rd=0.00 / psy-rdoq=0.00 / signhide / lft / sao / sao-lcu-bounds=0 / sao-lcu-opt=1 / b-pyramid / cutree / rc=crf / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30

Please note setting are from crf mode, however two pass works as well with same setting and seeking back and forth work as well along with chapters and subtitle.

Next task AVCHD and see how it goes.

HWK
24th September 2014, 21:43
This table shows what setting get applied with different preset. Certain setting such as GOP is always set to open by default.

HWK
25th September 2014, 20:47
I meant movie-only backup to MKV in that post. While full HEVC backups may be coming, since they can't be played by most players, I'm not sure when I might do that. If I did, it would likely be for archival purposes rather than playback.

[Edit] Hmmm... MPC-HC seems to recognize a movie-only BD that has HEVC and AAC in it. I'll do some testing on full backups, although it appears it only support playlist playback rather than menus, etc. Does anyone know exactly what its capabilities are? I'd really be interested in seeing how a full backup in HEVC might look on a single layer DVD.

Jdobbs, Powerdvd does not play if output is blu-ray format with hevc encoded footage. However playing individual m2ts work fine, highest preset which works well is preset slow anything else result in problem with decoder, example b frame increase by 4 more with preset slower in comparison to preset slow.

DTS-HD and subtitle decoding works fine.

Just for reference preset slower take 3X longer over preset slow.

On my system I am getting 0.70fps on preset slower.

jdobbs
25th September 2014, 20:59
Jdobbs, Powerdvd does not play if output is blu-ray format with hevc encoded footage. However playing individual m2ts work fine, highest preset which works well is preset slow anything else result in problem with decoder, example b frame increase by 4 more with preset slower in comparison to preset slow.

DTS-HD and subtitle decoding works fine.

Just for reference preset slower take 3X longer over preset slow.

On my system I am getting 0.70fps on preset slower.So you're really not getting anything you wouldn't get with a combination of MKV and MPC-HC. That's disappointing. I was hoping for full playback capabilities.

Thanks for testing it.

HWK
25th September 2014, 21:05
So you're really not getting anything you wouldn't get with a combination of MKV and MPC-HC. That's disappointing. I was hoping for full playback capabilities.

Thanks for testing it.

I am disappoint as well, but I guess it is gone be this way so be it.
Anyways right know I see full SBS option which can be done with hevc, can you add (if not to much hassle) half SBS and possibly m2ts muxing with DTS_HD etc.

jdobbs
25th September 2014, 23:34
I am disappoint as well, but I guess it is gone be this way so be it.
Anyways right know I see full SBS option which can be done with hevc, can you add (if not to much hassle) half SBS and possibly m2ts muxing with DTS_HD etc.You can do that just by creating a new preset in ALTERNATE.TXT using the existing options.

Here's an example:

[00036]
caption=MKV Container, HEVC Half-SBS 3D, Intact Audio
vEncoder=1
vBitrate=2000
aType=2
vFormat=5
cType=1


It assumes you have "Enable SBS output movie-only..." set in SETUP. It will take the 3840x1080 input from a 3D source, convert it to 1920x1080 (half SBS) and will keep the audio intact. I'll add it as a default in the next release.

HWK
26th September 2014, 03:05
I will try at once and thank you.

HWK
26th September 2014, 03:30
Jdobbs, when intact audio is choosen and container is mkv, does DTS-HD is downconverted to DTS.

jdobbs
26th September 2014, 03:36
Jdobbs, when intact audio is choosen and container is mkv, does DTS-HD is downconverted to DTS.Can't remember. I wouldn't think so, but I'll have to check.

[Edit] Ok... it will keep DTS-HD it if you have "Keep HD Audio for BD25 /Alternate Intact" checked in SETUP.

HWK
26th September 2014, 03:47
Can't remember. I wouldn't think so, but I'll have to check.

[Edit] Ok... it will keep DTS-HD it if you have "Keep HD Audio for BD25 /Alternate Intact" checked in SETUP.

Ok, one more thing I was outputting to MKV container with intact audio and video, however BD-RB still encoding it.

Any feed back on why it does that.

jdobbs
26th September 2014, 14:09
Ok, one more thing I was outputting to MKV container with intact audio and video, however BD-RB still encoding it.

Any feed back on why it does that.If you select an existing preset for Intact audio/video, it will work. Are you using one of the built in presets, or did you create one?

Also, if the output is selected as x265, Intact Video may not work. But I'd have to test it. That's because it might assumes the source couldn't be HEVC (since that would be illegal for the source BD).

lauguru
26th September 2014, 14:19
You may have encoded by a m2ts affecting the bluray menu, first try only encode the m2ts main movie and edit with tsmuxer and create new mpls and m2ts and copy and paste on structure bd and playback with powerdvd 14

HWK
26th September 2014, 15:42
If you select an existing preset for Intact audio/video, it will work. Are you using one of the built in presets, or did you create one?

Also, if the output is selected as x265, Intact Video may not work. But I'd have to test it. That's because it might assumes the source couldn't be HEVC (since that would be illegal for the source BD).

One of the existing preset with source video MPEG-4 AVC

Preset

[00028]
caption=MKV, Intact Video, Intact Audio
aType=2
vFormat=8
cType=1

HWK
26th September 2014, 15:43
You may have encoded by a m2ts affecting the bluray menu, first try only encode the m2ts main movie and edit with tsmuxer and create new mpls and m2ts and copy and paste on structure bd and playback with powerdvd 14

Doesn't work. I created blu-ray structure with tsmuxer for movie only, which I encoded with HEVC.

jdobbs
26th September 2014, 15:59
One of the existing preset with source video MPEG-4 AVC

PresetI just tested it and it works fine with AVC here. It fails with HEVC source, though (as I'd expect).

HWK
26th September 2014, 16:01
Also Jdobbs, there is bug in file output name and need fixing.

I am working with CAPT_AMERICA_WINTER_SOLDIER_3D and have chosen alternate output with two pass encode and encoding with X265.

X265 batch file contents Pass 1
"E:\BD-RBV04901\BD_Rebuilder\tools\avs2yuv.exe" "F:\BD-RB\WORKFILES\VID_00800.AVS" -o - | "E:\BD-RBV04901\BD_Rebuilder\tools\x265.exe" - --preset slow --qpfile "F:\BD-RB\WORKFILES\VID_00800.CHP" --keyint 240 --bitrate 9839 --y4m --stats "F:\BD-RB\WORKFILES\VID_00800.AVS.264.stats" --pass 1 --output NUL


X265 batch file contents Pass 2
"E:\BD-RBV04901\BD_Rebuilder\tools\avs2yuv.exe" "F:\BD-RB\WORKFILES\VID_00800.AVS" -o - | "E:\BD-RBV04901\BD_Rebuilder\tools\x265.exe" - --preset slow --qpfile "F:\BD-RB\WORKFILES\VID_00800.CHP" --keyint 240 --bitrate 9839 --y4m --stats "F:\BD-RB\WORKFILES\VID_00800.AVS.264.stats" --pass 2 --output "F:\BD-RB\WORKFILES\VID_00800.AVS.264"


You mention you did lot of sources and it didn't happen, but never tried 3D source and this is 3D source.

HWK
26th September 2014, 16:02
I just tested it and it works fine with AVC here. It fails with HEVC source, though (as I'd expect).

Are you testing with 3D source or 2D? All I know I have MKV intact video and audio and source is 3D and BD-RB still want to encode it.

HWK
26th September 2014, 16:29
Jdobbs, I notice if you are outputting to MKV and using hevc. If encoder is doing second pass and user abort and restart it want to start from creating stats file and doing two pass on video again.