PDA

View Full Version : x264 BluRay Profil - Special grain retention


Sagittaire
8th May 2008, 10:50
Here x264 profil for extra quality BluRay compliant encoding:
http://jfl1974.free.fr/upload/x264_H264.rar


Special x264 compilation:

patch < x264_console.diff -p0
patch < x264_fgo.01.826.diff -p1
patch < x264_hrd_pulldown.04.diff -p0
patch < x264_2pass_vbv.8.diff -p1

configure --enable-avis-input --enable-mp4-output --enable-pthread
--extra-cflags="-Ic:/gpac/include" --extra-ldflags="-Lc:/gpac/bin/gcc"

make


Special BluRay profil in the pack:


@REM -----------------------------------------------------------
@REM
@REM Profil BluRay 1080p23.976 extra high quality
@REM
@REM -----------------------------------------------------------


@REM Source file name (suffit de mettre la source ici)
set E_SRC=Encodage_HD_NTSC_1080p.avs

@REM Set of quality (ici la qualité 1-50)
set E_BR=24

@REM Set of max bitrate (ici le bitrate max)
set MAX_BR=24000

@REM Set of Buffer (ici le buffer)
set BUF_BR=30000

@REM Set credit (frame de début du générique)
set CRE_FR=150000

@REM Set end credit (frame de fin du générique)
set END_FR=160000



@REM Profil

x264.exe --threads auto --thread-input --keyint 24 --min-keyint 2 --crf %E_BR% --vbv-maxrate %MAX_BR%
--vbv-bufsize %BUF_BR% --mvrange 511 --level 4.1 --bframe 3 --b-pyramid --b-rdo --bime --weightb --ref 3
--mixed-refs --direct auto --deblock -2:-2 --ipratio 1.10 --pbratio 1.10 --partitions "all" --8x8dct --me "umh"
--subme 7 --trellis 0 --no-fast-pskip --no-dct-decimate --aud --nal-hrd --sar 1:1 --cqmfile Sagittaire.cfg
--deadzone-intra 10 --deadzone-inter 10 --aq-strength 1.00 --aq-mode 2 --fgo 10
--zone %CRE_FR,%END_FR%,b=0.33 --progress -o 1080p_Q.h264 %E_SRC%

pause




@REM -----------------------------------------------------------
@REM
@REM Profil BluRay 1080p23.976 3 passes extra high quality
@REM
@REM -----------------------------------------------------------


@REM Source file name (suffit de mettre la source ici)
set E_SRC=Encodage_HD_NTSC_1080p.avs

@REM Set of bitrate (ici le bitrate)
set E_BR=6900

@REM Set of max bitrate (ici le bitrate max)
set MAX_BR=20000

@REM Set of Buffer (ici le buffer)
set BUF_BR=30000



@REM Profil

x264.exe --threads 1 --thread-input --keyint 24 --min-keyint 2 --bitrate %E_BR% --vbv-maxrate %MAX_BR%
--vbv-bufsize %BUF_BR% --mvrange 511 --level 4.1 --bframe 3 --b-pyramid --bime --weightb --ref 1 --mixed-refs
--direct auto --deblock -2:-2 --pass 1 --stats "x264_stat.log" --ipratio 1.10 --pbratio 1.10 --partitions "all"
--8x8dct --me "hex" --subme 5 --aud --nal-hrd --sar 1:1 --cqmfile Sagittaire.cfg --deadzone-intra 10
--deadzone-inter 10 --aq-strength 0.00 --aq-mode 0 --progress -o NUL %E_SRC%

x264.exe --threads auto --thread-input --keyint 24 --min-keyint 2 --bitrate %E_BR% --vbv-maxrate %MAX_BR%
--vbv-bufsize %BUF_BR% --mvrange 511 --level 4.1 --bframe 3 --b-pyramid --b-rdo --bime --weightb --ref 3
--mixed-refs --direct auto --deblock -2:-2 --pass 3 --stats "x264_stat.log" --ipratio 1.10 --pbratio 1.10
--partitions "all" --8x8dct --me "umh" --subme 7 --trellis 0 --no-fast-pskip --no-dct-decimate --aud --nal-hrd
--sar 1:1 --cqmfile Sagittaire.cfg --deadzone-intra 10 --deadzone-inter 10 --aq-strength 1.00 --aq-mode 2
--fgo 10 --progress -o 1080p_2.h264 %E_SRC%

@REM Make third pass only if second pass produce bad quality

x264.exe --threads auto --thread-input --keyint 24 --min-keyint 2 --bitrate %E_BR% --vbv-maxrate %MAX_BR%
--vbv-bufsize %BUF_BR% --mvrange 511 --level 4.1 --bframe 3 --b-pyramid --b-rdo --bime --weightb --ref 3
--mixed-refs --direct auto --deblock -2:-2 --pass 3 --stats "x264_stat.log" --ipratio 1.10 --pbratio 1.10
--partitions "all" --8x8dct --me "tesa" --subme 7 --trellis 1 --no-fast-pskip --no-dct-decimate --aud
--nal-hrd --sar 1:1 --cqmfile Sagittaire.cfg --deadzone-intra 10 --deadzone-inter 10 --aq-strength 1.00
--aq-mode 2 --fgo 10 --progress -o 1080p_3.h264 %E_SRC%

pause

survivant001
8th May 2008, 11:35
We won't get a better result with 2 pass ?

Japhsoncross
8th May 2008, 11:42
IIRC, trellis 1/2 and deadzone settings don't work together.

Sagittaire
8th May 2008, 11:54
IIRC, trellis 1/2 and deadzone settings don't work together.

