[FFmpeg-devel] Bug in FFMPEG video filter TINTERLACE needs fixing

Ben Hutchinson benhut1 at gmail.com
Mon Jul 13 00:55:11 EEST 2020


Problem is it's not as simple as just patching it to start at field 1
instead of field 2. It really depends on your signal source. If your signal
source recorded all lines that contain at least some image signal (even if
only half the line contains image signal), then the top line of the image
is the first line of field 2 (the even field). However, if your signal
source only recorded lines where the entire line contains image signal then
the top line of the image is the first line of field 1 (the odd field).
When using the TINTERLACE video filter (at least in MERGEX2 mode), one
actually needs to be able to select which field comes first (odd field
first, or even field first). This unfortunately is a much more in-depth
patch to the software than just hardcoding a different starting field. You
will need to add commandline option for the TINTERLACE filter in FFMPEG in
order to allow for user-selection of OFF or EFF.

On Sun, Jul 12, 2020 at 9:10 AM Paul B Mahol <onemda at gmail.com> wrote:

> On 7/12/20, Ben Hutchinson <benhut1 at gmail.com> wrote:
> > I was assuming it started from 1, because in the NTSC video standard
> (which
> > is of course where the concept of interlaced video originated), the first
> > field is called field 1. Field 1 contains the first full line of
> displayed
> > video (though technically field 2 contains the first image data, one line
> > above the first displayed line of field 1, although it's only the right
> > half of that line).
>
> I sent patch to fix this.
>
> >
> > On Sat, Jul 11, 2020 at 4:07 AM Paul B Mahol <onemda at gmail.com> wrote:
> >
> >> On 7/11/20, Ben Hutchinson <benhut1 at gmail.com> wrote:
> >> > I was reading it directly from the official FFMPEG website.
> >> > https://ffmpeg.org/ffmpeg-filters.html
> >> > All the info about the TINTERLACE filter I got from reading the info
> >> there.
> >> >
> >>
> >> OK, lets try again, where have you read that first frame is always an
> >> odd frame, one with 1 number.
> >> FFmpeg counts from 0.
> >>
> >> > On Fri, Jul 10, 2020 at 2:14 AM Paul B Mahol <onemda at gmail.com>
> wrote:
> >> >
> >> >> On 7/8/20, Ben Hutchinson <benhut1 at gmail.com> wrote:
> >> >> > According to the documentation on the TINTERLACE video filter, the
> >> >> > filter
> >> >> > mode called MERGEX2 will "Move odd frames into the upper field,
> even
> >> >> > into
> >> >> > the lower field, generating a double height frame at same frame
> >> >> > rate."
> >> >> But
> >> >> > it doesn't do this, at least in some cases (not sure about all
> >> >> > cases).
> >> >> The
> >> >> > first frame in a sequence should be considered frame one (an odd
> >> frame)
> >> >> for
> >> >>
> >> >> Where is this written?
> >> >>
> >> >> > the purpose of this interlacing algorithm. However, that is not
> >> >> > what's
> >> >> > happening in my experience. At least with raw video (using "-f
> >> >> > rawvideo")
> >> >> > it's treating the first frame as frame zero (an even frame) and
> thus
> >> my
> >> >> > first frame (which contains top-field data) ends up getting put
> into
> >> the
> >> >> > bottom-field of the output video, and this is messing up the
> output.
> >> >> Please
> >> >> > fix this.
> >> >> > _______________________________________________
> >> >> > ffmpeg-devel mailing list
> >> >> > ffmpeg-devel at ffmpeg.org
> >> >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >> >> >
> >> >> > To unsubscribe, visit link above, or email
> >> >> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> >> >> _______________________________________________
> >> >> ffmpeg-devel mailing list
> >> >> ffmpeg-devel at ffmpeg.org
> >> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >> >>
> >> >> To unsubscribe, visit link above, or email
> >> >> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> >> > _______________________________________________
> >> > ffmpeg-devel mailing list
> >> > ffmpeg-devel at ffmpeg.org
> >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >> >
> >> > To unsubscribe, visit link above, or email
> >> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list