Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label conversion. Show all posts
Showing posts with label conversion. Show all posts

2009-08-27

HOWTO: AVI to DVD Conversion, Part 2: Merging Multiple AVIs

Converting a single AVI to DVD format is easy.

However, if you want to merge multiple files into a single DVD image, you must:

  • Convert the AVI files to MPEG:
    for f in $(ls /path/to/season1/{GI_Joe.S1E0*.avi,GI_Joe.S1E1*.avi,GI_Joe.S1E2{0,1,2,3}*.avi}); do \
      g=${f/.avi/.mpg}; g=${g/season1/season1_mpg}; \
      transcode -i $f -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie \
        -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97; \
      mplex -f 8 -o $g  movie.m2v movie.ac3; \
      rm -fr movie.m2v movie.ac3; \
    done; \
    cd /path/to/season1_mpg
  • Next, using a more complex dvdauthor.xml file...
    <dvdauthor dest="DVD_Season1_Ep01-05">
      <vmgm />
      <titleset>
         <titles>
           <pgc>
             <vob file="GI_Joe.S1E01.The_Further_Adventures_of_G.I.Joe.mpg" chapters="0,8:00,16:00,21:00"/>
             <vob file="GI_Joe.S1E02.Rendezvous_in_the_City_of_the_Dead.mpg" chapters="0,8:00,16:00,21:00"/>
             <vob file="GI_Joe.S1E03.Three_Cubes_to_Darkness.mpg" chapters="0,8:00,16:00,21:00"/>
             <vob file="GI_Joe.S1E04.Chaos_in_the_Sea_of_Lost_Souls.mpg" chapters="0,8:00,16:00,21:00"/>
             <vob file="GI_Joe.S1E05.Knotting_Cobras_Coils.mpg" chapters="0,8:00,16:00,21:00"/>
           </pgc>
         </titles>
      </titleset>
    </dvdauthor>
    ...merge the MPEG files into a single disc image:
    dvdauthor -x dvdauthor_s1e01-05.xml
  • Verify the video and audio will play.
    xine dvd:/full/path/to/DVD_Season1_Ep01-05
  • Burn the DVD.
    growisofs -Z /dev/dvd1 -dvd-video DVD_Season1_Ep01-05/

Yo, Joe!

2009-07-13

Workin' For The Wiikend

After acquiring my first DriveKey-powered "try before you buy" Wii game via torrent (and having a little fun fighting the Joker's minions off while occasionally blowing Robin into his component bricks with a well-placed BatBomb), I decided tonight to do a little more hacking. Thanks, CanadaMods.ca!

So, with the wife out watching some chick-flick w/ a friend, I got to spend a few hours playing with the HomeBrew Channel on my Wii. Very cool stuff available, from game emulators & ports, to new games, media players, and utilities. Complete list here.

To set up the HomeBrew Channel, follow these steps, including installation of the DVDx application so your Wii can play video DVDs.

Then, install the HomeBrew Browser, and grab some more software. After numerous tests, crashes, and reboots, I found that the best three options for playing video are these, all available through the HomeBrew Browser or via manual download from wiibrew.org.

Here's what I tested:

App 2G SD card w/ .mp3 Bus-powered 2.5" 500G USB drive w/ .avi DVD-R w/ .avi DVD-R Video DVD (burned w/ growisofs from dl'd .avi torrent) [1] Video DVD (original, possibly DVD-DL? or DVD+R)
GeeXboX (embedded linux) Y Y N N N
MPlayer CE Y Y Y Y N
MPlayer TT Y Y N
So, while I have scripted the process for easily converting .avi to DVD, I now no longer need to do so -- I can just plug my USB drive directly into the Wii and watch it on the big screen w/o having to waste hours in format conversion. Wii!

2009-05-16

HOWTO: AVI to DVD Conversion

Yesterday I set about learning how to convert a Xvid-encoded .avi to DVD so that my more technically challenged relatives can watch an HBO movie that's not available in video stores.

Here's the process, with approximate elapsed times. Thanks go entirely to linuxquestions.org for the solution.

Hardware used: Thinkpad R51 (Pentium M 1.6GHz, 1.2G RAM) + Samsung USB DVD-DL burner (16.4x1352KBps).

  • Acquire your .avi file source. For a 1.1G .torrent, this took 2 hours.
  • Copy the source onto a drive with sufficient space to re-encode it. 20 - 25 minutes for USB-to-USB copy between drives.
  • Verify installed software requirements. I still have an old copy of xubuntu on the R51, so I needed to install these tools. Under 2 minutes.
    apt-get install dvdauthor dvd+rw-tools \
      transcode mplayer ffmpeg mjpegtools xine
    
  • Create a dvdauthor.xml file. Under 2 minutes.
  • Check for 5.1 audio; if the following yields a result, run tcextract; otherwise skip. For my video, skipped. Seconds.
    mplayer -vo dummy -identify movie.avi
    tcextract -d2 -i movie.avi -a0 -x ac3 | tcextract -d2 \
      -x ac3 -t raw > movie.ac3
  • Split the 16:9 NTSC widescreen .avi into movie.m2v (video) and movie.ac3 (audio). Create an MPEG from the audio and video pieces. Generate DVD/AUDIO_TS/ and DVD/VIDEO_TS/ dirs in the current dir using the dvdauthor.xml to add chapters every 15 minutes. All three steps back-to-back, 6 hours.
    transcode -i movie.avi -y ffmpeg --export_prof dvd-ntsc \
      --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J \
      modfps=clonetype=3 --export_fps 29.97; \
      mplex -f 8 -o movie.mpg movie.m2v movie.ac3; \
      dvdauthor -x dvdauthor.xml
  • Verify the video and audio will play. Seconds.
    xine dvd:/full/path/to/DVD/VIDEO_TS/
  • Burn the DVD. 90 minutes for a 2.8G DVD image USB-to-USB burn.
    growisofs -Z /dev/dvd1 -dvd-video DVD/

Total time to acquire a 1 hour 43 minute DVD: just under 10 hours. Your mileage may vary.