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

Showing posts with label dvd. Show all posts
Showing posts with label dvd. 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-18

HOWTO: Burn ISO image to DVD w/ linux commandline

When burning an ISO image to disc, I simply use this:

$ growisofs -dvd-compat -speed=1 -Z /dev/dvd=disc.iso
Using -speed=1 takes a little longer than the default "as fast as possible" mode, but guarantees the disc can be properly read in the pickiest of drives (eg., a Wii DVD drive). DVD-R (not DVD+R) is also recommended.

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.

2008-09-29

From DVD to online Flash video with dvd::rip, FFmpeg, and JW FLV player

Last week I set myself the task of finally figuring out how to convert a DVD to Flash video, then to post it online. Turns out with the latest xubuntu 8.04, dvd::rip, FFmpeg, and the JW FLV player, it's quite straightforward.

Step 1: Convert a DVD to AVI file (.avi)

After a number of tests with dvd:rip 0.98.6 (installed .deb version: 1:0.98.6-0.0ubuntu1) and transcode 1.0.2 (installed .deb version: 2:1.0.2-0.8ubuntu7), I've settled on this configuration:

Storage
  • On the fly
Clip & Zoom
  • Autoadjust or No modifications (original size)
Subtitles
  • Activated for rendering
Transcode - Video
  • AVI/Xvid, 50 keyframes,29.97 video framerate
  • Single pass encoding, no deinterlacing
  • 1 x 850M (for 2hr DVD track)
Transcode - Audio
  • MP3 audio @ 128 kbit/s x 44100 Hz (required for .flv conversion)
  • Quality 2
  • Nice 0 or 19
  • No PSU core

I managed to rip a 2hr DVD track in about 4 hrs, resulting in an 850M AVI file. This was using my new Samsung 20X USB DVD-RW drive (TSSTcorp CDDVDW SE-S204N), writing to my Western Digital 160G USB bus-powered hard drive. Considering USB to USB read-and-write tends to be slow, I'd consider this pretty good performance, especially for a 1.6GHz machine with only 1.2Gb of RAM.

Here's the resulting .dvdrip-info file:

Step 2: Convert an AVI file (.avi) to Flash Video (.flv)

The next step is to convert your .avi to .flv using FFmpeg (installed .deb version: 3:0.cvs20070307-5ubuntu7.1+medibuntu1). There are lots of config options for this, but the simplest is this, where file types is determined from the input and output filenames. If your input file includes MP3 audio @ 128 kbit/s x 44100 Hz, you'll be able to convert to Flash Video (.flv):

ffmpeg -i input.avi output.flv

Step 3: Streaming Online

Finally, to post the video online, you can upload host it on your own site using the JW FLV Player. The site includes tons of examples including this one for creating a player with chapter, thumbnails, and decriptions. In addition to video, the player also works with audio files and still images, and can be skinned a number of different ways.

2007-12-04

Eclipse Development All-In-One

I'm shocked. Check this out:

Twelve per cent [of those companies surveyed] said they focussed “exclusively” on .Net development while an additional 49 per cent focussed “primarily” on .Net. Only three per cent of enterprises were exclusively Java shops, while an additional 20 per cent focussed “primarily” on Java.
...
But as more companies adopt Microsoft Exchange as their messaging software and SQL Server as their database, the decision to use .Net develop tools is “almost a no-brainer,” Goodall said. (source).

This seems counterintuitive to me. Sure, there's entrenchment. Sure, there's comfort in using Microsoft products as for most people that's who provides their operating system, office tools, and mail software. But c'mon, which companies did they survey? I'd love to find out but I can't find a copy of their survey results online, and even if I could I'm not about to cough up $150 - $990 for a 200K PDF file. Begs the question -- who commissioned this report, and how deep are their pockets? IMHO, there's a fine line between market research and marketing.

Or... is it possible that OSS people just don't have time to answer surveys because they're too busy contributing to their community? ;-)

Pointed pontifications aside, perhaps the real point here is that Microsoft does a better job at selling the 'one stop shop' idea of operating system + office tools + database + mail tools + mail server + dev platform. Sure, all of that is also available in the FLOSS / LAMP world, but are we failing to market it it as a cohesive offering? Is it still too disparate, too complex?

And has anyone thought of building an ubuntu + Ganymede self-contained offering? I know there's some cool virtual appliances out there, such as Grandma's LAMP, but AFAIK there's never been an attempt to bundle Eclipse w/ an OS for an all-in-one offering. Now that there's an Eclipse Store and an Eclipse Donations site, isn't it time for some Eclipse DVDs to complete the trifecta? Along with the new EPP bundles planned for next July, wouldn't it be cool to have an Eclipse Ganymede + ubuntu 08.04 Distro DVD? A collector's item, for sure.

Oh, and with the advent of the EMF4Net proposal (yes, that's EMF for the .Net plaftorm), this all-in-one DVD would also allow people to develop C# apps as well as Java. And php. And perl. And ruby. And python. And C/C++. Whoops, there we go again with too many choices. ;-) Once again, maybe Microsoft continues to dominate mindshare not because they're better or more entrenched, but out of a sense of simplicity.

So, here's my new mantra:

Simple is sexy.
Options are overwhelming.

Agree? Disagree? Post your thoughts here, or blog them and/or link here. I'd love to know your experiences as a customer or as a vendor, as a client or as a developer.