VideoHelp Forum




+ Reply to Thread
Results 1 to 20 of 20
  1. Hi

    please patience wiht the cat : thanks.

    My example interlaced 8bit source: from this source I need to do a encoding mp4 with:

    https://www.swisstransfer.com/d/a5ae256e-f303-4efd-a901-3c730ae0c370

    interlace tff
    422
    mbaff
    10bit

    clip out have to be exactly in sync frame by frame with the source

    I try:

    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv422p10le -c:v libx264 -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out.mp4
    but I have this problem:

    I'm not able to insert in the commanline a sort of:

    Code:
    in_range=tv:out_range=tv
    and seems that the out clip is not in sync with the source

    How I can do ?

    and maybe seems it be another question: I try to encode using

    Code:
    -pix_fmt yuv420p10le
    and

    Code:
    -pix_fmt yuv422p10le
    seems that when I encode in 422 the video sync is ok but playing in vlc show a bad range (limited/clamped?)
    and when I encode in 420 sync is not ok but range is ok

    can it be?
    Last edited by marcorocchini; 29th Jul 2025 at 07:37.
    Quote Quote  
  2. Originally Posted by marcorocchini View Post
    I'm not able to insert in the commanline a sort of:
    Code:
    in_range=tv:out_range=tv
    Why do you want to insert that?
    That way, the color range remains unchanged.
    Quote Quote  
  3. for the question -pix_fmt yuv420p10le/yuv422p10le

    I'm confused cat
    Quote Quote  
  4. Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv420p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out420.mp4
    https://www.swisstransfer.com/d/d8253104-bb67-4d51-85b6-83f5ef101dc5


    I upload the 2 different encoding: vlc seems to show a bad result on out422.mp4 like a levels range error. But both files imported in Edius seems ok

    so I cannot understand exactly where is the problem
    Quote Quote  
  5. Try
    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -c:v libx264 -pix_fmt yuv422p10le -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    Quote Quote  
  6. my vlc plays out422.mp4 that seems an incorrect levels range, black seems too stretched: this maybe not a problem (Edius play correctly) but I try to understand if only my local problem or an abjective question

    and again, the
    Code:
    -vf scale=interl=1
    when is really necessary?
    Quote Quote  
  7. in attachement the first frame of the video that I see with vlc: the 422 seems with range levels wrong

    it's not a important difference but is visible wrong.

    Comparing frame to frame in timeline with Edius they are almost exactly and I think they are coded ok (?) but I try to understand why with VLC the playback is not correct
    Image Attached Thumbnails Click image for larger version

Name:	420.jpg
Views:	11
Size:	269.1 KB
ID:	88012  

    Click image for larger version