ooopsss ... with fgo it's trelli 0 for better grain retention.


We won't get a better result with 2 pass ?

No because crf mode produce exactly the same encoding than multipass mode (at the same bitrate). If you want target bitrate there are multipass profil in the pack.

Atak_Snajpera
8th May 2008, 11:57
You will get better quality if you remove those stupid lines
--keyint 24 --min-keyint 2

Tested works on PS3 and others (standalone players)

Sagittaire
8th May 2008, 12:06
You will get better quality if you remove those stupid lines
--keyint 24 --min-keyint 2

Tested works on PS3 and others standalone players

certainely not ... lol.

1) --keyint 24
Max IDR must be 24 frames if you want compliant BD profil. All the BD authoring soft want compliant GOP. Moreover 24 frame is a relative long GOP: very long GOP at 240 frames will produce less than 5% quality improvement. It's 1 sec for the max gop and anything else for Blu Ray.

2) --min-keyint 2
Usefull if you want make BluRay -> HDDVD flag convertion with H264info for example. Moreover by default minkeyint at 10 can be problemtic with scenecut detection with GOP at 24. Consecutive IFrame can be problematic with authoring software (frame drop with cinevision for example)


PS3 profil (with mp4) is not a compliant BluRay profil. --keyint 24 --min-keyint 2 produce the best possible compliant stream.

survivant001
8th May 2008, 14:35
You will get better quality if you remove those stupid lines
--keyint 24 --min-keyint 2

Tested works on PS3 and others (standalone players)

we had to add theses options for Adobe Encore and Scenarist, but since tsmuxer is released, we don't need them to authorize our bluray for the PS3.. but still wihtout theses setting we won't be able to import the video in theses softwares.

I don't use them anymore, because I only want to watch my video on the PS3, but if I want to add menus.. that will be another story.

it's what I think

survivant001
8th May 2008, 14:37
No because crf mode produce exactly the same encoding than multipass mode (at the same bitrate). If you want target bitrate there are multipass profil in the pack.

cool, but because I always want something that fit on a dvd, I use the 2pass.

I had trouble with crf 20 on anime with ripbot in the past, so I stop using crf to replace by 2pass.

Sagittaire
20th May 2008, 20:48
update profil

-TiLT-
3rd August 2008, 02:46
Rar is down again :(

And I thought Blu Ray is --b-pyramid incompatible.

Sharktooth
3rd August 2008, 16:55
nope, just some players or old softwares. i excluded b-pyramid from the megui presets for that reason (not that it is a big advantage in quality by using it though). also i found a typo --min-keint 1 instead of 2 in the blu-ray and avc-hd presets (while HD-DVD was correctly set at 2), so i will update them asap.

rack04
3rd August 2008, 18:08
nope, just some players or old softwares. i excluded b-pyramid from the megui presets for that reason (not that it is a big advantage in quality by using it though). also i found a typo --min-keint 1 instead of 2 in the blu-ray and avc-hd presets (while HD-DVD was correctly set at 2), so i will update them asap.

Is this typo going to cause any payback problems with files already encoded using this profile?

Sharktooth
3rd August 2008, 20:19
not at all.

Chefkoch_ico
3rd August 2008, 20:24
Rar is down again :(

Just saw it too. Plz upload again, if you have time.

Thx in advance

lexor
4th August 2008, 19:19
nope, just some players or old softwares. i excluded b-pyramid from the megui presets for that reason (not that it is a big advantage in quality by using it though). also i found a typo --min-keint 1 instead of 2 in the blu-ray and avc-hd presets (while HD-DVD was correctly set at 2), so i will update them asap.

You know I have seen several time you saying you'll update profiles, but so far every time megui updates I get audio profiles updated (what can possibly warrant updating them several time in the past few weeks?). So is it the case that you just didn't update x264 profiles yet, or is my megui not getting the right profiles updated?

nurbs
4th August 2008, 19:44
If you want do try the new megui profiles (http://forum.doom9.org/showthread.php?t=139765) no one is stopping you. They are available, you just won't get them via auto-update until they are finished.

lexor
4th August 2008, 22:28
Oh, I wasn't hurrying people along, I just noticed a patter of Shark saying he'll update x264 profiles, and then MeGUI updating audio profile and not x264. I thought that maybe megui wasn't grabbing the right one, i.e. something wrong with autoupdate. And since this is the latest of Sharks posts on the subject I thought I'd ask. I have my own edit of Shark's PSP profile that works fine for this.

Sharktooth
5th August 2008, 03:22
yep, the presets are not yet published in the megui auto-update but they're available at the link nurbs posted.
that way they can be tested and tweaked before being added to megui automatic updates.

G_M_C
5th August 2008, 13:03
And I thought Blu Ray is --b-pyramid incompatible.

nope, just some players or old softwares. i excluded b-pyramid from the megui presets for that reason [...]

So b-pyramids are supported by AVCHD/Blu-ray?? I also thought that it wasn't supported, cant remember why though ...

I'll try encoding an AVCHD with b-pyramids tomorrow and see if my panasonic will play AVCHD's with b-pyramids.

Sharktooth
5th August 2008, 13:42
yes, but not by some old players and old software decoders.

Sagittaire
5th August 2008, 20:55
So b-pyramids are supported by AVCHD/Blu-ray?? I also thought that it wasn't supported, cant remember why though ...

I'll try encoding an AVCHD with b-pyramids tomorrow and see if my panasonic will play AVCHD's with b-pyramids.

With 3 bpyramid you must use 3,2 for p,b ref: --ref 3 with x264.