Discussion:
[FFmpeg-user] Inverse Telecine with ffmpeg
James Board
2013-08-08 00:35:25 UTC
Permalink
I'm trying to convert from mencoder to ffmpeg.  I can't
get the inverse telecine correct.  I did this command

    ffmpeg -i IN.avi -vf fieldmatch,decimate out.avi

But the input file has 33 percent more frames then the output file.
The input file should have 25 percent more frames, right?  Seems like
ffmpeg is dropping too many frames.


By contrast, this is how I did inverse telecine with mencoder:
    mencoder -ovc lavc -lavcopts vcodec=ffvhuff -oac copy -vf filmdint -o OUT.avi -ofps 24000/1001 IN.avi


What's the correct way, or ways, to inverse telecine with ffmpeg?
Paul B Mahol
2013-08-08 14:55:00 UTC
Permalink
I'm trying to convert from mencoder to ffmpeg. I can't
get the inverse telecine correct. I did this command
ffmpeg -i IN.avi -vf fieldmatch,decimate out.avi
But the input file has 33 percent more frames then the output file.
The input file should have 25 percent more frames, right? Seems like
ffmpeg is dropping too many frames.
mencoder -ovc lavc -lavcopts vcodec=ffvhuff -oac copy -vf filmdint -o
OUT.avi -ofps 24000/1001 IN.avi
What's the correct way, or ways, to inverse telecine with ffmpeg?
Perhaps you need to tune fieldmatch filter options?

It's supposed to be better than filmdint from nmplayer.
James Board
2013-08-08 15:21:00 UTC
Permalink
Post by Paul B Mahol
Post by James Board
What's the correct way, or ways, to inverse telecine with ffmpeg?
Perhaps you need to tune fieldmatch filter options?
It's supposed to be better than filmdint from nmplayer.
Well, if anyone knows how to tune fieldmatch so it's better than mencoder,
or even equal to mencoder, please let me know.

Not being able to Inverse Telecine is the prime reason that keeps me from switching from mencoder to ffmpeg.

That, and the fact that I can't figure out 2-pass mpeg4 encoding, but otherwise I would switch to ffempg.

Also, I need to be able to extract higher quality JPEG images from the video stream, but that's it.  Then I'd switch.
Robert Krüger
2013-08-08 16:28:33 UTC
Permalink
Post by James Board
Post by Paul B Mahol
Post by James Board
What's the correct way, or ways, to inverse telecine with ffmpeg?
Perhaps you need to tune fieldmatch filter options?
It's supposed to be better than filmdint from nmplayer.
Well, if anyone knows how to tune fieldmatch so it's better than mencoder,
or even equal to mencoder, please let me know.
Not being able to Inverse Telecine is the prime reason that keeps me from switching from mencoder to ffmpeg.
That, and the fact that I can't figure out 2-pass mpeg4 encoding, but otherwise I would switch to ffempg.
Also, I need to be able to extract higher quality JPEG images from the video stream, but that's it. Then I'd switch.
just out of curiosity, what's missing there?
Paul B Mahol
2013-08-08 19:17:08 UTC
Permalink
Post by James Board
Post by Paul B Mahol
Post by James Board
What's the correct way, or ways, to inverse telecine with ffmpeg?
Perhaps you need to tune fieldmatch filter options?
It's supposed to be better than filmdint from nmplayer.
Well, if anyone knows how to tune fieldmatch so it's better than mencoder,
or even equal to mencoder, please let me know.
Not being able to Inverse Telecine is the prime reason that keeps me from
switching from mencoder to ffmpeg.
That, and the fact that I can't figure out 2-pass mpeg4 encoding, but
otherwise I would switch to ffempg.
Also, I need to be able to extract higher quality JPEG images from the video
stream, but that's it. Then I'd switch.
The info you provide was not enough to provide any detailed help.
How you extract higher quality JPEG images when using nemcoder? Is it
using lavc internal encoder?

If for whatever reason nemcoder works in your specific scenario does not mean
that ffmpeg result is worse.

So far I have not found that fieldmatch + decimate gives poor results
and I assume
its working perfectly.

Otherwise there is tracker for bug reports where bug once reported
have higher chance to be fixed.
James Board
2013-08-09 12:52:59 UTC
Permalink
Post by Paul B Mahol
The info you provide was not enough to provide any detailed help.
How you extract higher quality JPEG images when using nemcoder? Is it
using lavc internal encoder?
Lets ignore the JPEG images for now.  The bigger problem is the ffmpeg Inverse
Telecine is getting rid of good video frames, not only the duplicated frames.
Post by Paul B Mahol
If for whatever reason nemcoder works in your specific scenario does not mean
that ffmpeg result is worse.
So far I have not found that fieldmatch + decimate gives poor results
and I assume
its working perfectly.
Have you checked the number of frames in your Telecined vs Inverse
Telecined video?  In my case, the ffmpeg Inverse Telecine is dropping
a lot more video frames that the mencoder Inverse Telecine.  This is
a big problem for me, (I don't understand how anyone would think
otherwise).  Can you send me the command you use to 'tune' the Inverse
Telecine with ffmpeg?  Thanks.
Paul B Mahol
2013-08-09 12:58:54 UTC
Permalink
Post by Paul B Mahol
The info you provide was not enough to provide any detailed help.
How you extract higher quality JPEG images when using nemcoder? Is it
using lavc internal encoder?
Lets ignore the JPEG images for now. The bigger problem is the ffmpeg
Inverse
Telecine is getting rid of good video frames, not only the duplicated frames.
Post by Paul B Mahol
If for whatever reason nemcoder works in your specific scenario does not mean
that ffmpeg result is worse.
So far I have not found that fieldmatch + decimate gives poor results
and I assume
its working perfectly.
Have you checked the number of frames in your Telecined vs Inverse
Telecined video? In my case, the ffmpeg Inverse Telecine is dropping
a lot more video frames that the mencoder Inverse Telecine. This is
a big problem for me, (I don't understand how anyone would think
otherwise). Can you send me the command you use to 'tune' the Inverse
Telecine with ffmpeg? Thanks.
Perhaps decimate filter is too aggressive, do yet get correct output
without it?
Robert Krüger
2013-08-09 14:37:49 UTC
Permalink
Post by Paul B Mahol
The info you provide was not enough to provide any detailed help.
How you extract higher quality JPEG images when using nemcoder? Is it
using lavc internal encoder?
Lets ignore the JPEG images for now. The bigger problem is the ffmpeg Inverse
Telecine is getting rid of good video frames, not only the duplicated frames.
Post by Paul B Mahol
If for whatever reason nemcoder works in your specific scenario does not mean
that ffmpeg result is worse.
So far I have not found that fieldmatch + decimate gives poor results
and I assume
its working perfectly.
Have you checked the number of frames in your Telecined vs Inverse
Telecined video? In my case, the ffmpeg Inverse Telecine is dropping
a lot more video frames that the mencoder Inverse Telecine. This is
a big problem for me, (I don't understand how anyone would think
otherwise). Can you send me the command you use to 'tune' the Inverse
Telecine with ffmpeg? Thanks.
Do you have a small sample where you can reproduce this? That would
probably be best to get this resolved, i.e. open a ticken in trac
(https://trac.ffmpeg.org/) upload files and a description (command
line used in ffmpeg, command line used using mencoder and the
difference in the result, e.g. "frames 12, 16 and 19 are missing in
the ffmpeg output" and what you think would be correct behaviour). If
you get this resolved without this, could you post the solution here?
Loading...