Name:	422.jpg
Views:	11
Size:	228.2 KB
ID:	88013  

    Quote Quote  
  8. This is how i pass parameters to libx264:

    Code:
    @setlocal
    @rem skrypt h264 IP wylaczone psy quasi intra
    @set FFMPG=%CD%;C:\FF
    
    @set PATH=%FFMPG%;%PATH%
    
    @set qp=16
    @set key=9
    
    @set filename=%1
    
    @set vproc="null"
    
    @SET x264opts="qp=%qp%:keyint=%key%:ref=3:rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=off:overscan=show:colorprim=smpte170m:transfer=smpte170m:colormatrix=smpte170m:stitchable=0:sliced_threads=0"
    
    @ffmpeg -hide_banner -v 32 -stats -y -an -sn -dn -i %filename% -vf %vproc% -c:v libx264 -x264opts %x264opts% -x264-params %x264opts% -f matroska "%~n1_qp%qp%_key%key%.mkv"
    
    @endlocal
    @pause
    Quote Quote  
  9. I try

    Code:
    ffmpeg2025\ffmpeg.exe -threads 12 -y -i e:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -x264opts "rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=off:overscan=show:colorprim=smpte170m:transfer=smpte170m:colormatrix=smpte170m:stitchable=0:sliced_threads=0"             -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    but playing out422.mp4 in VLC the video appears with a sort "worng range level"

    also using

    Code:
    ffmpeg2025\ffmpeg.exe -threads 12 -y -i e:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -x264opts "rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=off:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709:stitchable=0:sliced_threads=0" -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    playback on VLC show the back a litle crushed.

    When encoding hase done 420 is all ok, when is yuv422p10le I get a visually bad result playback: however when imported in the editor seems ok.

    But the incorrect playback on vlc confuses the cat's, already confused
    Quote Quote  
  10. I also have try

    Code:
    ffmpeg.exe -threads 12 -y -i e:\c0021.mxf -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=pc,colormatrix=bt709:bt470bg,colorspace=bt709:iall=bt601-6-625:fast=0 -colorspace 2 -color_primaries 2 -color_trc 3  -c:v libx264 -x264opts "rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=on:colorprim=bt709:transfer=bt470bg:colormatrix=bt709:stitchable=1:sliced_threads=0" -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    but not work
    Quote Quote  
  11. Try:
    Code:
    profile=high10:tff=1:interlaced=1:fullrange=off:colorprim=bt709:transfer=bt470bg:colormatrix=bt709
    Quote Quote  
  12. I have tryed but maybe I don't have find the desider result.

    I try to export the C0021.MXF using Edius with the output format MXF AVC 10bit and seems this is the correct resultant MXF

    https://www.swisstransfer.com/d/144cac06-5a0b-4b13-9df3-81ec086c93b6

    MediaInfo says it's a Full range

    however I try to understand if is there a way to encode in mp4 with levels like the above: using vlc the black level seems ok
    Quote Quote  
  13. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Add -color_range 0 (or -color_range pc).

    Or
    Code:
    in_range=pc:out_range=tv
    and -color_range=1
    Last edited by rgr; 4th Aug 2025 at 06:21.
    Quote Quote  
  14. I try

    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -pix_fmt yuv422p10le -vf scale=interl=1:in_range=limited:out_range=full,colormatrix=bt709:bt470bg,colorspace=bt470bg:iall=bt601-6-625:fast=0   -c:v libx264 -x264opts "rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=off:colorprim=bt709:transfer=bt470bg:colormatrix=bt470bg:stitchable=0:sliced_threads=0" -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    but seems is not ok because comparing frame to frame in Edius the original clip show the correct levels, but the out422.mp4 not. However VLC plays ok.

    also I try:

    Code:
    ffmpeg.exe -threads 12 -y -i v:\c0021.mxf -pix_fmt yuv422p10le -vf scale=interl=1:in_range=pc:out_range=tv,colormatrix=bt709:bt470bg,colorspace=bt470bg:iall=bt601-6-625:fast=0 -color_range 1 -c:v libx264 -x264opts "rc_lookahead=5:bframes=0:me=hex:no_chroma_me=1:subme=6:cabac=1:tff=1:interlaced=1:no_scenecut=1:no_psy=1:trellis=0:no_deblock=1:no_psnr=1:no_ssim=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:fullrange=off:colorprim=bt709:transfer=bt470bg:colormatrix=bt470bg:stitchable=0:sliced_threads=0" -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    but also in this case, frame to frame in Edius is not showing the same levels. VLC show levels wrong during play
    Quote Quote  
  15. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Do you know that you are changing the color space from BT709 to BT601? Also, you replaced in_range with out_range, so it can't be correct.
    And -x264opts is deprecated, may not work.
    Last edited by rgr; 5th Aug 2025 at 14:17.
    Quote Quote  
  16. Originally Posted by rgr View Post
    And -x264opts is deprecated, may not work.
    That's why i recommend to:
    Code:
    -c:v libx264 -x264opts %x264opts% -x264-params %x264opts%
    Quote Quote  
  17. oh my cat

    however I try also

    Code:
    ffmpeg.exe -threads 12 -y -i v:\c0021.mxf -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=limited,format=yuv422p10le -colorspace bt709 -color_range 2 -c:v libx264 -x264opts fullrange=off:colorprim=bt709:transfer=bt709:colormatrix=bt709 -bsf:v h264_metadata=video_full_range_flag=1 -x264-params "fullrange=on:colorprim=bt709:transfer=bt709" -g 33 -bf 2 -crf 19 -flags +ildct+ilme -top 1 -c:a aac -strict -2 -b:a 450k -ar 48000 -aspect 16:9 v:\out422.mp4
    in Edius confronting clip to clip ok. But playback on VLC have the black "stretched": levels not ok

    what can it be?
    Quote Quote  
  18. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    ffmpeg -i C0021.MXF -c:v libx264 -preset slow -crf 17 -pix_fmt yuv422p10le -x264-params interlaced=1 -filter_complex "[0:1] [0:2] amerge" out.mp4

    1. Your source is marked as limited, but luma goes beyond the range. If you want a perfect copy, you don't convert the ranges. If it is to be fine (and not a 1:1 copy), then you should play with the range.
    2. Why do you encode up to 10 bits if the source is 8-bit?

    If it is playing badly, this is rather a player problem.
    Last edited by rgr; 7th Aug 2025 at 05:50.
    Quote Quote  
  19. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by marcorocchini View Post
    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv422p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out422.mp4
    Code:
    ffmpeg.exe -threads 12 -y -i c:\c0021.mxf -filter_complex "[0:1] [0:2] amerge" -pix_fmt yuv420p10le -vf scale=interl=1:in_range=tv:out_range=tv -c:v libx264 -crf 28 -x264-params profile=high10 -crf 18 -flags +ildct+ilme -top 1 -an -aspect 16:9 v:\out420.mp4
    https://www.swisstransfer.com/d/d8253104-bb67-4d51-85b6-83f5ef101dc5


    I upload the 2 different encoding: vlc seems to show a bad result on out422.mp4 like a levels range error. But both files imported in Edius seems ok

    so I cannot understand exactly where is the problem
    I checked in Vegas -- both videos have the correct colors and the audio is synced.
    Apart from the fact that they exceed the limits, of course.
    https://gcdnb.pbrd.co/images/xb1KpkEBsUV4.png?o=1
    Quote Quote  
  20. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    And I think you're combining the wrong audio tracks.

    https://gcdnb.pbrd.co/images/C7ACuNgrrr3b.png?o=1

    Big difference between both channels.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!