This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Settings for AVCHD 2.0 Progressive compliant file, playback
#41
Local drive. Keeping in mind TMPGEnc has to decompress the lossless x264 940MB and compress/encode to x264 as 84MB and it spending 90min, it results in 0.19MB/s transfer rate. Should not be a problem even for the usb stick.
During this process TMPGEnc is loading/using RAM at 1.2GB (looks right), but CPU is loaded only 32%, not continuously 100% fully loaded. But even if it would be loaded 100% it is still strange what it is doing that takes so 150x longer to process loselss x264 comparing to regular?
Should not take so much time for decompression.
It is something else?
Reply
#42
Hmm,... High4:4:4 unlike High with 4:2:0 is often not supported by vpu decoding, so decoding might be done by the cpu, still this seems way to slow.
May be try disabling anti virus and similar.

Cu Selur

Ps.: Also try how long Hybrid would take to convert the lossless x264 file.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#43
I tried to input in to Hybrid lossless encoded x264 High4:4:4 and encode it to regular High with 4:2:0.
It took almost the same time if encoding from my original lossless HuffYUV, approx 3-4 min, instead of 90 min encoding in Authoring Works.

I also tried on another fast PC with Intel Core i7, 40GB RAM. Same story, it processes something slowly without loading the CPU.
The antivirus is disabled, only Windows Defender is running but the process explorer shows that it is not loaded at all.

Authoring Works is supporting 4:4:4 color space, but during encoding there is no preview.
I also tried to re-encode lossless x264 on another TMPGEnc tool, Smart Rendered, this one even not opening file correctly, says there is  no video.
The video is there, media players on PC are playing it fine.
File properties:

[Image: xjaNdT16kZLerRq.jpg]
Reply
#44
Okay, seems like it's a problem of TMpegEnc handling lossless x264 content. (If it was a problem of the whole system Hybrid would also been slow.)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#45
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

Command Line for the file I sent them:


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" -
Reply
#46
Okay, so the problem is with the multi-slice option,...
Don't see any info on that page regarding slicing,..
Since wrote that you also tried '--slices 4', I would say try '--slices 1'.
If that also doesn't work you probably only can do some blind testing of the other multi-slice options,...

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#47
Thanks for advising.
I tried to use "Restricted by slices per frame": --slices 1.
It does not allow to use smaller number than 4.
It also does not allow to set to --slices 1 manually adding to Command line, using line, using x264>Misc>Command Line >Additions.
Reply
#48
If you add an addition make sure to not add it beforehand.
-> Set Multi-Slice to disable and then add '--slices 1'.
Slice Options x264 has are:
[code] --slices <integer> Number of slices per frame; forces rectangular
slices and is overridden by other slicing options
--slices-max <integer> Absolute maximum slices per frame; overrides
slice-max-size/slice-max-mbs when necessary
--slice-max-size <integer> Limit the size of each slice in bytes
--slice-max-mbs <integer> Limit the size of each slice in macroblocks (max)
--slice-min-mbs <integer> Limit the size of each slice in macroblocks (min)[(/code]
source: x264 --fullhelp

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#49
I tried various combinations of –slices parameters. Nothing helped.
Few extra steps I that did:
Installed demo version of more advanced TMPGEnc tool Video Mastering Works that supports H.265, to check if this would work with x264 lossless. Nope, same problem 150x slower encoding.
I also sent an email asking TMPGEnc support team to help to figure out correct x264 settings for slice structure of a frame in H.264.
 
The Video Mastering Works 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:
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
 
Is it OK to have Buffer Size and Max Fill Rate at the same size, and = 24000 kbits ?

Just an idea, if you would make a preset for AVCHD 2.0 in Hybrid.
At least the AVCHD Progressive preset for Hardware Restrictions only, not the Create Structure.
Hybrid would be the only one none-commercial SW tool that can encode for AVCHD Progressive, BDAV (at least TMPGENc Authoring tools accepting this without re-encoding)
Reply
#50
Quote:VBV Buffer Size = 3 213 kB
3 213 kByte = 25 704 kBit
High@3.2 is buffer size 25 000 kBit, but "BD 25/50 1x" speed limit with 24000 seems okay.

Quote:Is it OK to have Buffer Size and Max Fill Rate at the same size, and = 24000 kbits ?
sure. Smile

Quote:“--bluray-compat” has to be manually added to Command Line
I'm noot happy with that,...
current Blu-Ray/AVCHD compatibility enforces:
- weightedP to be restircted to 'refs'
- it enforces the use of slices
- restricts the supported AVC Profile&Levels
- restricts the gop size to single or double fps depending on the bitrate
- restrict output resolution/frame rate/scan-type combinations
- allows pulldown flags
- limits bPyramid to 'disabled' and 'strict'
- limits minimal gop size to 1
- limits bFrames to max 3
- enabled aud
- restricts allowed VUI settings
- enabled hrd vbr signaling

Looking at the x264 source code:
if( h->param.b_bluray_compat )
    {
        h->param.i_bframe_pyramid = X264_MIN( X264_B_PYRAMID_STRICT, h->param.i_bframe_pyramid );
        h->param.i_bframe = X264_MIN( h->param.i_bframe, 3 );
        h->param.b_aud = 1;
        h->param.i_nal_hrd = X264_MAX( h->param.i_nal_hrd, X264_NAL_HRD_VBR );
        h->param.i_slice_max_size = 0;
        h->param.i_slice_max_mbs = 0;
        h->param.b_intra_refresh = 0;
        h->param.i_frame_reference = X264_MIN( h->param.i_frame_reference, 6 );
        h->param.i_dpb_size = X264_MIN( h->param.i_dpb_size, 6 );
        /* Don't use I-frames, because Blu-ray treats them the same as IDR. */
        h->param.i_keyint_min = 1;
        /* Due to the proliferation of broken players that don't handle dupes properly. */
        h->param.analyse.i_weighted_pred = X264_MIN( h->param.analyse.i_weighted_pred, X264_WEIGHTP_SIMPLE );
        if( h->param.b_fake_interlaced )
            h->param.b_pic_struct = 1;
    }
source: https://code.videolan.org/videolan/x264/...der.c#L991
- limits the way references are chosen:
/* For Blu-ray compliance, don't reference frames outside of the minigop. */
    if( IS_X264_TYPE_B( h->fenc->i_type ) && h->param.b_bluray_compat )
        h->i_ref[0] = X264_MIN( h->i_ref[0], IS_X264_TYPE_B( h->fref[0][0]->i_type ) + 1 );
source: https://code.videolan.org/videolan/x264/...er.c#L2311

-> Question is, are all these really necessary?
  • "x264->Base->Restriction Settings->AVC Profile/Level" to "High/4.2"
  • "x264->Misc->Main->Restrictions->Access unit delimiters"
  • "x264->Misc->Main->Restrictions->Contrained intra prediction"
  • limit B-frame usage to max 3
  • "x264->Base->Restriction Settings->Multi-slice->restricted by slices per frame" 4
  • only use b-pyramid 'disabled' or 'strict'
  • "x264->Base->Restriction Settings->signal hrd" to "vbr"
  • no more than 6 references
  • "x264->Frames->GOP size min/max" to 1 and 50 or 60
  • limit VBV to "BD 25/50 1x" 25000/25000
  • "x264->Frames->Weigthed P-frame prediction" with 'refs' or disabled'

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)