Thanks. Well, it worked as well as "ffmpeg -i '2023_telecine_source.mpg' -pix_fmt yuv420p -c:v libx264 -preset slower -tune film -vf "fieldmatch=order=tff:combmatch=full,fps=24000/1001" -c:a libfdk_aac -b:a 320k -crf 18 -x264opts keyint=40:bitrate=2100:qpmin=8:qpmax=28:qpstep=4 '2023ffmpeg_telecine..m4v’” when I changed it from the above after resorting to wild guesses, but please consider the above as what was used, because it yields results which are just as incorrect. Know of any way to fix it?
I need to provide a different set of excerpts, and ask my question again, because applying the command, “ffmpeg -i 2023_telecine_source.mpg -pix_fmt yuv420p -c:v libx264 -preset slower -tune film -vf "fieldmatch=order=tff:combmatch=full,fps=24000/1001" -c:a libfdk_aac -b:a 320k -crf 18 -x264opts keyint=40:bitrate=2100:qpmin=8:qpmax=28:qpstep=4 2023_ffmpeg_telecine.m4v” to the source clip I previously provided (https://dl.dropboxusercontent.com/u/42718751/2023_telecine_source.zip) correctly transcodes it.
It of course (also) makes no sense to use a
deinterlace filter on progressive content.
Note that contrary to an inverse telecine
filter, a deinterlace filter permanently
damages the original stream.
There is no guarantee that using the deint
option helps, the information is often not
>Laine Lee <llee040 <at> sbcglobal.net> writes:
>> >> BTW, -vf pullup -r 24000/1001, doesn’t work
>> >> on the clip
>> >> https://dl.dropboxusercontent.com/u/42718751/2024_telecine_source.zip >> >
>> >This is progressive content, you cannot use an
>> >inverse telecine filter on it (and expect useful
>> After receiving this, I tried
>> -vf yadif=deint=interlaced -r 24000/1001
>It of course (also) makes no sense to use a
>deinterlace filter on progressive content.
>Note that contrary to an inverse teleci
>filter, a deinterlace filter permanently
>damages the original stream.
>There is no guarantee that using the deint
>option helps, the information is often not
The reason I originally included my mencoder recipe was that I had hoped it could provide clues for finding an ffmpeg equivalent that deals as favorably with pullup for as many different types of input. My mencoder method's only real deficiency (other than being dependent on deprecated software) is that I always get underruns if I try to copy audio rather than encode. The ffmpeg method I had already developed works pretty well, with the apparent exception of certain 4x3 DVD titles such as the one for which I provided the excerpt.
> The reason I originally included my mencoder recipe
> was that I had hoped it could provide clues for
> finding an ffmpeg equivalent that deals as favorably
> with pullup for as many different types of input.
Your MEncoder command line includes "-ofps 24000/1001".
How is this supposed to work for 30fps progressive
> On Monday, December 21, 2015 12:39 AM, llee782 <[hidden email]> wrote:
> > Carl Eugen Hoyos wrote
>> Your MEncoder command line includes "-ofps 24000/1001".
>> How is this supposed to work for 30fps progressive
> The inverse telecine operation must yield video of 23.94 fps rather than
> 29.97 fps, right?
It seems like you may be asking too much from your command. Having spent some time converting dvd's to mkv's, I've encountered the following on dvds:
1) 24 fps labeled 30fps
2) 24 fps telecined to 30fps
3) 30 fps interlaced material
4) 30 fps progressive material
5) a mix of 2 & 4 in the same title
6) a mix of 1 & 2 in the same title
7) a mix of 2 & 3 in the same title
8) a mix of 3 & 4 in the same title
9) 25 fps telecined to 30 fps (PAL->NTSC)
10) Rarely, 24 fps -> 30 fps by duping every 4th frame.
I have a different ffmpeg "-vf" command for each option, and there is no automated way to tell what is what (except I can detect 1) by actually counting the frames.)
You have to use your eyes. Just find a scene with some horizontal movement, a pan or a person walking across the shot, looking for combing, if there is combing on every frame, it is probably interlaced. If there is combing for 2 frames out of every five, it is probably telecined. If there are effect shots, check them separately, they might be made differently. If there are lots of shots of TV's check those separately too.
There is no single command that will do the correct thing will all of these. If you through enough fieldmatch's and yadif's at it you will get rid of all the combs, but you will also produce blurry juddery video.
The ffmpeg commands I use are:
1) -r 24000/1001 (I've also used -fps=24000/1001, but -r works better for me for this)
2) -vf fieldmatch,decimate (produces 24000/1001)
3) -vf yadif=mode=1 (produces 60)
5) -vf pullup,dejudder,fps=fps=120000/1001:round=zero (Leave of the fps if you can deal with vfr output)
6) -vf pullup,dejudder,fps=fps=24000/1001:round=zero
7) -vf pullup,dejudder,idet,yadif=mode=1:deint=interlaced,fps=fps=120000/1001:round=zero (leave off fps if you can deal with vfr output) 8) -vf idet,yadif=mode=1:deint=interlaced,fps=fps=60000/1001:round=zero
9) -vf fieldmatch,decimate=6
10) -vf decimate=5
> Carl Eugen Hoyos wrote
> > Your MEncoder command line includes "-ofps 24000/1001".
> > How is this supposed to work for 30fps progressive
> > input?
> The inverse telecine operation must yield video of
> 23.94 fps rather than 29.97 fps, right?
Yes, if the input is telecined, you would do that.
But the input file you provided is progressive,
see command 4) in Nicholas' email.
Nicholas Robbins <nickrobbins-at-yahoo.com <at> ffmpeg.org> writes:
> I've encountered the following on dvds:
> 1) 24 fps labeled 30fps
> 2) 24 fps telecined to 30fps
> 6) a mix of 1 & 2 in the same title
> The ffmpeg commands I use are:
> 1) -r 24000/1001 (I've also used -fps=24000/1001,
> but -r works better for me for this)
The fps filter has (imo very) strange characteristics,
some may call it broken: We have input files for which
it alternatingly drops and duplicates frames, it seems
not have a sufficient "buffer".
(But this is unrelated to pulllup / pulldown.)
> But I don't believe the re-encoded video could play
> with integrity at 23.94 fps as it does using the
> encoding commands I already provided if the original
> content had no telecine to remove, could it?
Do you believe that the input video you provided is
Do you believe that the input video you provided is
I do. What else could explain the fact that the conversion to h264 results in video that contains no skipped frames when played at 23.94 fps? I know that 29.97 fps is detected for the original. If that can be explained another way, I'm not aware of it. After reading your response, I guess my question is this. What besides telecining (pulldown) can give 5 frames a duration of 1/6 second at 29.97 fps where the 5th frame is not a duplicate of the 4th?
When trying to handle these, I always step through the frames for at least one brief passage to determine whether a pattern per 5 frames is noticeable. Before I was aware of pulldown, I just deinterlaced and maintained the 29.97 fps frame rate. It was only after I began to notice the feeling of being slapped in the face 6 times per second caused by the duplicate frame during passages of smooth panning that I took the trouble to learn about pulldown.
OK, thanks. That gives me a lot of things to try. From what I had read on the list, I thought that the goal was to offer a single solution that could be applied whenever telecine was involved. My observation is that telecine is nearly always involved when a commercial DVD title has a frame rate of 29.97 fps.
> Carl Eugen Hoyos wrote
> > Do you believe that the input video you provided is
> > telecined?
> I do.
Although I live in PAL-land, I have often dealt with
telecined video when trying to reproduce bug reports.
As a long-time FFmpeg developer, allow me to assure
you that the video you uploaded is not telecined.