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 17th June 2015, 04:20   #361  |  Link
2themax
Registered User
 
Join Date: Jan 2007
Posts: 62
Quote:
Originally Posted by Precomposed View Post
I analyzed the m2ts that Adobe Encore creates for a Blu-ray still image background and it is only 1 frame in duration, not 30 seconds. I completely understand that Blu-ray backgrounds need to be videos per the Blu-ray spec, even when they are just still images. This is why I wish to convert my still image (png) background to a single frame video (.264) using x264 or ffmpeg + libx264. I was wondering if there are any special settings I should be using to create a 1 frame .264 file that is Blu-ray compliant or will the normal settings of x264 be compliant for a single frame?
I answered that exact question 3 posts above. Use avisynth to feed x264 1 PNG.
2themax is offline   Reply With Quote
Old 24th January 2016, 08:47   #362  |  Link
kit90
Registered User
 
Join Date: Nov 2015
Posts: 11
x264 settings for timebased and browsable slideshow

In addition to movie applications (for which the x264 settings given in the first post are valid), Blu-ray also provides timebased and browsable slideshow applications, as given in the white papers (http://www.blu-raydisc.com/assets/Do...per_110712.pdf and http://www.blu-raydisc.com/assets/Do...per_150724.pdf). An example browsable slideshow is http://www.dvd-logic.com/downloads/e...DVDLOGICBS.ZIP. The Mediainfo report on BrowsableSlideshow.avc shows Format settings, GOP:N=1. Does anyone know the settings to create timebased and browsable slideshows with x264?

PS: In the first post, the maximum reference frames for 1080 is given as 4. However, this is valid only if b-pyramid is disabled. In the default case in MeGUI (b-pyramid=strict), it is 3.
Attached Files
File Type: txt BrowsableSlideshow.avc.txt (1.4 KB, 72 views)

Last edited by kit90; 24th January 2016 at 08:55.
kit90 is offline   Reply With Quote
Old 24th January 2016, 09:12   #363  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by kit90 View Post
PS: In the first post, the maximum reference frames for 1080 is given as 4. However, this is valid only if b-pyramid is disabled. In the default case in MeGUI (b-pyramid=strict), it is 3.
Using --ref 4 in x264 is totally fine for 1080p BluRay, even with b-pyramid. Note that MediaInfo's "ReFrames" is actually DPB size.
sneaker_ger is offline   Reply With Quote
Old 24th January 2016, 11:01   #364  |  Link
kit90
Registered User
 
Join Date: Nov 2015
Posts: 11
x264 settings for timebased and browsable slideshow

Quote:
Originally Posted by sneaker_ger View Post
Using --ref 4 in x264 is totally fine for 1080p BluRay, even with b-pyramid. Note that MediaInfo's "ReFrames" is actually DPB size.
1) Thanks. So if I specify these settings

--level 4.1 --bluray-compat --tune film --pass 2 --bitrate 20000 --stats ".stats" --keyint 24 --open-gop --ref 4 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --colorprim bt709 --transfer bt709 --colormatrix bt709 --sar 1:1

in x264 (which defaults to b-pyramid=strict), the actual number of reference frames is 4, even though MediaInfo reports

Format settings, ReFrames: 3 Frames

Is it correct?

2) Also, how can we enforce

Format settings, GOP: N=1

to create timebased and browsable slideshows in x264? This is the setting given in the MediaInfo report of the browsable slideshow AVC file in my previous post.
kit90 is offline   Reply With Quote
Old 26th January 2016, 09:34   #365  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
For the Ref frames, it's correct.
For the second part, personnaly, i don't know.
jpsdr is offline   Reply With Quote
Old 25th February 2016, 23:33   #366  |  Link
Precomposed
Registered User
 
Join Date: Jan 2011
Location: Southern California
Posts: 13
PS4 Playback Issue

Having an issue with PS4 playback only. Video appears choppy (like every other frame is being displayed) and the image quality is not as good as it should be.

Here are the settings from x264:

x264 --input-res 1920x1080 --fps 24000/1001 --crf 15 --preset slow --tune film --bluray-compat --vbv-maxrate 20000 --vbv-bufsize 20000 --level 4.1 --keyint 24 --open-gop --b-pyramid strict --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1

