Using FFmpeg to produce an interlaced mpeg2 output, from an interlaced source (i.e. DV), I have a doubt regarding the flags to use.
-ilme -top 0
does produce a valid interlaced output BFF, according to MediaInfo.
From FFmpeg online documentation, 'ildct' and 'alt' parameters can be used as well:
-flags +ilme+ildct+alt -top 0
The question is: in your experience, are 'ildct' and 'alt' really needed to produce a good quality interlaced output?
Bye
+ Reply to Thread
Results 1 to 10 of 10
-
Last edited by _MrC_; 2nd Jun 2013 at 08:41. Reason: Correction DV is BFF -> top 0
-
I have never used FFMPEG in my life and can't find what those terms mean in the link. But if 'alt' means alternate scanning then, yes, that's standard practice when encoding as interlaced (as opposed to zigzag scanning). I have no idea what 'ildct' means. 'Intrablock DCT Precision', maybe? Which should be 10-bit, so maybe that's not it.
The free Tecoltd Bitrate Viewer gives you the Scan type, DCT Precision, Quantscale and other information. But you probably already know that. This is the link for it, and not the one above where I wrote the name:
https://www.videohelp.com/tools/Bitrate-Viewer -
I use FFmpeg to do CBR encoding from an AviSynth script. The avs script takes care of picture resizing and framerate adjustment (if needed). This is the "basic" cmd line:
-i test.avs -aspect 16:9 -c:v mpeg2video -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 2000k -dc 9 -ilme -top 0
this cmd line is currently implemented in latest AVStoDVD 2.7.0 alpha release and the output is DVD compliant, according to MediaInfo report. Quality seems to be ok (IMO).
The point is if 'ilme' flag is really enough (how it seems to me) to have a good interlaced encoding, or if the other FFmpeg interlacing-related flags should be added? Do they make any difference?
-i test.avs -aspect 16:9 -c:v mpeg2video -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 2000k -dc 9 -flags +ilme+ildct+alt -top 0
Probably this doubt is somehow fussy, but I would like to implement the best flags for interlaced encoding with FFmpeg in AVStoDVD.
Bye -
The flag alt is deprecated in recent FFmpeg versions. You now have to use -alternate_scan 1 as a command
This is from an old CCE documentation pdf...
5.3.8 Block scan order
Specify how to scan 8×8 DCT blocks when coding the quantized data.
This setting works on MPEG-2 output. Generally, Alternate scan is
used for the interlaced source, Zigzag is for the progressive source. If
you select Auto, block scan order is automatically selected depending
on Progressive frame setting (page 78 5.3.11 Progressive frame).
When Progressive frame is specified, zigzag scan will be applied on the
frame. When Progressive frame is not specified, alternate scan will be
applied. -
I believe +ildct reduces DCT ringing artifacts from one field appearing in the other field. Zoom in on the following bobbed image ("-flags +ilme" on the top, "-flags +ilme+ildct" on the bottom):
Those vertical bars move about half the width of a bar with each field. -
Thanks Manono, Chris and Jagabo for the useful hints.
I'm going to use the following command:
-i test.avs -aspect 16:9 -c:v mpeg2video -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 2000k -dc 9 -flags +ilme+ildct -alternate_scan 1 -top 0
Bye
Similar Threads
-
mpeg2 MP@ML with ffmpeg
By rullbandspelare in forum Video ConversionReplies: 5Last Post: 8th Dec 2013, 22:09 -
x264vfw - interlaced encoding not supported?
By sphinx99 in forum Video ConversionReplies: 1Last Post: 11th May 2013, 07:11 -
ffmpeg output 2gb limit? Is there one? ffmpeg stops encoding h264 @ 2gb
By BrainiakZ in forum Video ConversionReplies: 14Last Post: 30th Mar 2011, 12:04 -
Interlaced AVCHD (Pansonic HD camcorder) to X264 progressive with ffmpeg
By chicken264 in forum Video ConversionReplies: 0Last Post: 27th Jun 2010, 12:58 -
Re-encoding interlaced order?
By drewzor in forum Newbie / General discussionsReplies: 8Last Post: 27th Sep 2008, 07:06