VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Say you have an archive of DVD-Video ISOs that you want to transcode, but you don't want to extract each ISO manually and combine the VOBs to use as an input file for your transcoder.

    With Linux loopback interfaces and the cat command, it's possible to transcode straight from ISOs without any intermediary files.

    Here's an example bash script:

    Code:
    #/bin/bash
    bitrate=$1
    for i in *.iso
    do
            basename=$(basename $i .iso)
            mount -o loop,ro -t iso9660 $i /mnt/loop0
            cat /mnt/loop0/VIDEO_TS/VTS_01_?.VOB | ffmpeg -i pipe: -target ntsc-dvd -s 720x480 -b $bitrate -pass 1 -aspect 16:9 -r 29.97 -vf yadif -y -mbd rd -trellis 2 -cmp 2 -subcmp 2 -an -threads 4 -f rawvideo -y /dev/null
            cat /mnt/loop0/VIDEO_TS/VTS_01_?.VOB | ffmpeg -i pipe: -target ntsc-dvd -s 720x480 -b $bitrate -pass 2 -passlogfile ffmpeg2pass -aspect 16:9 -r 29.97 -vf yadif -y -mbd rd -trellis 2 -cmp 2 -subcmp 2 -acodec copy -threads 4 $basename.mpg;
            umount /mnt/loop0
            rm -f ffmpeg2pass-0.log
    done
    If executed in a directory that contains a bunch of ISOs, this script will:
    • Mount the ISO on /mnt/loop0
    • On-the-fly, combine all VOBs and pipe them to ffmpeg for a 2-pass encode
    • Use the ISO's filename as the name for the output file
    • Use the first argument as the target bitrate
    Usage:

    Code:
    sh isobatch.sh <target video bitrate>
    
    e.g.:
    
    sh isobatch.sh 3087k
    Quote Quote  
  2. Member
    Join Date
    Aug 2002
    Location
    Sweden
    Search PM
    Great tip!

    I did not know it was possible to use cat to join VOB files.
    Some day I will try to learn the MPEG-2 encoding settings of ffmpeg.
    I mostly use HCEnc with wine, but on some systems I don't want to install wine (like on the server).
    Ronny
    Quote Quote  
  3. In the above example I'm using a 2-pass, DVD-compliant MPEG2 invocation. It's a good starting point for any MPEG2 encode.
    Quote Quote  



Similar Threads

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