View Full Version : x264 Settings for AVCHD 2.0 compliant file, playback?
Bordo32
9th March 2021, 15:45
Curious if anyone has figured out x264 settings to encode 1080 50p/60p video that would be AVCHD 2.0 compliant?
AVCHD 2.0 is also called AVCHD Progressive and according to specification is supporting 1080 50p/60p.
I was experimenting with x264 settings using Hybrid, MeGUI, and no luck.
I am using TMPGEnc Authoring Works or Smart Rendered to author AVCHD Progressive file structure.
Their Clip Checker shows that x264 encoded file is not AVCHD Progressive compliant, error message:
“Does not meet the AVCHD Progressive PAL standard”:
https://i.loli.net/2021/03/04/qXlAabURGYvLIhi.jpg
I did an experiment with my camcorder’s 1080 60p file that is AVCHD 2.0 compliant.
I demuxed it with tsMuxer, re-muxed it back. It resulted in a good AVCHD 2.0 compliant file.
It means the problem is not the muxer, it has to be x264 encoded video file parameters.
I read that TMPGEnc uses same x264 encoder, but those guys somehow know how to set it up for AVCHD 2.0 compliant file.
Richard1485
9th March 2021, 16:37
It seems that the profile is correct (High@Level 4.2) but the stream is not seen as HDMV compatible. Are you encoding an elementary stream with MeGUI? Try running it through tsMuxeR and ensuring that "Generate HDMV compatible TS" is checked under the "General" tab.
EDIT: There is a summary of the thread findings in post #36 (https://forum.doom9.org/showpost.php?p=1937909&postcount=36).
SeeMoreDigital
9th March 2021, 16:50
The AVCHD specification that was developed for camcorders utilises a very different 'file structure' to the Blu-ray disc specification...
The last Panasonic AVCHD camcorder I had that could shoot at 50p, created file structures that looked like this: -
https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/AVCHD_actual_file_structure.svg/570px-AVCHD_actual_file_structure.svg.png
Shame it got stolen :(
Bordo32
9th March 2021, 17:07
Richard1485, thanks for advising.
Yes, I am aware about "Generate HDMV compatible TS" option in tsMuxer, it is checked (I was also trying to unchecked, and checked it back).
I also did an experiment with my camcorder’s 1080 60p file that is AVCHD 2.0 compliant.
I demuxed it with tsMuxer, re-muxed it back. It resulted in a good AVCHD 2.0 compliant file.
It means the problem is not the muxing, it has to be x264 encoded video file parameters.
SeeMoreDigital, agree, the AVCHD structure is different than BDMV, but the problem is that my m2ts (or mts) file that I want to use with TMPGEnc Authoring SW to create that AVCHD Progressive structure, is not AVCHD 2.0 compliant.
TMPGEnc knows how to properly create a correct AVCHD 2.0 structure, the problem is to get the file it self.
To simplify. I want to create by my self, using x264, that AVCHD 2.0 compliant file that camcorders do, as well as TMPGEnc can encode that file.
I read that TMPGEnc uses same x264 encoder, but those guys somehow know how to set it up for AVCHD 2.0 compliant file.
Richard1485
9th March 2021, 17:24
It means the problem is not the muxing, it has to be x264 encoded video file parameters.
Yes, I read this, but nothing is flagged up by the clip checker apart from HDMV compatibility, so I can't see which of x264's settings might need adjusting . All that your experiment demonstrates is that tsMuxeR is not introducing a problem in the file from your camcorder, but it's not clear what kind of file you are outputting from MeGUI and whether or not you are running it through tsMuxeR before importing it into TMPGEnc Authoring Works. Which x264 settings have you already tried?
SeeMoreDigital
9th March 2021, 18:44
@Bordo32,
I forgot to ask... What make and model of playback device are you using?
Bordo32
9th March 2021, 18:45
Richard1485, The muxing is done by tsMuxer in Hybrid. I am encoding/outputting m2ts file.
That file goes in to Authoring Works.
By making demux/remux experiment using camcorder’s file I wanted to check if there is a muxing problem with tsMuxer that Hybrid uses.
For x264, as starting point I was using settings that are similar to BluRay compliant but changing Level to 4.2, Setting Buffer size, Max Fill Rate to 24,000.
Command Line from Hybrid:
x264 --pass 1 --bitrate 22500 --profile high --level 4.2 --ref 1 --keyint 50 --min-keyint 1 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 2 --sync-lookahead 12 --cplxblur 20.0 --qcomp 0.60 --qblur 0.5 --mbtree --rc-lookahead 25 --ipratio 1.4 --pbratio 1.3 --chroma-qp-offset 0 --qpmin 0 --qpmax 69 --qpstep 4 --partitions none --no-8x8dct --8x8dct --me dia --mvrange -1 --subme 2 --cabac --trellis 0 --weightp 0 --aq-mode 1 --aq-strength 1.00 --nal-hrd cbr --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --stats "C:\Users\xxx.stats" --demuxer raw --input-res 1920x1080 --input-csp i420 --input-range tv --input-depth 8 --fps 50/1 --output-csp i420 --output-depth 8 --output NUL -
x264 --pass 2 --bitrate 22500 --profile high --level 4.2 --ref 4 --keyint 50 --min-keyint 1 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 2 --sync-lookahead 12 --cplxblur 20.0 --qcomp 0.60 --qblur 0.5 --mbtree --rc-lookahead 25 --ipratio 1.4 --pbratio 1.3 --chroma-qp-offset 0 --qpmin 0 --qpmax 69 --qpstep 4 --partitions i4x4,i8x8,p8x8,b8x8 --8x8dct --me umh --merange 16 --mvrange -1 --subme 9 --cabac --trellis 2 --psy-rd 1.00:0.00 --weightp 0 --aq-mode 1 --aq-strength 1.00 --vbv-maxrate 24000 --vbv-bufsize 24000 --nal-hrd cbr --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --colormatrix bt709 --stats "C:\Users\xxx.stats" --demuxer raw --input-res 1920x1080 --input-csp i420 --input-range tv --input-depth 8 --fps 50/1 --output-csp i420 --output-depth 8 --output "C:\Users\xxx.264" -
Bordo32
9th March 2021, 18:49
My HW playback device and also as media player is OPPO BDP-95.
It plays BDAV authored on DVD media, as well as on BD-R.
SeeMoreDigital
9th March 2021, 19:50
My HW playback device and also as media player is OPPO BDP-95.That's a very solid and reliable hardware player ;)
Bordo32
9th March 2021, 20:39
Yes it is. Now I need to learn how to encode with x264 my own 1080 50p files (with the same properties as camcorder creates) that would be AVCHD 2.0 compliant and I can authore file structure without re-encoding.
Richard1485
9th March 2021, 21:06
For x264, as starting point I was using settings that are similar to BluRay compliant but changing Level to 4.2, Setting Buffer size, Max Fill Rate to 24,000.
Good idea. Try changing --b-pyramid normal to --b-pyramid strict or --b-pyramid none. I'd use --b-pyramid none. Also, try adding --bluray-compat. Set the AR to 16:9 in tsMuxeR.
SeeMoreDigital
9th March 2021, 21:29
Hmmm....
Many years ago now, I seem to remember having problems creating a 25.000fps spec compliant Blu-ray disc, which was odd because I had no problems creating a 23.976fps spec compliant Blu-ray disc.
Sadly, I can't remember what I had to do to resolve the issue!
Richard1485
9th March 2021, 21:45
Oh, and try adding --slices 4.
Bordo32
9th March 2021, 22:41
I changed --b-pyramid to - none. Also set AR to 16:9 in tsMuxeR. It did not help.
Your suggested to try adding --bluray-compat might be the key option to try. I can not check this with Hybrid since in order to have --bluray-compat it requires to set Hardware Restrictions to BluRay/AVCHD and it automatically disables 50p/60p video, also it does not allow to use Level 4.2.
I might need to ask Selur to make an experimental version that would allow to use those settings together.
MeGUI also does not allow to set --bluray-compat if I set Level 4.2.
Richard1485
9th March 2021, 23:05
Your suggested to try adding --bluray-compat might be the key option to try. I can not check this with Hybrid since in order to have --bluray-compat it requires to set Hardware Restrictions to BluRay/AVCHD and it automatically disables 50p/60p video, also it does not allow to use Level 4.2.
Come to think of it, that does make sense, because 108050/60p is not in spec for BD. I was hoping that --bluray-compat might trigger a setting that's being overlooked, but forget that idea.
The thing is that there's no guide that does for AVCHD 2.0 what x264bluray.com does for blu-ray, so I'm referring to this page (http://www.avchd-info.org/format/index.html) and trying to adjust the settings based on experience with x264 encoding for blu-ray. Your stream looks as if it ought to meet the requirements for AVCHD 2.0 already, but sometimes authoring software is fussier than it strictly needs to be about what it accepts. If TMPGEnc does use x264, as you've read, it might write the settings to the metadata. Have you opened a stream encoded by TMPGEnc in MediaInfo?
Bordo32
9th March 2021, 23:19
I was also trying suggested adding --slices 4. I set Multi-slice to Restricted by Slice per frame, setting 4 slices.
It did not help.
Agree, --bluray-compat might trigger the right setting. But how Hybrid and MeGUI are constructed there is no separate --bluray-compat setting their GUIs.
In order to set --bluray-compat need to use predefined target play back devices. It requires to set BluRay, and that automatically restrics level to 4.1 and does not allow to use 50p/60p file. Need custom/new experimental target "play back devices" setting "AVCHD 2.0" that would unlock/unlink 50p/60p and Levels.
It might be done by using x264 as the command line, but that is way too much effort requires :)
Hybrid encoded file (not AVCHD 2.0 compliant):
https://i.loli.net/2021/03/05/UjftxRsmOF72BYX.jpg
TMPGEnc encoded file (it is AVCHD 2.0 compliant). MediaInfo just does not have enough information. No encoder related information:
https://i.loli.net/2021/03/10/Hn5cKXIuztigNhZ.jpg
For example this the info from 1080 60p camcorder's file that is AVCHD 2.0 compliant and TMGENc takes it without red flags and authors without reencoding:
https://i.loli.net/2021/03/05/cRUMZw2dIr6sLJe.jpg
Looks like only TMPGEnc (a Japaneses company) has SW tools to get this done right and supports other Japanese companies that manufacture HD camcorders. It might be something special in the header of Japanese camcorder file that TMGEnc recognizes and gives a green light to accept as compliant.
Richard1485
9th March 2021, 23:34
It might be done by using x264 as the command line, but that is way too much effort requires :)
It's not that much effort. I only ever use the command line. Give it a go. You already have all the parameters to input.
I opened TMPGEnc encoded file with MediaInfo. It just does not have enough information.
That's a pity. TMPGEnc is definitely using x264 though, so it should be possible to reproduce the settings.
By the way, why are you using Hybrid in this workflow? If you are filtering a video in AviSynth, you should be able to render a lossless file that TMPGEnc will open and be guaranteed a stream that the authoring program will accept.
Emulgator
9th March 2021, 23:42
Good suggestions, and BTW, If you have TAW already (I have used 4 and 5) you already get the best tailored x264 inside.
Just The Master has disabled the encoder information for his private builds...
Once I had to run a project in TAW I saw no need to encode externally, the stream looked perfect for those 27,5Mbps.
I even stole a few x264 parameters from there. was it a chroma QP offset like -2, forgot...
P.S. Look for 0,5sec GOP, Sony 2 refs, IIRC Panasonic 4 refs (was wrong, 2 refs, see below !)
Will inspect some GH5 clips soonish.
AVC 1920x1080x50p CABAC GOP M=3, N=12 -> 0,5s ! 2 refs, max. 27.5Mbps, overall 28.0Mbps
Richard1485
9th March 2021, 23:47
Bordo, I've just noticed that in the MediaInfo logs, the 60fps file from TMPGEnc has Reference frames: 2 whereas your 50fps file has Reference frames: 4. Try setting --ref 2.
Bordo32
9th March 2021, 23:59
Re. using Hybrid, that was the easy work around idea to not play with multiple entries-lines in Avisynth, but rather use convenient GUI in Hybrid and set all the filters with "one click".
At first I just wanted to import my camcorder files to TMPGEnc Authoring Works (or other simple editor) and encode as is, let that SW tool to do deinterlacing and resizing.
But QTGMC deinterlacer produces so much betetr results that I switched to Hybrid.
I am converting VHS tapes, DV avi from camcorder and need to run QTGMC deinterlacer, NNEDI3 upscaler/resizer to 1920x1080, some noise filtering.
It would be many many lines in Avisynth and not so quick experimenting flow changing settings.
The ideal situation would be to use Hybrid and export/render using HuffYUV loseless, and as you suggested encode it to x264 with TMGENc.
But Hybrid does not have HuffYUV and Selur will not add that support.
I might need to go the long route, use Avisynth for filtering, using VirtualDub save/render file as HuffYUV and encode resulting lossless file with TMPGEnc.
Richard1485
10th March 2021, 00:47
Understood. Can Hybrid do x264 lossless? x264 lossless -> TMPGEnc
Bordo32
10th March 2021, 04:26
More testing done.
• I was trying 2 Reference Frames. Actually in order to see 2 ref Frames from MediaInfo, I need to set 1 Ref Frame under x264 settings. But any way, it did not help.
• Was also trying 3 Ref Frames (and 4 Ref Frames as well) and 16 B-Frames (just to see how more extreme settings make change), it did not help.
• Also trying to set Max GOP size to 100, it did not work since only 100 Fields is allowed for AVCHD 2.0 per TMPGEnc error message in the Clip Checker. It means the shortest GOP that is allowed is 1 sec (for 50fps video).
• Was trying 2 sec GOP, Max GOP 25, it did not help.
• Also Min GOP= 25, Max GOP =25, other Min, Max GOP, ref Frames, B-Frames, variations. It did not help.
• Also enabling Open GOP, it did not help either.
• Unchecked Medium Restrictions for BluRay, it did not help.
Well, not so simple, it has to be something different.
MediaInfo for my 1080 60p camcorder file (that is AVCHD 2.0 compliant) shows Format Setting, GOP: M= 1 N=15.
I do not know how to translate M and N numbers in to max Number of Ref Frames, Min, Max GOP size and etc.
What would be x264 Frames settings to get those M and N numbers?
• That is great Richard1485’ idea, I made a quick experiment using lossless x264 setting:
CRF 1-pass, Quantization factor 1 (CRF = 1). Encoded file is 24.5MBps, only by 7-8% larger comparing to using Specific Bitrate 2-pass and 22Mbps encoded file.
Need to play more and compare video quality for losseless x264 that is re-encode with TMPGENc compare to regular way encoded X264 with Hybrid.
I sent an email to TMPGEnc support team. Will see if they will be willing to expose their secret setting :)
Worst case I will need to do everything in the old fashion slow way, manually using Avisynth, opening avs file in VirtualDub, save file as HuffYUV and encode resulting lossless file with TMPGEnc.
Would VirtualDub 1.9.11 will take avs script file from Avisynth with 1080 50p video and using HuffYUV properly encode loselessly, no color space change and etc..?
poisondeathray
10th March 2021, 05:14
MediaInfo for my 1080 60p camcorder file (that is AVCHD 2.0 compliant) shows Format Setting, GOP: M= 1 N=15.
I do not know how to translate M and N numbers in to max Number of Ref Frames, Min, Max GOP size and etc.
What would be x264 Frames settings to get those M and N numbers?
M is the number of b-frames in a GOP . N is GOP size ie. --b-frames 1 --keyint 15 . But you're allowed 1 second , so --keyint 50 should be ok, --b-frames 3 should be ok too . Some programs and hardware have issues with b-pyramid so I would disable it
• That is great Richard1485’ idea, I made a quick experiment using lossless x264 setting:
CRF 1-pass, Quantization factor 1 (CRF = 1). Encoded file is 24.5MBps, only by 7-8% larger comparing to using Specific Bitrate 2-pass and 22Mbps encoded file.
CRF1 is actually not "lossless" . --crf 0 or --qp 0 is lossless for x264
Worst case I will need to do everything in the old fashion slow way, manually using Avisynth, opening avs file in VirtualDub, save file as HuffYUV and encode resulting lossless file with TMPGEnc.
Would VirtualDub 1.9.11 will take avs script file from Avisynth with 1080 50p video and using HuffYUV properly encode loselessly, no color space change and etc..?
Huffyuv classic is actually not lossless from a 4:2:0 source. It only supports 4:2:2 and RGB. Unless the chroma upsampling step and downsampling step is done with nearest neighbor algorithm, it's not a lossless operation
UTVideo in 4:2:0 , or lagarith in 4:2:0 would be lossless if the receiving program treats it properly. Many NLE's do not, most convert to RGB.
Also try --nal-hrd vbr instead of cbr
Richard1485
10th March 2021, 19:48
I sent an email to TMPGEnc support team. Will see if they will be willing to expose their secret setting :)
Please report back if you receive a response. More information about AVCHD 2.0 would be useful.
Bordo32
10th March 2021, 22:40
Looks like Hybrid is such powerful tool, like a rocket.
It has everything you would need in one place and also provides some guidance on how properly use settings.
It is actually possible to insert an additional code to the command line for x264 parameters.
I tried suggested to add --bluray-compat, inserted to command line. It did not help.
Selur has explained how to setup x264 for lossless encoding.
The encoded lossless "High4:4:4" file is 11x larger than regular encoded as High with 4:2:0.
TMPGEnc takes 150x longer to decompress and encode that file as AVCHD 2.0 compliant. I need to figure out why.
TMPGEnc team responded to my support request and asked to provide (I did) a sample of my file that Authoring Works does not recognize as compliant.
I am a bit skeptical about this, they might just come back and recommend to use their encoder instead of external one.
Of course I will report back on their feedback. This is is why we have this community/Forum for.
Bordo32
10th March 2021, 23:11
I also tried suggested "--nal-hrd vbr" instead of "cbr". It did not help.
I am testing one change/setting at the time.
If a combination of those settings is needed (hard to believe) I will not be able to catch a good, working setting.
Bordo32
10th March 2021, 23:33
Emulgator, I was not be able to find your suggested "chroma QP offset like -2".
I tried instead Quantization>Chroma Boost Modifier setting to -2. Did not help.
Emulgator
11th March 2021, 16:36
that offset parameter wasn't intended for your AVCHD use case, just for sake of completeness.
Try a 0,5s GOP.
Bordo32
11th March 2021, 17:10
I already tried, wrote before.
If I am not mistaken, in order to set 0.5 sec GOP, need to set GOP size 200 (at 50fps), but only 100 GOP Fields is allowed for AVCHD 2.0 per TMPGEnc error message in the Clip Checker. It means the shortest GOP that is allowed is 1 sec (for 50fps video).
Bordo32
11th March 2021, 19:00
I provided to TMPGEnc support team requested sample of my video file that is encoded with Hybrid.
This is their response:
"The slice structure of a frame in H.264 bitstream is not compatible.
Here are specification of AVCHD data should have for the smart rendering
function, see at
AVCHD Output Specifications:
https://tmpgenc.pegasys-inc.com/en/produ..._spec.html"
Richard1485
11th March 2021, 20:34
AVCHD Output Specifications:
https://tmpgenc.pegasys-inc.com/en/produ..._spec.html"
The link is truncated.
Bordo32
11th March 2021, 21:41
https://tmpgenc.pegasys-inc.com/en/product/taw6_spec.html
Richard1485
11th March 2021, 23:01
"The slice structure of a frame in H.264 bitstream is not compatible.
Even if there is something wrong with the slice structure, I don't see what information that webpage offers that might help. TMPGEnc uses x264, so why can't the support team provide specific settings to help a customer? I'd get back to them. Obviously, you can experiment further with slice settings, but post#16 makes clear that you have already done that.
Bordo32
12th March 2021, 00:54
I sent an email, asked TMPGEnc team to help to figure out correct x264 settings for slice structure of a frame in H.264.
Bordo32
12th March 2021, 06:09
I installed demo version of TMPGEnc Video Mastering Works.
This shows the Video, GOP, Frame structure parameters in its settings, they result in AVCH 2.0 compliant file.
I learned from this, tried to replicate the right set of x264 parameters.
Now it works!
It was so simple.
Only few key parameters/settings have to be followed, in combination to others from BluRay/AVCHD default:
• Multi-slice has to be enabled, set to 4.
• --bluray-compat has to be manually added to Command Line
• VBV Buffer Size = 3213 kB
• AVC Profile High Level set = 4.2
• X264>Frames>GOP Size Max = 50 (for deinterlaced to 50fps video)
The workflow in Hybrid (thanks to Selur for developing this tool, and as main contributor providing suggestions to find correct settings):
Starting from default Hardware restricted BluRay/AVCHD:
• X264>Base>Restriction settings>Hardware – uncheck>Unrestricted
• AVC Profile High Level set = 4.2
• X264>Base>Restrcition Setings>Multi-slice>Restricted by slice per frame = 4
• Preset, Slower, any preset
• X264>Rate Control>VBV>Medium Limit checked, set to BD 25/50 x1. Buffer Size and Max Fill Rate = 24000 kbits.
Note: TMPGEnc from encoder parameter as a target showed VBV Buffer Size = 3213 kB, hence Buffer size cannot be set higher than 25704 kbits.
• X264>Frames>GOP Size Min = 1, Max = 50 (for deinterlaced to 50fps video)
• “--bluray-compat” has to be manually added to Command Line
Richard1485
12th March 2021, 13:54
It's great that you found a solution. Those parameters were suggested in the thread, apart from maybe TMPGEnc's requirements for VBV Buffer Size. To summarize the findings, a minimal, x264bluray.com-style (http://www.x264bluray.com/home/1080i-p) template for AVCHD 2.0 1080p50 would look something like this:
Minimal Settings
x264 --pass 1 --bitrate XXXXX --profile high --level 4.2 --aud --constrained-intra --vbv-maxrate 25000 --vbv-bufsize 28000 --nal-hrd vbr --keyint 50 --min-keyint 1 --ref 4 --b-pyramid strict --weightp 1 --bframes 3 --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --output NUL input
x264 --pass 2 --bitrate XXXXX --profile high --level 4.2 --aud --constrained-intra --vbv-maxrate 25000 --vbv-bufsize 28000 --nal-hrd vbr --keyint 50 --min-keyint 1 --ref 4 --b-pyramid strict --weightp 1 --bframes 3 --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --output outputfile input
Compatibility Settings
If you experience compatibility problems, try setting:
--b-pyramid none
--weightp 0
x264 --pass 1 --bitrate XXXXX --profile high --level 4.2 --aud --constrained-intra --vbv-maxrate 25000 --vbv-bufsize 28000 --nal-hrd vbr --keyint 50 --min-keyint 1 --ref 4 --b-pyramid none --weightp 0 --bframes 3 --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --output NUL input
x264 --pass 2 --bitrate XXXXX --profile high --level 4.2 --aud --constrained-intra --vbv-maxrate 25000 --vbv-bufsize 28000 --nal-hrd vbr --keyint 50 --min-keyint 1 --ref 4 --b-pyramid none --weightp 0 --bframes 3 --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --output outputfile input
Note: --bluray-compat ought not to be necessary. See the discussion below.
Bordo32
12th March 2021, 14:13
The template for AVCHD 2.0 1080p50 would look like that, similar for 60p.
The key thing is to have all suggested parameters put together and have correct VBV Buffer Size. This is set automatically if Media limit is set to BD 25/50 x1 (using Hybrid).
Re. "--b-pyramid none", TMPGEnc has B- Pyramide Mode disabled, but Hybrid has this for BluRay/AVCHD set by default as normal (or strict). They all work.
What is the most optimal?
Is it OK to have Buffer Size and Max Fill Rate at the same size?
Based on Encoding mode Max Fill Rate sometimes is lower, still works.
Bordo32
12th March 2021, 14:31
I am very impressed with TMPGENc developers/support team.
Not only that they have great tools to properly author AVCHD Progressive and BDAV, they have everything online.
I received their response:
Here is information about the x264 parameters
https://help.pegasys-inc.com/en/tvmw7/06316.html
- Process slices in thread[--sliced-threads]
- Number of Slices [--slices]
SeeMoreDigital
12th March 2021, 14:31
Very nice work everyone...
Richard1485
12th March 2021, 14:36
Re. "--b-pyramid none", TMPGEnc has B- Pyramide Mode disabled, but Hybrid has this for BluRay/AVCHD set by default as normal (or strict). They all work.
What is the most optimal?
It depends on what you mean by "optimal". Enabling it helps with compression, but disabling it leads to fewer compatibility problems, so my preference is for disabling it.
In respect of the buffer, perhaps someone else can advise. Maybe TMPGEnc has reasons related to the AVCHD specification for insisting on certain values, and maybe the software is more fussy than it needs to be, which is sometimes the case.
Selur
12th March 2021, 15:36
x264 --pass 1 --bitrate XXXXX --profile high --level 4.2 --bluray-compat --vbv-maxrate 24000 --vbv-bufsize 24000 --keyint 50 --min-keyint 1 --b-pyramid none --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --fps 50/1 --output NUL input
x264 --pass 2 --bitrate XXXXX --profile high --level 4.2 --bluray-compat --vbv-maxrate 24000 --vbv-bufsize 24000 --keyint 50 --min-keyint 1 --b-pyramid none --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --fps 50/1 --output outputfile input
that seem to strict.
a. disabling b-pyramid seems unnecessary
b. I'm not happy with the --bluray-compat there I would prefer to use "--aud -constrained-intra ..."
Richard1485
12th March 2021, 16:52
a. disabling b-pyramid seems unnecessary
Yeah, it's not strictly necessary, though I find it helps. I've edited my post (above) to try to distinguish between what's needed for compatibility with TMPGEnc, etc, and the minimal requirements.
b. I'm not happy with the --bluray-compat there I would prefer to use "--aud -constrained-intra ..."
Maybe Bordo32 can give that setting a try and report back. Does --bluray-compat trigger any other setting that might be needed here?
Also, what do you think about the buffer? Bordo's average bitrate is getting pretty close to the maximum, which I always try to avoid with VBR encoding. All my AVCHD encoding has been to fit a DVD, so I've never set anything like that kind of average bitrate.
Bordo32
12th March 2021, 17:16
I changed --bluray-compat to --aud. It works as well.
Richard1485
12th March 2021, 17:23
Okay. I've edited post #36 to reflect that.
Selur
12th March 2021, 17:30
as a side note: reading the thread over in the Hybrid (https://forum.selur.net/showthread.php?tid=1755) forum might be interesting to read for others,..
I posted a bit about what --bluray-compat does there,...
Cu Selur
Bordo32
12th March 2021, 17:38
I tried only --aud. I thought that is the correct syntax.
The "--aud -constrained-intra" makes Hybrid crashing.
Richard1485
12th March 2021, 17:52
Is it OK to have Buffer Size and Max Fill Rate at the same size?
My understanding doesn't go beyond what's shon3i's post here (https://forum.doom9.org/showthread.php?p=1399419#post1399419) says.
Maximum allowed buffer, buffer size is in relation with maxrate. Since STD Buffer Delay for Blu-Ray allows maximum 1 second. This mean to divide buffer with maxrate and see if result is less or equal to 1, if not, buffer is need to be reduced to lower value that meet 1 second STD. For BD media, maximum settings is allowed (30000), but if not meet STD Buffer Delay, then need to be reduced to lower value. For DVD media there is no maximum in Blu-Ray specification, but is strongly recommended that use less or equal to 15000, and again need to meet STD delay of 1 second.
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.
There's no issue, in my understanding, with setting vbv-bufsize and vbv-maxrate to the same value. The only question is what is required by the AVCHD spec and what is required by TMPGEnc (if there's a difference).
I posted a bit about what --bluray-compat does there,...
Okay, but my question was:
Does --bluray-compat trigger any other setting that might be needed here?
The restrictive clause (in bold) changes the scope of the question. In other words, I know what --bluray-compat does: what I want to know is if it encompasses anything else that needs to be added for AVCHD 2.0, with which I'm not particular familiar.
EDIT: I've updated the settings in post #36 to make them fit the AVCHD 2.0 spec (as far as I understand it) now that --bluray-compat has been removed.
I tried only --aud. I thought that is the correct syntax.
The "--aud -constrained-intra" makes Hybrid crashing.
Try: --constrained-intra
Bordo32
12th March 2021, 18:46
I found that they both have to be added, “--aud” and “--constrained-intra”.
Otherwise it results in none compliant file.
Selur explained:
"x264->Misc->Main->Restrictions->Access unit delimiters" -> adds '--aud'
"x264->Misc->Main->Restrictions->Constrained intra prediction" -> adds '--constrained-intra'
Bordo32
14th March 2021, 19:18
Some helpful information from TMPGENc Smart Renderer Help files on their web:
https://help.pegasys-inc.com/en/tmsr5/10011.html
MPEG File for AVCHD Progressive Devices:
• Maximum Bitrate: 27150kbps (video+audio+overhead) (when the video is 1080 50/60p)
• VBV Buffer Size: Maximum 3500000 bytes (Depends on the source file Profile & Level)
Blu-ray Disc Output Specifications (for BDAV):
https://help.pegasys-inc.com/en/tmsr5/00050.html
• Maximum Bitrate (*18) 25000 kbps (video only)
(18* The Maximum value depends on the broadcasting standard and resolution.)
Mastering Works authoring/encoding for AVCHD Progressive does not allow to set bitrate above 26.44 Mbps (27280kbps)
(My 1080 60p camcorder produces ~26Mbps, and is compliant with BDAV requirement, allowed to be authored as BDAV without re-encoding).
TMPGEnc Smart Renderer looks like is the only one available tool that can author BDAV (not the AVCHD), burn to BD-R media using AVCH 2.0 Progressive compliant 1080 50p/60p video files, without re-encoding.
One of the main difference between AVCHD and BDAV is that BDAV does not support playback menus.
The beauty of BDAV format is that it allows BluRay players to play 1080 50p/60p content recorded on BD, and overcome their limit to 1080i for BDMV BluRay discs.
BDAV file structure can also be burnt to DVD-R using ImgBurn and can be played by BluRay players (not all support this). Kind of lower cost option.
Richard1485
14th March 2021, 21:23
Okay. I've set vbv-maxrate to 25000 (to allow for audio and overhead) and vbv-bufsize to 35000.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.