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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th March 2011, 13:36   #201  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
This site and this thread is how to encode for Blu-Ray (BD-R or DVD) with pure Blu-Ray structure, and if your target is not BD structure, or it's mkv or something else, you should not use any of these options.
__________________
ChapterGen - manipulate with chapters in various i/o formats, with CLI support
Official website or Doom9 thread
shon3i is offline   Reply With Quote
Old 10th March 2011, 13:59   #202  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by shon3i View Post
This site and this thread is how to encode for Blu-Ray (BD-R or DVD) with pure Blu-Ray structure, and if your target is not BD structure, or it's mkv or something else, you should not use any of these options.
Yes, you will have timecode problems if you try and use pulldown with mkv, mp4 etc.
kieranrk is offline   Reply With Quote
Old 14th March 2011, 17:12   #203  |  Link
dvdboy
Registered User
 
Join Date: Mar 2003
Posts: 191
Despite having successfully encoded Blu-ray streams with x264 before, all of my attempts since Friday have produced "buffer underrun" errors in both Scenarist BD 5.1.3 and 5.2.

I've tried using both MeGUI and the commandline directly:

Open GOP

Quote:
"C:\Software\AVC Encoding\MeGUI_1911_x86_WithoutInstaller\tools\x264\x264.exe" --bitrate 28000 --preset medium --tune film --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 38000 --vbv-bufsize 30000 --profile high --level 4.1 --keyint 30 --b-pyramid strict --open-gop bluray --slices 4 --tff --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o "E:\DVD Department\output.264" "E:\DVD Department\input.avs"

"C:\Software\AVC Encoding\MeGUI_1911_x86_WithoutInstaller\tools\x264\x264.exe" --bitrate 28000 --preset medium --tune film --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --profile high --level 4.1 --keyint 30 --b-pyramid strict --open-gop bluray --slices 4 --tff --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o "E:\DVD Department\output.264" "E:\DVD Department\input.avs"
Closed GOP

Quote:
"C:\Software\AVC Encoding\MeGUI_1911_x86_WithoutInstaller\tools\x264\x264.exe" --bitrate 28000 --preset medium --profile high --tune film --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 38000 --vbv-bufsize 30000 --level 4.1 --keyint 30 --b-pyramid strict --open-gop none --slices 4 --tff --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 -o "E:\DVD Department\output.264" "E:\DVD Department\input.avs"

"C:\Software\AVC Encoding\MeGUI_1911_x86_WithoutInstaller\tools\x264\x264.exe" --bitrate 28000 --preset medium --profile high --tune film --weightp 1 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 30 --b-pyramid strict --open-gop none --slices 4 --tff --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 -o "E:\DVD Department\output.264" "E:\DVD Department\input.avs"
The reason I (tried) to add the --profile high lines, was I was concerned that the streams were being incorrectly flagged as Main Profile.

The input file is a Quicktime via QTInput.

x264 core:114 r1913 5fd3dce

Just noticed a mismatch in the vbv maxrate on each pass, so I will run another test.
dvdboy is offline   Reply With Quote
Old 14th March 2011, 17:56   #204  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
what is resolution and fps of source video ?
__________________
ChapterGen - manipulate with chapters in various i/o formats, with CLI support
Official website or Doom9 thread
shon3i is offline   Reply With Quote
Old 14th March 2011, 18:15   #205  |  Link
dvdboy
Registered User
 
Join Date: Mar 2003
Posts: 191
Quote:
Originally Posted by shon3i View Post
what is resolution and fps of source video ?
1080i30 (29.97). Audio is exported WAV via Quicktime.

Code:
Format                           : MPEG-4
Format profile                   : QuickTime
Codec ID                         : qt  
File size                        : 17.2 GiB
Duration                         : 11mn 31s
Overall bit rate                 : 214 Mbps
Encoded date                     : UTC 2011-03-10 19:02:28
Tagged date                      : UTC 2011-03-10 19:18:26
Writing library                  : Apple QuickTime
Media/UUID                       : 5AE9027B-9FFD-47E6-92A7-FD752340BA3D

Video
ID                               : 1
Format                           : ProRes
Format profile                   : High
Codec ID                         : apch
Duration                         : 11mn 31s
Bit rate mode                    : Variable
Bit rate                         : 212 Mbps
Width                            : 1 888 pixels
Original width                   : 1 920 pixels
Height                           : 1 062 pixels
Original height                  : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Constant
Frame rate                       : 29.970 fps
Color space                      : YUV
Chroma subsampling               : 4:2:2
Bits/(Pixel*Frame)               : 3.525
Stream size                      : 17.1 GiB (99%)
Language                         : English
Encoded date                     : UTC 2011-03-10 19:02:28
Tagged date                      : UTC 2011-03-10 19:18:26

