VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. 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
    Last edited by _MrC_; 2nd Jun 2013 at 08:41. Reason: Correction DV is BFF -> top 0
    MrC

    AVStoDVD Homepage
    Quote Quote  
  2. 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
    Quote Quote  
  3. Note that DV is bottom field first.
    Quote Quote  
  4. @manono

    thanks for the input.

    Originally Posted by jagabo View Post
    Note that DV is bottom field first.
    Noted. Edited.



    Bye
    MrC

    AVStoDVD Homepage
    Quote Quote  
  5. I don't use ffmpeg much and have never used it to convert DV to MPEG 2. Can you provide the full command line you are using? Thanks.
    Quote Quote  
  6. 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
    MrC

    AVStoDVD Homepage
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    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.
    Alternate scan means; always scan from the left to the right (if I remember well).
    Quote Quote  
  8. 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):

    Name:  comp.png
Views: 19805
Size:  71.8 KB

    Those vertical bars move about half the width of a bar with each field.
    Quote Quote  
  9. 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
    MrC

    AVStoDVD Homepage
    Quote Quote  
  10. I think the "-alternate_scan 1" option helps a bit with compressibility.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!