Log in

View Full Version : ffmpeg interlaced source detection


bigcat
13th December 2007, 15:25
Hi people. A few days ago i found out that Cuttermaran in the "Encoding mode" does not re-encode the whole file but only the first and the last GOP. Yes, it was stupid of me not to know that.
I used TMpegEnc free edition (which is free for 21 days only) for reencoding, but there're also 2 options for "Temp AVI encoding" in Cuttermaran: one is "YV12" for which the special codec is needed and another one is "RGB24". I wanted more quality but didn't want to install that special codec. In fact, i don't know what codec i need. But without it the resulting temp AVI is just black.
So I wrote ffmpeg provider for Cuttermaran. It works great with YV12 option but as I think ffmpeg doesn't detect interlacing in AVI. Even if the source is interlaced, the resulting mpeg has progressive chunks. Is there interlace autodetect option in ffmpeg?

leoenc
13th December 2007, 17:06
Not AFAIK, but berrinam wrote an AVIsynth detection algorithm, maybe you can use it somehow with ffmpeg?
http://avisynth.org/mediawiki/Interlace_detection

bigcat
13th December 2007, 17:37
Thanx for help, luckily Cuttermaran gives information about interlacing, so autodetection is not needed anymore. The problem is inside ffmpeg. The latest build for Windows i could find (SVN-r11143) does not encode interlaced at all! Flags +ilme+ildct make no difference, the output is still progressive. Previous build encodes interlaced fine however. SVN-r11143 is quite buggy at all, e.g. when i change sws_flags, output bitrate gets locked to 90 kb/s.
In the attachment there's provider I wrote (if you use it, change all path to ffmpeg.exe, xmlparse.py and python.exe for yourself and put extracted files into Provider\encode folder). Needs Python.

leoenc
13th December 2007, 20:48
Yes, I agree - the latest build is buggy.
I posted earlier today a question regarding a different issue (speed\quality), hoping to get an answer from Celtic Druid.