Audio
ID                               : 2
Format                           : PCM
Format settings, Endianness      : Big
Format settings, Sign            : Unsigned
Codec ID                         : in24
Duration                         : 11mn 31s
Bit rate mode                    : Constant
Bit rate                         : 2 304 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Bit depth                        : 24 bits
Stream size                      : 190 MiB (1%)
Language                         : English
Encoded date                     : UTC 2011-03-10 19:02:28
Tagged date                      : UTC 2011-03-10 19:18:26
dvdboy is offline   Reply With Quote
Old 14th March 2011, 21:58   #206  |  Link
JK1974
Registered User
 
Join Date: Mar 2005
Posts: 89
Quote:
Originally Posted by shon3i View Post
This site and this thread is how to encode for Blu-Ray (BD-R or DVD) with pure Blu-Ray structure, and if your target is not BD structure, or it's mkv or something else, you should not use any of these options.
Sorry, maybe I got something wrong, but I donīt understand this. I encoded 1080p24 as well as 1080i50 with the settings mentioned and made MKVs out of it for the following reasons:
1) I believe(d) that if I use a BD like encoding, I get higher compatibility as decoder chips are "optimized" for playing BD and AVCHD compliant video material.
2) I am open to demux and reauthor it as BD in case I want advanced features like menus, PiP etc. in case that those features are available in affordable BD authoring tools in the next few years and Blu-ray media become more widespread.

I was able to play back at least the 1080i50 encodings as AVCHD discs (tsmuxer) with my PS3, the 1080p24 encodings I did so far also made no problems with network media players (Sigma Designs/Realtek chipsets).

But maybe my situation is different as I donīt use any pulldown features...
JK1974 is offline   Reply With Quote
Old 14th March 2011, 22:52   #207  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
@dvdboy, did you try mux without audio ? can be audio problem.

@JK1974,

1) yes
2) no, because if you mux BD compatible stream to MKV, you will destroy some data which is irrevocable.

btw fake intelaced is less important as pulldown, i mean it will not effect on decoding process.
__________________
ChapterGen - manipulate with chapters in various i/o formats, with CLI support
Official website or Doom9 thread
shon3i is offline   Reply With Quote
Old 15th March 2011, 00:32   #208  |  Link
latet
Registered User
 
Join Date: Feb 2011
Posts: 41
Quote:
Originally Posted by shon3i View Post
2) no, because if you mux BD compatible stream to MKV, you will destroy some data which is irrevocable.
What exactly? Can you please write more about it?
Thank you.
latet is offline   Reply With Quote
Old 15th March 2011, 15:11   #209  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
Quote:
Originally Posted by latet View Post
What exactly? Can you please write more about it?
Thank you.
There is significant difference between containers. Not all containers require same, and encoding process is different depending on container.
__________________
ChapterGen - manipulate with chapters in various i/o formats, with CLI support
Official website or Doom9 thread
shon3i is offline   Reply With Quote
Old 15th March 2011, 15:23   #210  |  Link
JK1974
Registered User
 
Join Date: Mar 2005
Posts: 89
Quote:
Originally Posted by shon3i View Post
There is significant difference between containers. Not all containers require same, and encoding process is different depending on container.
Still more details?
I am sure that I demuxed an MKV, made an AVCHD disc with TSMuxer and played it back flawlessly on the PS3. However, it might work as TSMuxer as well as the PS3 donīt check more details in the stream.
However, I am still a little concerned about my encodings as I just started editing and encoding my AVCHD camcorder recordings and wanted to use an open format like MKV instead of the uncomfortable and feature-poor AVCHD disc format.
JK1974 is offline   Reply With Quote
Old 15th March 2011, 16:13   #211  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
Quote:
Originally Posted by JK1974
Still more details?
Calculations for AUD and NAL data is different for specified container, therefore nal-hrd command will be different for different container, but aslo muxing raw stream to container (MKV, MP4) will be aslo strip some of this data without backing it on demux.

In real world, only few BD chips currently care of this (it will not play that stream). And there is BD Verification tools that will not approve stream, so if you don't care about 100% compliant stream then this should not bothering you.
__________________
ChapterGen - manipulate with chapters in various i/o formats, with CLI support
Official website or Doom9 thread

Last edited by shon3i; 15th March 2011 at 20:24.
shon3i is offline   Reply With Quote
Old 15th March 2011, 20:01   #212  |  Link
latet
Registered User
 
Join Date: Feb 2011
Posts: 41
Quote:
Originally Posted by shon3i View Post
And there is BD Verification tools that will not approve stream
Could please write the name of such tool?

Thanks,

