VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi but I'm a cat

    please consider this source file ffmpeg420.mp4 generated by ffmpeg:

    https://www.dropbox.com/s/cu2kursiis742al/ffmpeg420.MP4?dl=0

    generated with this commandline:
    Code:
    ffmpeg.exe -y -f concat -safe 0 -i concatList.txt -filter_complex "[0:1] [0:2] amerge" -vf scale=interl=1 -pix_fmt yuv420p -c:v libx264 -profile:v main -level:v 4.1 -g 33 -bf 2 -crf 22 -flags +ildct+ilme -top 1 -c:a ac3 -b:a 320k -ar 48000 -an -aspect 16:9 MP4_HD_420.MP4
    this is the mediainfo over ffmpeg420.mp4 (excluding audio):

    Code:
    General
    Complete name                            : C:\Users\Administrator\Desktop\Nuova cartella (4)\ffmpeg420.MP4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 92.0 MiB
    Duration                                 : 1 min 18 s
    Overall bit rate                         : 9 780 kb/s
    Writing application                      : Lavf58.15.100
    
    Video
    ID                                       : 2
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Main@L4.1
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Format settings, GOP                     : M=3, N=33
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1 min 18 s
    Bit rate                                 : 9 455 kb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : MBAFF
    Scan type, store method                  : Interleaved fields
    Scan order                               : Top Field First
    Bits/(Pixel*Frame)                       : 0.182
    Stream size                              : 88.9 MiB (97%)
    Writing library                          : x264 core 155 r2901 7d0ff22
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=0 / keyint=33 / keyint_min=3 / scenecut=40 / intra_refresh=0 / rc_lookahead=33 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    I try to "extract" some settings (video part only, don't consider audio) because I need to generate a "similar" PAFF encoded output (using the Mainconcept H.264 encoder) that are readable by Edius and Premiere (sometimes Edius and Premiere don't read ffmpeg outputted files) and to do that I try to set the Mainconcept encoder so that all parameteres are as close as possible to those of ffmpeg. Without prejudice that the quality the best quality encoder is ffmpeg (but it generate only MBAAF and not PAFF output files)

    Image
    [Attachment 49598 - Click to enlarge]

    Image
    [Attachment 49600 - Click to enlarge]

    Image
    [Attachment 49601 - Click to enlarge]


    For example I wonder:

    Referring to the mediainfo report of ffmpeg420.mp4 can you tell me what parameters I need to take to the mainconcept encoder that want to say

    1) the I-frame interval ?
    2) min. I-frame distance ?
    3) mark every X I-frame as IDR ?
    4) Fixed I-frames distance have to be the checked or not?
    5) Adaptive B-frames placement have to be checked or not?
    6) Pyramidal structure for B-frames have to be checked or no?
    7) Number of B-frames?
    8) Marcoblock search block size 8x8 or 16x16?
    9) Subpixel seatch depth quarted half or full?
    10) Reference Frames? 3?
    11) Motion vector search range? 99?
    12) Weighted prediction for P-frames have to be checked or not?
    13) Fast Multi reference frame search have to be checked or not?
    14) Fast Sub Block search have to be checked or not?
    15) Hadamart trasnformation have to be checked or not?
    16) Slices per picture? 1?

    I omitted the bitrate section of the Mainconcept encoder because there is no CRF as ffmpeg, so having to choose between "bitrate constant" "bitrate variable" "constant quantizer" and "constant quality" I choosed "constant quantizer"
    Last edited by marcorocchini; 21st Jul 2019 at 09:03.
    Quote Quote  
  2. I hate cats, especially stir fried. Having said that, you're going about things the wrong way. If the goal is to transcode an x264 encoded file into something that's easy to edit, then you should be transcoding it to a high quality intermediate format, like ProRes, which is easy to do from with ffmpeg and which is usually what I like to use for editing.
    Quote Quote  
  3. I don't need and don't want to transcode "an x264 encoded file", that is my example source. It's only a exemple of encoding x264, the real source in my case is the DJI osmo camera: sometimes I need to send the footage of the camera (transcoded from 50p to 50i) to station that works with Edius or Premiere that unfortunately don't import MBAFF h264 files encoded with ffmpeg.
    No doubt about superior quality of ffmpeg: it's x264 is the best encoder but having to face with compatibility problems and non-import footage in NLE can be frustrating, especially when editing times are short and the station cannot waste hours trying to transcode mp4 sended. So the only way is to create a similar .mp4 PAFF fully compatibile with Premiere or Edius or Avid workstation
    Last edited by marcorocchini; 22nd Jul 2019 at 08:02.
    Quote Quote  
  4. No PAFF in x264 - you need to use other H.264 encoder. Mainconcept is one of them but you can try tu use NVEnc and/or Intel Quicksync Video - one of them (both?) support interlace (and if i recall correctly only PAFF mode not MBAFF).
    Many years ago main x264 developer planned to add PAFF but seem this feature was never priority thus never implemented.

    https://forum.videohelp.com/threads/376662-x264-Interlace-and-MBAFF-Encoding
    https://forum.videohelp.com/threads/370384-MXF-MP4-H264-paff-encoding

    btw seem you already knew answer for your question like 4 years ago... please stop trolling...

    Seem NVEnc support PAFF https://forum.videohelp.com/threads/388455-metadata-not-in-resulting-mp4-after-ffmpeg-...ng#post2515492
    Quote Quote  
  5. Originally Posted by pandy View Post

    btw seem you already knew answer for your question like 4 years ago... please stop trolling...
    pandycat panic I try to understand what parameters of x264 I have to traspose in the mainconcept encoder to generate an encoding as close as possible the x264 one. For example ME parameters that are crucial for quality. For shure some parameters of the ffmpeg/x264 output as transposable to the mainconcept encoder but exacly, at least for some parameters, I cannot decide due to their notation or formulation which is difficult to interpret.

    I don't already know the answer : this is not a troll

    QSVenc and NVenc don't have enought quality
    Quote Quote  
  6. Originally Posted by marcorocchini View Post
    I don't need and don't want to transcode "an x264 encoded file", that is my example source. It's only a exemple of encoding x264, the real source in my case is the DJI osmo camera: sometimes I need to send the footage of the camera (transcoded from 50p to 50i) to station that works with Edius or Premiere that unfortunately don't import MBAFF h264 files encoded with ffmpeg.
    No doubt about superior quality of ffmpeg: it's x264 is the best encoder but having to face with compatibility problems and non-import footage in NLE can be frustrating, especially when editing times are short and the station cannot waste hours trying to transcode mp4 sended. So the only way is to create a similar .mp4 PAFF fully compatibile with Premiere or Edius or Avid workstation
    So basically what you have admitted is that you have no idea what you are doing. That camera shoots progressive H264, you take that and transode it to interlaced because reasons, then you import that into an NLE for editing

    I leave you to your devices, and cats...
    Quote Quote  
  7. In the case of the osmo camera, that works only in progressive, when I don't send the entire footage - as is - I need to transcode to avoiding send too many GB.

    In many other cases, outside of osmo and independently from the source, it can happen that sending mp4/h.264 non PAFF encoded they do not come read from Edius Avid or Premiere,

    As proof of this inconvenience you have to consider that this NLE export they h264-mp4 ONLY in PAFF mode.
    Quote Quote  
  8. Originally Posted by marcorocchini View Post
    pandycat panic I try to understand what parameters of x264 I have to traspose in the mainconcept encoder to generate an encoding as close as possible the x264 one. For example ME parameters that are crucial for quality. For shure some parameters of the ffmpeg/x264 output as transposable to the mainconcept encoder but exacly, at least for some parameters, I cannot decide due to their notation or formulation which is difficult to interpret.

    I don't already know the answer : this is not a troll

    QSVenc and NVenc don't have enought quality
    Then why you complicated problem description...?
    You should ask about mapping x264 settings to Mainconcept settings.

    Secondly NVEnc and QSV are able to deliver same quality as x264 - you need only increase bitrate - use fixed qp or pure VBR mode.

    1) the I-frame interval ? - 33
    2) min. I-frame distance ? - 1
    3) mark every X I-frame as IDR ? no
    4) Fixed I-frames distance have to be the checked or not? no
    5) Adaptive B-frames placement have to be checked or not? yes
    6) Pyramidal structure for B-frames have to be checked or no? yes
    7) Number of B-frames? 2
    7a) B frames as references - yes
    8) Marcoblock search block size 8x8 or 16x16? 16x16
    9) Subpixel seatch depth quarted half or full? 1/4
    10) Reference Frames? 3? - yes
    11) Motion vector search range? 99?(16 is considered by x264 as default and accordingly to x264 advanced users no significant impact on quality however Mainconcept may behave differently - motion search is not standardised and one of areas where codec implementations may or not shine)
    12) Weighted prediction for P-frames have to be checked or not? no
    13) Fast Multi reference frame search have to be checked or not? don't know
    14) Fast Sub Block search have to be checked or not? don't know
    15) Hadamart trasnformation have to be checked or not? IMHO not
    16) Slices per picture? 1? yes

    closest to CRF is constant quality - constant quantizer is never recommended by x264 developers and advanced users.
    Last edited by pandy; 23rd Jul 2019 at 13:16.
    Quote Quote  
  9. Originally Posted by pandy View Post
    Originally Posted by marcorocchini View Post
    pandycat panic I try to understand what parameters of x264 I have to traspose in the mainconcept encoder to generate an encoding as close as possible the x264 one. For example ME parameters that are crucial for quality. For shure some parameters of the ffmpeg/x264 output as transposable to the mainconcept encoder but exacly, at least for some parameters, I cannot decide due to their notation or formulation which is difficult to interpret.

    I don't already know the answer : this is not a troll

    QSVenc and NVenc don't have enought quality
    Then why you complicated problem description...?
    You should ask about mapping x264 settings to Mainconcept settings.

    Secondly NVEnc and QSV are able to deliver same quality as x264 - you need only increase bitrate - use fixed qp or pure VBR mode.

    1) the I-frame interval ? - 33
    2) min. I-frame distance ? - 1
    3) mark every X I-frame as IDR ? no
    4) Fixed I-frames distance have to be the checked or not? no
    5) Adaptive B-frames placement have to be checked or not? yes
    6) Pyramidal structure for B-frames have to be checked or no? yes
    7) Number of B-frames? 2
    7a) B frames as references - yes
    8) Marcoblock search block size 8x8 or 16x16? 16x16
    9) Subpixel seatch depth quarted half or full? 1/4
    10) Reference Frames? 3? - yes
    11) Motion vector search range? 99?(16 is considered by x264 as default and accordingly to x264 advanced users no significant impact on quality however Mainconcept may behave differently - motion search is not standardised and one of areas where codec implementations may or not shine)
    12) Weighted prediction for P-frames have to be checked or not? no
    13) Fast Multi reference frame search have to be checked or not? don't know
    14) Fast Sub Block search have to be checked or not? don't know
    15) Hadamart trasnformation have to be checked or not? IMHO not
    16) Slices per picture? 1? yes

    closest to CRF is constant quality - constant quantizer is never recommended by x264 developers and advanced users.
    thank you pandy the parameters you suggested made me do 3 days of intense tests. I'm not sure why, but I have to use "I-Frame interval" at around 80 to avoid a slight jerky effect on the light / dark areas of the image. The ffmpeg's quality, at the same final size of mp4 generated, it is never reached. Perhaps this is due to the lower efficiency of the PAFF coding compared to MBAFF.

    About QSVenc or NVenc: I remember of some serious problem using they:

    https://forum.videohelp.com/threads/384291-ffmpeg-hardware-encoding-H264/page2

    I need to build a batch thant works on any platform, regardless from the hardware: this requires a processor-based use.
    In the meantime I don't know if the problems that existed in the use of QSVenc with FFMPEG have been solved, but a certain fact is that Mainconcept Totalcode can run on any machine, while QSVEnc and NVenc depend on the presence or not of the Intel or NVidia hardware. If I'm not mistaken: also from the tests I had done two years ago, the quality of QSVenc was comparable to that of ffmpeg when the complexity-computing of the transcoding required practically the same coding time, therefore without real differences between the software coding of ffmpeg/x264 and the QSVenc/NVenc hardware.

    However I have 1 pc with NVidia GTX1060, but is only one.

    With Mainconcept, to have the "same" quality I need to encode at 10 FPS, it it slower but it's the price to pay for having a damn paff encoding
    Quote Quote  
  10. Originally Posted by marcorocchini View Post
    I don't already know the answer : this is not a troll

    QSVenc and NVenc don't have enought quality
    thank you pandy the parameters you suggested made me do 3 days of intense tests. I'm not sure why, but I have to use "I-Frame interval" at around 80 to avoid a slight jerky effect on the light / dark areas of the image. The ffmpeg's quality, at the same final size of mp4 generated, it is never reached. Perhaps this is due to the lower efficiency of the PAFF coding compared to MBAFF.

    About QSVenc or NVenc: I remember of some serious problem using they:

    https://forum.videohelp.com/threads/384291-ffmpeg-hardware-encoding-H264/page2

    I need to build a batch thant works on any platform, regardless from the hardware: this requires a processor-based use.
    In the meantime I don't know if the problems that existed in the use of QSVenc with FFMPEG have been solved, but a certain fact is that Mainconcept Totalcode can run on any machine, while QSVEnc and NVenc depend on the presence or not of the Intel or NVidia hardware. If I'm not mistaken: also from the tests I had done two years ago, the quality of QSVenc was comparable to that of ffmpeg when the complexity-computing of the transcoding required practically the same coding time, therefore without real differences between the software coding of ffmpeg/x264 and the QSVenc/NVenc hardware.

    However I have 1 pc with NVidia GTX1060, but is only one.

    With Mainconcept, to have the "same" quality I need to encode at 10 FPS, it it slower but it's the price to pay for having a damn paff encoding
    Pumping effect may be related to inactive weighted-p option. After increasing bitrate QSV or NVEnc may deliver comparable quality to x264 (QSV or NVEnc using less complex encoding tools thus they need more bits for same quality, also they may lack of some psychovisual optimization unique to x264 but still with sufficient bitrate they should be comparable with x264).

    On Kieran github https://github.com/kierank/x264-paff seem there is project related to x264 PAFF but progress is slow and for sure there is plenty to do...
    And yes, MBAFF should be around 10 - 30% more efficient than PAFF.
    Quote Quote  
  11. mainconcept have recently release a new totalcode 5.0 (64bit) that include a new H264 module. Here there is a interesting function in the ME setting panel

    Image
    [Attachment 49689 - Click to enlarge]


    that when selected as "flat vertical hexagonal" avoid a terribile "rain" effect on the fine texture areas of the image.

    Exactly I don't know why but I see that to avoid "pumping" effect i need to set I-frame interlav = 80 - Min I frame distance =33, mark every 54 I frame as IDR, and check over "Fixed I-Frames distance"

    All the rest of parameters are this:

    https://www.dropbox.com/s/8zckglaqfvukln7/mainconceptH264_1.bmp?dl=0
    https://www.dropbox.com/s/q46jh6our8lq2wh/mainconceptH264_2.bmp?dl=0
    https://www.dropbox.com/s/1v30t6eir9wsrt7/mainconceptH264_3.bmp?dl=0
    https://www.dropbox.com/s/jkmth7bfb1g4s7a/mainconceptH264_4.bmp?dl=0
    https://www.dropbox.com/s/k0ss204i2q0asrx/mainconceptH264_5.bmp?dl=0
    https://www.dropbox.com/s/slh5kqo0r5yojiu/mainconceptH264_6.bmp?dl=0
    https://www.dropbox.com/s/8n485r2m3q4rrz4/mainconceptH264_7.bmp?dl=0
    https://www.dropbox.com/s/td5if8ryl48omxi/mainconceptH264_8.bmp?dl=0

    to match a ffmpeg encoding in CRF 22 mode
    Quote Quote  



Similar Threads