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 26th April 2010, 15:18   #1  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
x264 encoding and Bluray Burning

Hi all, I have a video, an MXF container with 1 mpeg2 4:2:2 1080i video and 8 linear PCM audio streams.

I want to make a Bluray Disc with the video stream and one audio stream.

I made a conversion of the audio stream from PCM to AC3 640kbps with eac3to.

After that I encoded the mpeg2 video (demuxed to an m2v the only video stream and then create an avisynth script) with meGUI and x264.

So I have a RAWAVC video.264 1080i and an audio.ac3 (2 channels, L R, 640 kbps).

Now, to burn it on a BRD playable by every Bluray player, I muxed audio and video with M2TS Muxer tool from MeGUI and after that, with TsMuxer, i created the BDMV structure with the m2ts file I created before, than burned to a BluRay Disc with Nero 10.

Now, what happens if I try to play this disc with a BRD Player?
With Oppo BDP-83 I cannot see anything but an error message saying "unknown disc".
With Pioneer BDP-V6000 I can see nothing if I set 1080p output (I know it's a 1080i but the other BRD 1080i can still be played with 1080p output) and on some monitors I see a strange video with 1080i output (the video seems to be stuttering every 2 seconds even if i work at 50Hz and the video is 25fps) and on other monitors i see a regular 1080i video.

Can someone help me?
My goal is to burn a BRD playable without issues by avery BRD Player on every FullHD TV/monitor.
Santa is offline   Reply With Quote
Old 26th April 2010, 17:55   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,410
Post the avisynth script and x264 command you used to encode the elementary stream.

A sample from your source couldn't hurt either.

~MiSfit
Blue_MiSfit is offline   Reply With Quote
Old 26th April 2010, 18:16   #3  |  Link
G_M_C
Registered User
 
Join Date: Feb 2006
Posts: 1,076
Just off the top of my head; Isn't 1080i Mpeg2 also part of the BD-specs ?? Couldn't you simply transmux the whole stream into a Bluray ?
(LPCM is part of the BD spec also). My first try would be to simply transmux the whole thing into M2TS'es / a Blu-ray project.
G_M_C is offline   Reply With Quote
Old 26th April 2010, 18:38   #4  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 713
4:2:2 isn't though G_M_C
kieranrk is offline   Reply With Quote
Old 26th April 2010, 22:52   #5  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
Quote:
Originally Posted by kieranrk View Post
4:2:2 isn't though G_M_C
yes, i re-encoded it to be 4:2:0 and to be smaller (original file was something like 25GB for 54m of movie...)

tomorrow i'll post the avisynth script and x264 command
Santa is offline   Reply With Quote
Old 27th April 2010, 00:28   #6  |  Link
sebazvideo
Registered User
 
Join Date: Sep 2009
Posts: 83
Quote:
Originally Posted by Santa View Post
Now, to burn it on a BRD playable by every Bluray player, I muxed audio and video with M2TS Muxer tool from MeGUI and after that, with TsMuxer, i created the BDMV structure with the m2ts file I created before, than burned to a BluRay Disc with Nero 10.
You didn't need to mux to M2TS to then load in TSMuxer, you can simply load the h.264 stream and then the audio stream and choose the Blu-Ray output.

Can you try to burn the resulting BDMV and CERTIFICATE folders to the BD-RE using ImgBurn? just make sure the file system is UDF 2.50 or 2.60 and that "Preserve Full Pathnames" is unchecked and "Recurse Subdirectories" is checked.
You can get it free at www.imgburn.com in case you didn't know.
sebazvideo is offline   Reply With Quote
Old 27th April 2010, 06:57   #7  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
Quote:
Originally Posted by sebazvideo View Post
You didn't need to mux to M2TS to then load in TSMuxer, you can simply load the h.264 stream and then the audio stream and choose the Blu-Ray output.

Can you try to burn the resulting BDMV and CERTIFICATE folders to the BD-RE using ImgBurn? just make sure the file system is UDF 2.50 or 2.60 and that "Preserve Full Pathnames" is unchecked and "Recurse Subdirectories" is checked.
You can get it free at www.imgburn.com in case you didn't know.
I know that software, I'll try to burn the disc with it asap.
Santa is offline   Reply With Quote
Old 27th April 2010, 14:48   #8  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
AVS script:
Code:
LoadPlugin("C:\Programmi\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\ffmpeg\video_demuxed.d2v", info=3)
LoadPlugin("C:\Programmi\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
ConvertToYV12()
x264 command:

Code:
program --level 4.1 --pass 2 --bitrate 15000 --stats ".stats" --threads 6 --deblock -3:-3 --interlaced --ref 4 --vbv-maxrate 2500 --me umh --partitions all --no-fast-pskip --aud --nal-hrd vbr --output "output" "input"
I'm going to re-encode the video and after that I'll try to burn the BRD with imgburn and let you know.
Santa is offline   Reply With Quote
Old 27th April 2010, 19:34   #9  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,410
Your x264 command looks a little wonky.

You specify 2 pass mode with a bitrate of 15mbps. Then you set maxrate to 2.5mbps. This doesn't make sense Did you miss a 0 in there? Also, you should specify --vbv-bufsize. 25000 should work for both, but I'd check the BluRay compliance threads to make sure you're doing things properly.

Also, in you avisynth script, you should add interlaced=true to ConvertToYV12. As-is, you're assuming progressive content, which will bork up your chroma
Blue_MiSfit is offline   Reply With Quote
Old 27th April 2010, 20:30   #10  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
thank you Blue_MiSfit I didn't noticed the vbv-bufsize option issue.
If I set it to 0 (default) would be correct? Or do I have to set it to 25000?

And thank you for the avs script correction
Santa is offline   Reply With Quote
Old 27th April 2010, 21:05   #11  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,410
You need to set a bufsize value for nal-hrd to work correctly, all of which is required for BluRay compliance.

~MiSfit
Blue_MiSfit is offline   Reply With Quote
Old 27th April 2010, 21:21   #12  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
Blu-Ray also requires the use of at least 4 slices ("--slices 4") when using level 4.1. As an alternative you may also set level to 4.0 (which you will probably not exceed anyways on DVDs).
sneaker_ger is offline   Reply With Quote
Old 28th April 2010, 08:20   #13  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
OK now my avs script look like this:

Code:
LoadPlugin("C:\Programmi\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\ffmpeg\video_demuxed.d2v", info=3)
LoadPlugin("C:\Programmi\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
ConvertToYV12(interlaced=true)
and x264 command line:

Code:
program --level 4.1 --pass 2 --bitrate 15000 --stats ".stats" --threads 6 --deblock -3:-3 --keyint 24 --min-keyint 2 --b-pyramid none --interlaced --ref 4 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 25000 --me umh --partitions all --no-fast-pskip --aud --nal-hrd vbr --output "output" "input"
I' re-starting the encode.
Please, let me know if i did something wrong.

Thank you very much,
Santa.
Santa is offline   Reply With Quote
Old 28th April 2010, 08:22   #14  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
according to the thread explaining the bluray compliance, I set b-pyramid to none and I changed the values for GOP
Santa is offline   Reply With Quote
Old 28th April 2010, 09:46   #15  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
Oh, totally forgot about b-pyramid (default was changed from "none" to "normal" recently, so not setting it explicitly was fine a until a few weeks ago). B-Pyramid "strict" (and "none") are allowed on Blu-Ray.
sneaker_ger is offline   Reply With Quote
Old 30th April 2010, 10:12   #16  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
It works now on Pioneer BDP-V6000 but Oppo BDP-83 says "Unknown Disc" again.
One strange thing is that I set interlaced both on avs script (as you can see above) and in x264 command line but if I check the encoded movie with mediainfo, I cannot see "Interlaced" but MBAFF:

Code:
General
ID                               : 1
Complete name                    : D:\bluray\BDMV\STREAM\00000.m2ts
Format                           : BDAV
Format/Info                      : Blu-ray Video
File size                        : 6.20 GiB
Duration                         : 54mn 8s
Overall bit rate                 : 16.4 Mbps
Maximum Overall bit rate         : 35.5 Mbps

Video
ID                               : 4113 (0x1011)
Menu ID                          : 1 (0x1)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Duration                         : 54mn 8s
Bit rate mode                    : Variable
Bit rate                         : 15.1 Mbps
Nominal bit rate                 : 15.0 Mbps
Maximum bit rate                 : 25.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : MBAFF
Bits/(Pixel*Frame)               : 0.291
Stream size                      : 5.70 GiB (92%)
Writing library                  : x264 core 94 r1564 a927654
Encoding settings                : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=tff / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / wpredp=0 / keyint=24 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=15000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=30000 / ip_ratio=1.40 / aq=1:1.00 / nal_hrd=vbr

Audio
ID                               : 4352 (0x1100)
Menu ID                          : 1 (0x1)
Format                           : AC-3
Format/Info                      : Audio Coding 3
Format_Settings_ModeExtension    : CM (complete main)
Duration                         : 54mn 8s
Bit rate mode                    : Constant
Bit rate                         : 640 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Stream size                      : 248 MiB (4%)
Language                         : Italian /  /
Santa is offline   Reply With Quote
Old 30th April 2010, 10:41   #17  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,024
MBAFF stays for MacroBlock Adaptive Frame/Field and it's a method to scan and detect when there's interlaced footage in the image so there's nothing wrong.
mp3dom is offline   Reply With Quote
Old 30th April 2010, 10:48   #18  |  Link
Santa
Registered User
 
Join Date: Jan 2010
Posts: 49
why the original source says TFF (top field first) and the encoded video says MBAFF and not TFF?
i red that --interlaced option in x264 is equal to --tff so it should result in a top field firs scan, isn't it?
Santa is offline   Reply With Quote
Old 30th April 2010, 11:31   #19  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,024
For original source you mean the mxf-mpeg2 4:2:2? MBAFF and PAFF (Picture Adaptive Frame/Field) are some of the new features introduced with h264 format.
mp3dom is offline   Reply With Quote
Old 30th April 2010, 11:33   #20  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by Santa View Post
why the original source says TFF (top field first) and the encoded video says MBAFF and not TFF?
Because MediaInfo doesn't read or report the field order for MBAFF-encoded H.264.

Quote:
i red that --interlaced option in x264 is equal to --tff so it should result in a top field firs scan, isn't it?
Yes.
nm 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 09:14.


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