Introduction | Drivers (DVB/ATSC hardware) | iTele (viewer app) | Mpegitor | Forums

Mpegitor

You what?

Mpegitor is a little app for editing MPEG-2 Program Stream movie files, in particular ones produced by recording in my Digital TV / HDTV app iTele. The idea is that you select the parts of the recording that you want to keep, and then export it to an MPEG-2 VOB file suitable for burning to a DVD.

Download

Download Mpegitor v0.1.2

Operation

Drag a '.mpg' file onto the Mpegitor window to open it up. The movie will start playing immediately. You can't do much in Mpegitor while the movie is playing except watch it (which you are perfectly entitled to do :). You can scrub around the movie with the slider at the bottom of the window. The slider knob as well as a little text item both show the offset of the last keyframe seen by the file reader (may be a little ahead of currently displayed one). The arrow keys jump forward or backward one keyframe. Hold down option to jump forward or backward about 10 keyframes (not exact - just skips 8MB).

When you want to do some editing, you will first have to pause the playback with the pause button (or the space bar). To avoid any strenuous re-encoding, editing can only be done on keyframe boundaries, and unless you are very lucky the movie will not have paused exactly on a keyframe. You can use the 'Sync to Keyframe' menu item to move to the nearest keyframe (or thereabouts :). Also, if you use the arrow keys or playhead slider while paused then the movie will always show exact keyframes.

Once you're synced with a keyframe, you can set some editing marks. Editing works inclusively - i.e. you have to select the bits of the movie that you want to keep. (As well as being what you generally want with recordings from TV, this is actually necessary to tidy up the start and end of the .mpg file to sync on keyframes). To create a new pair of edit marks, use the 'Enter Mark at Playhead' menu item. You will see a thin grey line at the playhead in the slider. If you go to somewhere else in the movie and select the menu item again, it will extend that segment you just defined to the current position of the playhead, selecting all of the video in between. You can also use the 'Fetch Mark to Playhead' menu item to move the nearest mark to the playhead, or the 'Delete Mark at Playhead' to delete the marks that the playhead is between. Please take the time to appreciate the pretty blue Aqua selection bar - it took me 3 hours to get it looking like that! :)

Once you have some edit marks, you can move between them by holding down the command key and using the arrow keys. If you choose 'Save', then your set of marks will be saved alongside your .mpg file, with '.edit' appended to its name. Then next time you open the movie those marks will be reloaded (you can't open the .edit file yet, sorry). When you are happy with your marks, choose the 'Export to Vob' option from the file menu. Mpegitor will write a new file named like your movie with '.vob' appended to its name, including only the segments you have selected. For movies of any decent length it will take some time to write this file out, but at least you get to watch the slider knob do its thing. In the interests of speed the movie is not displayed as it is remultiplexed. Unfortunately there is as yet no way to preflight your edited movie, so you will have to use your imagination :)

And that makes a DVD how?

This is how I created a DVD. I've only done one so far, and I'm sure other people know much better ways (Sizzle? Project-X?) but this is what I did and it worked first time (to my immense surprise as you can imagine :)
  1. Edit source MPEG files with Mpegitor to remove unwanted bits.
  2. Use 'dvdauthor' to build dvd:
    1. mkdir ~/advd
    2. dvdauthor -o ~/advd episode1.mpg.vob
    3. dvdauthor -o ~/advd episode2.mpg.vob
    4. dvdauthor -o ~/advd -T
  3. Use 'mkisofs' to build iso image: mkisofs -dvd-video -v -o ~/advd.iso ~/advd
  4. Run 'Disk Utility'. Drag advd.iso from you home directory into pane on bottom left. Insert blank DVD. Click Burn button.
And then you will have a DVD! I haven't looked into dvdauthor and friends to know how to make a pretty table of contents or other stuff (so you can easily get between multiple titles, for a start!) - but those are the basics.

Note that a side effect of this method is that (if you don't delete intermediate files) you need 4x the size of the DVD in disk space (originals, vobs, dvdauthor staging area, and iso9660 image). You can do a little better if you delete the files from the step before last before each step (but don't delete your source .mpg files! See Notes below).

So, get ready, clear some disk space, take care, and happy burning! Let me know if I just helped you expand your collection of coasters!

Notes

Change Log


Last updated 19/9/2004 by John Dalgliesh