Capturing And Encoding VHS Home Video to DVD and MP4 Web Videos

From Catholicpenguin

  • Writeup:
    • Inability to adjust saturation/brightness with ffmpeg (after hours messing with SoC 2009 non-committed patches).
    • mplayer and VirtualDub loose audio sync with AVI files.
  • WinTV2000 AVI (MJPEG + PCM) -> MP4 ffmpeg command. Deinterlacing does not work.
ffmpeg -i ~/enc/movie.avi -acodec libfaac -ab 32k -s 352:480 -vcodec libx264 -vpre hq -vpre ipod640 -b 1000k -bt 1000k -aspect 4:3 -threads 2 -f ipod OUTPUT.m4v

ffmpeg to DVD settings

These flags force ffmpeg to treat the incoming material as interlaced. You may have to change top to 0 if the output looks wrong.

  • ffmpeg -i in.avi -target ntsc-dvd -aspect 4:3 -flags +ilme+ildct -top 1 dvd.mpg

Todo: When burning half-D1 material, additional flags may be required to force ffmpeg to stretch the aspect ratio to 4:3. Then, make the DVD using dvdauthor (may need to sudo port install dvdauthor on OS X)

  • dvdauthor -o dvd -x author.xml

Use an XML file like the following, as can be found on dvdauthor's site.

<dvdauthor>
    <vmgm />
    <titleset>
        <titles>
            <pgc>
                <vob file="dvd.mpg" />
            </pgc>
        </titles>
    </titleset>
</dvdauthor>

Then, make the ISO from the DVD, using settings from sites like these.

  • mkisofs -dvd-video -V Title -o dvd.iso DVD

Then, burn the resulting ISO using whatever. (Disk Utility on OS X)

An alternate method of burning DVDs that uses mpeg2enc also looks promising, however, I have not tried it as the above toolchain works fine.

Low Quality Web Video Settings

  • Target playability on 768/X connection.
  • Theora: (assuming a 352x480 source)
ffmpeg2theora --aspect 4:3 -A 32 -c 1 -V 700 --soft-target file.avi