Muxing is performed with latest version of BD Author (DVDLogic) which muxes to spec.

Muxed video stream passes Sony BD verifier with flying colors, and the disc works fine on every other player, including PS3. Does anyone know if PS4 has problems with b-pyramids? Or is there something else going on here?
Precomposed is offline   Reply With Quote
Old 26th February 2016, 01:18   #367  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
Quote:
Originally Posted by Precomposed View Post
Having an issue with PS4 playback only. Video appears choppy (like every other frame is being displayed) and the image quality is not as good as it should be.

Here are the settings from x264:

x264 --input-res 1920x1080 --fps 24000/1001 --crf 15 --preset slow --tune film --bluray-compat --vbv-maxrate 20000 --vbv-bufsize 20000 --level 4.1 --keyint 24 --open-gop --b-pyramid strict --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1

Muxing is performed with latest version of BD Author (DVDLogic) which muxes to spec.

Muxed video stream passes Sony BD verifier with flying colors, and the disc works fine on every other player, including PS3. Does anyone know if PS4 has problems with b-pyramids? Or is there something else going on here?
DVDLogic muxer had known issue in the past with b-pyramid. I don't know if they ever fixed it.



Quote:
Originally Posted by colinhunt View Post
Yes, it is. I just got confirmation from DVD Logic; their muxer has a problem with b-pyramids. Bad news for me, but it's good to know where the problem was, regardless.

Thank you very much indeed to all who took time to reply & comment.
poisondeathray is offline   Reply With Quote
Old 26th February 2016, 01:28   #368  |  Link
Precomposed
Registered User
 
Join Date: Jan 2011
Location: Southern California
Posts: 13
Quote:
Originally Posted by poisondeathray View Post
DVDLogic muxer had known issue in the past with b-pyramid. I don't know if they ever fixed it.
DVDLogic did fix the muxer issue with b-pyramids. I've been working closely with them. It now muxes b-pyramids to spec and passes Sony BD verifier.

Before the muxing issue was fixed with their software, this choppy issue was happening on PS3 as well and the stream was not passing verification. Now it is passing verification, and working great on PS3 and other players. This leads me to believe there is an issue with PS4 not supporting b-pyramids, though I find it hard to believe no other commercial releases use b-pyramids. I do not see an issue with any other movies on PS4. The only difference I can see is that my videos are playing from a BD-R, and commercial releases are from a pressed disc.
Precomposed is offline   Reply With Quote
Old 26th February 2016, 19:01   #369  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by Precomposed View Post
DVDLogic did fix the muxer issue with b-pyramids. I've been working closely with them. It now muxes b-pyramids to spec and passes Sony BD verifier.

Before the muxing issue was fixed with their software, this choppy issue was happening on PS3 as well and the stream was not passing verification. Now it is passing verification, and working great on PS3 and other players. This leads me to believe there is an issue with PS4 not supporting b-pyramids, though I find it hard to believe no other commercial releases use b-pyramids. I do not see an issue with any other movies on PS4. The only difference I can see is that my videos are playing from a BD-R, and commercial releases are from a pressed disc.
B-pyramids may require a longer lookahead read, so if you have dodgy BD-R media, some read errors might cause a problem there.

But the fact that a muxing fix fixed things suggests that commercial discs were created using a different muxer. I certainly have always used B-pyramid strict with any BD encodes I've done. Note the BD spec requires that Strictly Hierarchical Pyramids be used.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 26th February 2016, 19:09   #370  |  Link
Precomposed
Registered User
 
Join Date: Jan 2011
Location: Southern California
Posts: 13
Quote:
Originally Posted by benwaggoner View Post
B-pyramids may require a longer lookahead read, so if you have dodgy BD-R media, some read errors might cause a problem there.

But the fact that a muxing fix fixed things suggests that commercial discs were created using a different muxer. I certainly have always used B-pyramid strict with any BD encodes I've done. Note the BD spec requires that Strictly Hierarchical Pyramids be used.
What about the vbv buffer? It is my understanding it should never exceed the max rate. Do you think a vbv-bufsize and vbv-maxrate both set at 20000 impact the PS4's ability to load the frames properly?
Precomposed is offline   Reply With Quote
Old 26th February 2016, 19:20   #371  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by Precomposed View Post
What about the vbv buffer? It is my understanding it should never exceed the max rate. Do you think a vbv-bufsize and vbv-maxrate both set at 20000 impact the PS4's ability to load the frames properly?
Those are within spec. But certainly in the DVD-R era we found older players needed peak bitrates significantly below spec when using writable media.

