jaa101
19th January 2026, 13:19
I have an MKV file with MPEG2 content from a PAL DVD, so it's 4:2:0. I can read it into AviSynth+ using FFMPEGSource2, so ffmpeg is used. Each interlaced field is a separate image, with two images per frame.
Some scenes cut in the middle of a frame, so the first field of that frame is from one scene and the second field from the next. It looks like ffmpeg is decoding both 4:2:0 fields and combining them into a 4:2:0 frame. 4:2:0 Chroma subsampling shares the colour information across two rows, so now the even and odd rows share their colours, and there's no way to cleanly separate the fields. In the source file, each field is separate so they don't have this issue, but I can't make ffmpeg avoid this problem. I've tried:
ffmpeg -i src.mkv -flags +ilme+ildct -pix_fmt yuv422p10le src-422.mp4
to upgrade to 4:2:2 subsampling (which doesn't share chroma across rows) but it still has the same problem. Seems like ffmpeg has no way read interlaced 4:2:0 content without smudging the chroma across the fields. Any suggestions?
My current work-around is to re-encode the file into a 4:2:2 format using the Adobe Media Encoder, and this works fine, but it's harder to automate. I've tried using VirtualDub2 but, of course, it has the same problem as AviSynth+.
Some scenes cut in the middle of a frame, so the first field of that frame is from one scene and the second field from the next. It looks like ffmpeg is decoding both 4:2:0 fields and combining them into a 4:2:0 frame. 4:2:0 Chroma subsampling shares the colour information across two rows, so now the even and odd rows share their colours, and there's no way to cleanly separate the fields. In the source file, each field is separate so they don't have this issue, but I can't make ffmpeg avoid this problem. I've tried:
ffmpeg -i src.mkv -flags +ilme+ildct -pix_fmt yuv422p10le src-422.mp4
to upgrade to 4:2:2 subsampling (which doesn't share chroma across rows) but it still has the same problem. Seems like ffmpeg has no way read interlaced 4:2:0 content without smudging the chroma across the fields. Any suggestions?
My current work-around is to re-encode the file into a 4:2:2 format using the Adobe Media Encoder, and this works fine, but it's harder to automate. I've tried using VirtualDub2 but, of course, it has the same problem as AviSynth+.