Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link | |||||||||||||
BluRay Maniac
Join Date: Dec 2005
Posts: 2,419
|
Encoding Video for Blu-Ray using H264/AVC
Here is part of specification that apply when encoding with H264/AVC codec, all parameters showed here are not guessing, it's based on original Blu-Ray specification, which are not available in public.
NOTE: This is discussion about settings that are for creating 100% compliant Blu-Ray structures, not for encoding from Blu-Ray sources to matroska/mp4 or other media, if you encode to those skip this nightmare ![]() 1. GENERAL CONSTRAINTS FOR MPEG-4 H264/AVC 1.1 ALLOWED RESOLUTIONS/FRAMERATES tom.niko.users.sbb.rs/resolutions.png 1.2 ALLOWED LEVELS, PROFILES, REFERENCE FRAMES, VBV 1.2.1 Primary Video Rules tom.niko.users.sbb.rs/gopsrefs2.png 1.2.2 Secondary Video Rules NOTE: In case of 1080 and 720 resolutions same rules apply as Primary video, while 576 and 480 resolutions have stricter parameters showed in table: tom.niko.users.sbb.rs/gopsrefs3.png 1.3 SIMPLE ASPECT RATIO tom.niko.users.sbb.rs/sar.png 1.4 COLOR CHARACTERISTICS tom.niko.users.sbb.rs/color.png 1.5 OTHER REQUIRED PARAMETERS 8-bit (4:2:0) Colorspace is only allowed Main and High profiles are allowed Maximum 3 B-Frames is allowed NAL-HRD Type 2 capable encoder is needed 2. ENCODE BLU-RAY VIDEO USING x264 2.1 MANDATORY PARAMETERS Every encode for Blu-Ray must contain this parameters, without it will not meet Blu-Ray specification. Quote:
Quote:
Quote:
Quote:
Quote:
For example: --vbv-bufsize 30000 --vbv-maxrate 40000 is allowed --vbv-bufsize 30000 --vbv-maxrate 30000 is allowed --vbv-bufsize 15000 --vbv-maxrate 30000 is allowed --vbv-bufsize 30000 --vbv-maxrate 15000 is not allowed (delay is greater than 1 second) Basicly vbv-bufsize should newer been greater than vbv-maxrate, that is whole point. Quote:
Quote:
Quote:
2.2 OPTIONAL PARAMETERS This parameters is optional and not need for every encode. Quote:
Quote:
Quote:
Quote:
Quote:
2.2 EXAMPLES Progressive 1080p 720p 576p 480p Interlaced 1080i 576i 480i Last edited by tebasuna51; 17th June 2024 at 10:18. Reason: Restore images |
|||||||||||||
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
|
thanks a lot...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note... Visit The Land Of Dracula (Romania - EU)! |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Aug 2009
Location: 61.45° , 23.86°
Posts: 120
|
Little nitpick : since you're using images and you're hosting them yourself, might want to optimize them for smaller size - pics 1 and 2 went from 50 KiB and 62 KiB to 13 and 16 KiB, respectively , just by decreasing bit-depth and using maximum PNG compression. This without even resorting to PNGOUT or Pngcrush.
|
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 807
|
What does "Max bitrate BD, DVD and with or without 2 sec GOP" mean?
And to do 25fps progressive, you have to either double the framerate to 50fps, or encode it as 25fps interlaced? Last edited by ajp_anton; 13th May 2010 at 02:27. |
![]() |
![]() |
![]() |
#7 | Link | |||
BluRay Maniac
Join Date: Dec 2005
Posts: 2,419
|
@AnonCrow, thanks for tip. i probably will upload later here as attach, but i will optimize as much as possible.
Quote:
Quote:
Quote:
![]() |
|||
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
|
Quote:
Or you could force it manually since the spec says frame_mbs_only shall be 0. Last edited by kieranrk; 13th May 2010 at 13:12. |
|
![]() |
![]() |
![]() |
#13 | Link |
Registered User
Join Date: Jul 2003
Location: Italy
Posts: 1,135
|
Infact it's mentioned in the tab
![]() I would like to add that even if it's allowed to have a fullHD secondary video, it's better to prefer SD secondary video because not all the standalone players are able to handle 2 fullhd stream at once. |
![]() |
![]() |
![]() |
#14 | Link | |
Registered User
Join Date: Dec 2001
Posts: 96
|
Quote:
I've got many progressive PAL-sources (most satellite-streams are p anyway), and wouldn't like to encode that "interlaced". ![]()
__________________
shh Last edited by shh; 13th May 2010 at 12:13. |
|
![]() |
![]() |
![]() |
#15 | Link |
Registered User
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
|
You could modify x264 to write frame_mbs_only flag as zero. You'd have to write pic_struct too but the spec isn't clear whether it wants you to signal the frame as two fields or as one frame.
|
![]() |
![]() |
![]() |
#16 | Link | |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 807
|
Quote:
Sure 15000 can be used, but it's not max, which is what this tries to tell you. IMO it should say something like Max bitrate 2 sec GOP BD DVD |
|
![]() |
![]() |
![]() |
#17 | Link |
Registered User
Join Date: Mar 2006
Posts: 1,538
|
Thanks for taking the time to put this together. Here are my comments:
1.) "RESOLITIONS" should be spelled "RESOLUTIONS" 2.) Add a section that includes mandatory items like --aud, --bframes 3, --nal-hrd vbr, etc. I know you mention bframes 3 in the title section of Section 2 but that could easily be overlooked by people who concentrate on big pretty pictures. |
![]() |
![]() |
![]() |
#18 | Link | |
Registered User
Join Date: May 2006
Posts: 4,042
|
Thanks a lot shon3i for your initiative
![]() Quote:
Could it eventually be included in x264 as 'device presets' or similar? |
|
![]() |
![]() |
![]() |
#20 | Link | |
BluRay Maniac
Join Date: Dec 2005
Posts: 2,419
|
Quote:
1. 15000 is max for DVD 2. 15000 is max i you want use 2 sec GOP besides you use DVD or BD 3. you can still use 1 sec gop. so if you don't use 2 sec GOP that mean you will use 1 second instead. I will somehow fix this. @all, be patient ![]() Last edited by shon3i; 13th May 2010 at 15:56. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|