I'm a fan of the Level 4.0 single-slice 2-sec GOP --vbv-maxrate 15000 --vbv-bitrate <=15000 mode encoding for your case. With x265, most content will look good at that bitrate, and being able to use a 2-sec GOP helps quality/efficiency significantly. The specifics should be upthread in various places.

I've been able to get a 2-hour move onto DVD-9 media this way, as an experiment, back when BD-R was expensive and the per-title encryption for replicated BD discs was way high for short-run titles. You could stamp a DVD-9 with a BD payload without needing encryption, and at a much lower price.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd June 2017, 21:20   #372  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
I just realized the images are stored externally. Better have backup:
Attached Images
     
sneaker_ger is offline   Reply With Quote
Old 6th June 2017, 01:20   #373  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
Thank you for this guide.
I gotta make a Bluray out of a PAL XDCAM MXF file and I'm gonna use Avisynth and x264 this time (not to bother AVID).

I need the maximum compatibility and I think these settings should be fine:

Code:
avs4x264mod.exe "AVS Script.avs" --x264-binary "x264.exe" --bitrate 25000  --preset medium --ref 4 --level 4.1 --profile High --vbv-bufsize 25000 --vbv-maxrate 25000 --overscan show --keyint 25 --slices 4 --sar 1:1  --videoformat PAL --tff --nal-hrd vbr --bluray-compat --colormatrix bt709 --transfer bt709 --colorprim bt709 --range tv --log-level info --thread-input --opencl --output raw_video.h264

Can you confirm they are fine? Any suggestions?
FranceBB is offline   Reply With Quote
Old 6th June 2017, 08:18   #374  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by FranceBB View Post
Thank you for this guide.
I gotta make a Bluray out of a PAL XDCAM MXF file and I'm gonna use Avisynth and x264 this time (not to bother AVID).

I need the maximum compatibility and I think these settings should be fine:

Code:
avs4x264mod.exe "AVS Script.avs" --x264-binary "x264.exe" --bitrate 25000  --preset medium --ref 4 --level 4.1 --profile High --vbv-bufsize 25000 --vbv-maxrate 25000 --overscan show --keyint 25 --slices 4 --sar 1:1  --videoformat PAL --tff --nal-hrd vbr --bluray-compat --colormatrix bt709 --transfer bt709 --colorprim bt709 --range tv --log-level info --thread-input --opencl --output raw_video.h264

Can you confirm they are fine? Any suggestions?
What is your script?
For blu-ray compliant x264 settings you find references here:
http://forum.doom9.org/showpost.php?...19&postcount=1
https://sites.google.com/site/x264bluray/

Last edited by Sharc; 6th June 2017 at 08:23.
Sharc is offline   Reply With Quote
Old 6th June 2017, 09:06   #375  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
You miss the following to be sure :
Code:
--b-pyramid strict --min-keyint 1 --mvrange 511 --bframe 3 --aud
I'm not sure if --b-pyramid strict is included with the --bluray-compat, so, it will not hurt to add it.
As you're using --tff it means that your video is not progressive, in that case, you also need :
Code:
--pic-struct
You don't need this last one for progressive video.
If you want optimal result, you can add :
Code:
--open-gop
And, you can also go up to these values if you want :
Code:
--vbv-maxrate 40000 --vbv-bufsize 30000
jpsdr is offline   Reply With Quote
Old 6th June 2017, 10:56   #376  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by jpsdr View Post
I'm not sure if --b-pyramid strict is included with the --bluray-compat
It is, as are --min-keyint 1, --bframes 3 and --aud. (pyramid and bframes as min(x,y)). Special --mvrange isn't necessary either.

Quote:
Originally Posted by jpsdr View Post
As you're using --tff it means that your video is not progressive, in that case, you also need
--pic-struct is implied by --tff/--bff/--fake-interlaced.

/edit: Oh, he does want to make a Blu-ray out of XDCAM MXF. I didn't read correctly. Personally, I'd just use the examples linked by Sharc. Maybe even use a good deinterlacer like QTGMC to go 720p50.

