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:
but I have this problem: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
I'm not able to insert in the commanline a sort of:
and seems that the out clip is not in sync with the sourceCode:in_range=tv:out_range=tv
How I can do?
and maybe seems it be another question: I try to encode using
andCode:-pix_fmt yuv420p10le
seems that when I encode in 422 the video sync is ok but playing in vlc show a bad range (limited/clamped?)Code:-pix_fmt yuv422p10le
and when I encode in 420 sync is not ok but range is ok
can it be?
+ Reply to Thread
Results 1 to 20 of 20
-
Last edited by marcorocchini; 29th Jul 2025 at 07:37.
-
-
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
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 -
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
-
-
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 -
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
-
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
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
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 -
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
-
Try:
Code:profile=high10:tff=1:interlaced=1:fullrange=off:colorprim=bt709:transfer=bt470bg:colormatrix=bt709
-
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 -
Add -color_range 0 (or -color_range pc).
OrCode:in_range=pc:out_range=tv
Last edited by rgr; 4th Aug 2025 at 06:21.
-
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
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
-
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.
-
-
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
what can it be? -
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.
-
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 -
And I think you're combining the wrong audio tracks.
https://gcdnb.pbrd.co/images/C7ACuNgrrr3b.png?o=1
Big difference between both channels.
Similar Threads
-
can I encoding in MJPEG 10bit?
By marcorocchini in forum Newbie / General discussionsReplies: 3Last Post: 17th Mar 2025, 13:07 -
how to do average bitrate h264 encoding with ffmpeg?
By Anonymous543 in forum Newbie / General discussionsReplies: 38Last Post: 15th Feb 2022, 07:02 -
Going from 10Bit H265 to 8Bit H264
By carlmart in forum Video ConversionReplies: 12Last Post: 14th May 2021, 15:01 -
FFMPEG 10bit output video colour difference
By iKron in forum Video ConversionReplies: 11Last Post: 12th May 2021, 17:53 -
Xmedia recode, true 10bit encoding and hdr
By YaBoyShredderson in forum Newbie / General discussionsReplies: 20Last Post: 2nd Aug 2020, 17:58