latet
latet is offline   Reply With Quote
Old 15th March 2011, 20:22   #213  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
Quote:
Originally Posted by latet View Post
Could please write the name of such tool?

Thanks,

latet
Sony Verifier, Panasonic Verifier and many more BD disc verifiers, used in studios.
shon3i is offline   Reply With Quote
Old 16th March 2011, 14:26   #214  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,484
Quote:
Originally Posted by dvdboy View Post
Despite having successfully encoded Blu-ray streams with x264 before, all of my attempts since Friday have produced "buffer underrun" errors in both Scenarist BD 5.1.3 and 5.2.

I've tried using both MeGUI and the commandline directly:

Open GOP



Closed GOP



The reason I (tried) to add the --profile high lines, was I was concerned that the streams were being incorrectly flagged as Main Profile.

The input file is a Quicktime via QTInput.

x264 core:114 r1913 5fd3dce

Just noticed a mismatch in the vbv maxrate on each pass, so I will run another test.
During encoding you change maxrate to 38000 for 40000 Kbps between first and second in your profil ... ???

IMO change maxrate at 35000 for mux compatibility (main stream PCM 5.1 and secondary stream AC3 5.1 ~ 5 Mbps)

With average near max it's perhaps better to make 3 pass for better HRD compatibility and peak bitrate quality.
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 16th March 2011, 15:23   #215  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
Quote:
Originally Posted by dvdboy View Post
1080i30 (29.97). Audio is exported WAV via Quicktime.
Make sure the framerate x264 reports is 30000/1001 and not anything else.

PM if you want to post any non-public information.
kieranrk is offline   Reply With Quote
Old 18th March 2011, 03:03   #216  |  Link
Rudde
Registered User
 
Join Date: Oct 2009
Posts: 13
Hey, I'm building a FreeBSD server and was wondering if there is any x264 build for FreeBSD that actively get updated?
Rudde is offline   Reply With Quote
Old 21st March 2011, 16:45   #217  |  Link
dvdboy
Registered User
 
Join Date: Mar 2003
Posts: 191
@kieranrk @sagittaire

Thanks for the responses, sorry for not replying. I've been doing a number of tests with small pieces of footage that I felt happy posting samples from, but they all muxed in Scenarist fine! I then substituted the input in my 'good' commandline with the source material I was having issues with above, and this failed to mux.

Now this footage is side-by-side 3D footage, and I assume x264 doesn't 'care' about the contents of the footage, but to confirm I stretched the left eye back out to 1920, but it still failed. I kicked off a full program, which I haven't had a chance to drop into Scenarist yet.

@Saggitaire - yeah I noticed the mismatched max values and corrected that in my subsequent tests. I'll try both 3-pass and a lower max bitrate, although I though I was being quite conservative with 28Mbps Average, 38Mbps Max...
@kieranrk - I will give that a go in case the footage is funky - I assume a AssumeFPS line in the AVISynth will do the trick?

Many thanks for your help.
dvdboy is offline   Reply With Quote
Old 2nd April 2011, 08:15   #218  |  Link
pepelugil
Registered User
 
Join Date: Jul 2010
Posts: 37
I have some of these "1080i25" blu-rays, that have frames encoded progressively but to be standard compliant are flagged as interlaced and I want to backup them on BD-25.

I've added/changed these settings from my usual 100% 23,976 blu-ray compliant backups: --no-interlaced --fake-interlaced --keyint 25 --fps 25000/1000

Scenarist correctly accepts and muxes the resulting x264 stream without any error, but MediaInfo says that the resulting m2ts has 25 fps progressive while the original is correctly detected as 25fps MBAFF.

Do I have to worry about my 100% blu-ray compliant 1080i25 backups using x264 with the settings I'm using?

Greetings
pepelugil is offline   Reply With Quote
Old 2nd April 2011, 10:36   #219  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by pepelugil View Post
MediaInfo says that the resulting m2ts has 25 fps progressive while the original is correctly detected as 25fps MBAFF.
Then the original is MBAFF and not fake-interlaced. With x264 the latter is significantly more efficient, at least until we get adaptive MBAFF.

Quote:
Do I have to worry about my 100% blu-ray compliant 1080i25 backups using x264 with the settings I'm using?
Nope. AFAIK, there shouldn't be problems with --fake-interlaced. The guide suggests --pic-struct with it.
nm is offline   Reply With Quote
Old 2nd April 2011, 13:31   #220  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
pic-struct is mandatory for interlaced, fake-interlaced or pulldowned streams and optional for progressive stream.
Your file is accepted by Scenarist but this is not safe. Scenarist made only some minor checks so you should use a BD Verifier if you want to be 100% sure.
mp3dom is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.