--sar 1:1 and bt709 are not allowed for PAL. See start post.

Last edited by sneaker_ger; 6th June 2017 at 11:07.
sneaker_ger is offline   Reply With Quote
Old 6th June 2017, 18:16   #377  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by sneaker_ger View Post
It is, as are --min-keyint 1
Is my dim recollection of --min-keyint 2 being requires/preferable incorrect?

Also, since he's only using 25 Mbps vbv-bufsize/maxrate, he might as well use Level 4.0 and eliminate --slices 4.

Slices are only required with Level 4.1.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 6th June 2017, 18:23   #378  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by benwaggoner View Post
Is my dim recollection of --min-keyint 2 being requires/preferable incorrect?
It would have always been required by the specs but the x264 developers only noticed it in 2012.
http://git.videolan.org/?p=x264/x264...45ff1c1486ad9a
sneaker_ger is offline   Reply With Quote
Old 6th June 2017, 19:34   #379  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
Quote:
Originally Posted by sneaker_ger View Post
--sar 1:1 and bt709 are not allowed for PAL. See start post.
I thought the video was 1080p.
If video is indeed 576i, that's a total another story.
A lot of optimization can be done indeed.
Reduce the level to 4.0 to avoid slices, and reduce buffer/bitrate max to 15000 to have 2s GOP length.
Buffer and bitrate max at 15000 is very largely enough to properly encode a 576i video. This will allow a max keyint of 50, which will produce even better results.
i would suggest for 576i :
Code:
--profile high --level 4.0 --vbv-maxrate 15000 --vbv-bufsize 15000 --keyint 50 --ref 6 --open-gop
No need for slices. And as video is only 576i, you can increase ref frames to 6.
The sar is according the video, is it a 4/3 or 16/9 video ?
4/3, you have to use :
Code:
--sar 12:11
16/9, you have to use :
Code:
--sar 16:11
The color for pal 576i is :
Code:
--colorprim bt470bg --transfer bt470bg --colormatrix bt470bg --videoformat pal

Last edited by jpsdr; 6th June 2017 at 19:46.
jpsdr is offline   Reply With Quote
Old 8th June 2017, 00:14   #380  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
It's 1080i, it's not 720p.
My source it's an XDCAM 1080i 50Mbit/s 4:2:2 yv16, interlaced 25fps (50i), 4 audio tracks: CH.1-2 PCM Stereo German Full Mix, CH.3-4 PCM Stereo Music & Effects. It's really interlaced, it's not just flagged as interlaced and I would like to keep it that way.

Source:

Code:
General

Complete name :	Filemaster.mxf
Format :	MXF
Commercial name :	XDCAM HD422
Format version :	1.2
Format profile :	OP-1a
Format settings :	Closed / Complete
File size :	12.0 GiB
Duration :	28mn 56s
Overall bit rate :	59.2 Mbps
Encoded date :	2017-06-03 20:21:00.208
Writing application :	Omneon Inc. Omneon Media Subsystem 6.4.1.0.1
Writing library :	Omneon Media Api (linux)

Video

ID :	2
Format :	MPEG Video
Commercial name :	XDCAM HD422
Format version :	Version 2
Format profile :	4:2:2@High
Format settings, BVOP :	Yes
Format settings, Matrix :	Custom
Format settings, GOP :	M=3, N=12
Format settings, picture structure :	Frame
Format settings, wrapping mode :	Frame
Codec ID :	0D01030102046101-0401020201040300
Duration :	28mn 56s
Bit rate :	50.0 Mbps
Width :	1 920 pixels
Height :	1 080 pixels
Display aspect ratio :	16:9
Frame rate :	25 fps
Standard :	Component
Color space :	YUV
Chroma subsampling :	4:2:2
Bit depth :	8 bits
Scan type :	Interlaced
Scan order :	Top Field First
Compression mode :	Lossy
Bits/(Pixel*Frame) :	0.965
Time code of first frame :	00:00:00:00
Time code source :	Group of pictures header
Stream size :	10.1 GiB (84%)
Color primaries :	BT.709
Transfer characteristics :	BT.709

Audio #1

ID :	3
Format :	PCM
Format settings, Endianness :	Little
Format settings, wrapping mode :	Frame (BWF)
Codec ID :	0D01030102060100
Duration :	28mn 56s
Bit rate mode :	Constant
Bit rate :	2 304 Kbps
Channel(s) :	2 channels
Sampling rate :	48.0 KHz
Frame rate :	25 fps
Bit depth :	24 bits
Stream size :	477 MiB (4%)

Audio #2

ID :	4
Format :	PCM
Format settings, Endianness :	Little
Format settings, wrapping mode :	Frame (BWF)
Codec ID :	0D01030102060100
Duration :	28mn 56s
Bit rate mode :	Constant
Bit rate :	2 304 Kbps
Channel(s) :	2 channels
Sampling rate :	48.0 KHz
Frame rate :	25 fps
Bit depth :	24 bits
Stream size :	477 MiB (4%)

Audio #3

ID :	5
Format :	PCM
Format settings, Endianness :	Little
Format settings, wrapping mode :	Frame (BWF)
Codec ID :	0D01030102060100
Duration :	28mn 56s
Bit rate mode :	Constant
Bit rate :	2 304 Kbps
Channel(s) :	2 channels
Sampling rate :	48.0 KHz
Frame rate :	25 fps
Bit depth :	24 bits
Stream size :	477 MiB (4%)

Audio #4

ID :	6
Format :	PCM
Format settings, Endianness :	Little
Format settings, wrapping mode :	Frame (BWF)
Codec ID :	0D01030102060100
Duration :	28mn 56s
Bit rate mode :	Constant
Bit rate :	2 304 Kbps
Channel(s) :	2 channels
Sampling rate :	48.0 KHz
Frame rate :	25 fps
Bit depth :	24 bits
Stream size :	477 MiB (4%)

Other #1

ID :	1-Material
Type :	Time code
Format :	MXF TC
Time code of first frame :	10:00:00:00
Time code settings :	Material Package
Time code, striped :	Yes

Other #2

ID :	1-Source
Type :	Time code
Format :	MXF TC
Time code of first frame :	10:00:00:00
Time code settings :	Source Package
Time code, striped :	Yes
My Avisynth Script:

Code:
video=FFVideoSource("Filemaster.mxf")
ch1=WAVSource("ch1.wav")
ch2=WAVSource("ch2.wav")
audio=MergeChannels(ch1, ch2)
AudioDub(video, audio)
Normalize(0.89, show=false)
Converttoyv12(interlaced=true)
f3kdb(range=15, Y=80, Cb=60, Cr=60, grainY=0, grainC=0, keep_tv_range=True, input_depth=8, output_depth=8)
My "new" x264.bat (I added jpsdr suggestions):

Code:
avs4x264mod.exe "AVS Script.avs" --x264-binary "x264.exe" --bitrate 25000  --preset medium --ref 4 --level 4.1 --profile High --vbv-bufsize 40000 --vbv-maxrate 30000 --overscan show --keyint 25 --slices 4 -b-pyramid strict --min-keyint 1 --mvrange 511 --bframe 3 --aud --sar 1:1  --pic-struct --videoformat PAL --interlaced --tff --nal-hrd vbr --bluray-compat --colormatrix bt709 --transfer bt709 --colorprim bt709 --range tv --log-level info --thread-input --opencl --output raw_video.h264
Quote:
If you want optimal result, you can add :
--open-gop
Uhm... I noticed that XDCAM files require closed GOP: M=3, N=12. I'm gonna encode a Bluray, which is different and in H.264, so it's different, but is --open-gop going to be a problem? Will I benefit from it without affecting compatibility?

Quote:
Maybe even use a good deinterlacer like QTGMC
I know QTGMC, it's my first favorite deinterlacer (the second one is tdeint). Anyway, my source is 1080i, is it really worth deinterlacing? I don't think 1920x1080 25fps progressive is allowed by Bluray, is it?

Quote:
--sar 1:1 and bt709 are not allowed for PAL. See start post.
Ok. --sar 1:1 it's the one for 1920x1080, right? And BT.709 it's the colormatrix for HD contents, like my source. Also, it seems that it's also suggested as option here: https://sites.google.com/site/x264bluray/home/1080i
Are you sure it's not supported?

Last edited by FranceBB; 8th June 2017 at 00:20.
FranceBB 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 10:09.


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