Monday, November 12, 2007

VOB Files and Adobe Premiere - Editing from DVD

I often find myself being given DVDs as source videos for a project. Whether it's creating a wedding video, a sports highlight film, a tribute video, or some other project, more and more people have their video footage on DVDs (only) these days. Obviously this is not a great situation for editing - the video file has already been compressed, so you've already lost quality to begin with. But the fact is that you have to work with what you've got.

You'd think that getting the files off the DVD to edit in Premiere (or the NLE of your choice) would be simple - copy the VOB files and drop them into Premiere. Oh that life were so simple. Premiere doesn't recognize VOB files. So you rename them to .MPG (or .AVI) and drop them into. That seems to work until you put one on the timeline and get no audio. If the DVD used AC3 as the audio track, then you'll have no audio because you can't bring an AC3 file into Premiere. I wish you could, but you can't - I think it's a copyright thing. Maybe you're lucky and the DVD you have was created using MPEG-1 Layer II as the audio. You drop it on the timeline and get audio but it just doesn't play back very well. Premiere stutters and playback is so bad it's unusable.

I've used a slew of tools to try to make this process easy on me and while there is no "Easy button" I've figured out something that works for me.

Enter VirtualDubMod. You can download it from sourceforge at:
http://sourceforge.net/project/showfiles.php?group_id=65889
Yeah, I know - it hasn't been updated forever, but it still works great. Sure it's not the most user friendly and pretty "open-source-ish" and to be honest I don't know what half of its features actually do, but it's a wonderful tool. The basic idea is that you open each VOB file and save it as an AVI. What? Render each file? That will take forever and gobs of hard disk space! Don't fret just yet, keep reading. (I'll talk using different tools to edit the compressed files later, but I prefer to edit with DV AVI files).

The first thing is getting the files off the DVD. Sure you can just copy them, and most of the time that works (for non-encrypted files) but sometimes it doesn't, you can get very weird results. For best results, I use another great little utility called DVDDecrypter. Its main purpose is really to break the Macrovision (or other) encryption on copyrighted DVDs and let you get at the video files. But that's a legal gray area, and that's not what I actually use it for. Most of the DVDs I'm given to use are not copy-protected. You can download DVDDecrypter from:
http://www.dvddecrypter.org.uk/

Ok, now you've got a bunch of .VOB files on your hard drive. It's time for VirtualDubMod. The first thing is that VirtualDubMod will create uncompressed AVI files. Many people think that's what they want, but actually it isn't. What you want (for optimal editing in Premiere) are DV AVI files, which VirtualDubMod doesn't make (out of the box). You have to get a DV AVI codec, which can be suprisingly hard to find. I use the Panasonic DV codec because it's free and you can download it from:
http://www.free-codecs.com/download/Panasonic_DV_Codec.htm
which also contains instructions on installing it. Once installed, it will show up as an available codec in VirtualDubMod (save as -> select AVI as the file type -> click change button -> select Panasonic DV Codec.) Now you can open the VOB file directly with VirtualDubMod and save it as a DV avi file and bring it into Premiere. Life's getting better (we're not done yet)!

Sometimes I have 10-12 DVDs of a whole football season and I need to make a highlight video. Sometimes the VOB files are little 5 minute clips on the DVD (depending on how it was created), so there are hundreds of VOB files. I don't want to open each one individually and click save as hundreds of times and wait for each file to transcode. Here's where VirtualDubMod gets cool. You can save that task for later, and then run them all at once with "Job Control." Ok, so that's better, but I still need to open the file (which takes a few seconds by itself), click save as, and give it a file name. That can still take forever. This brings me to the real reason I'm writing this article: scripting the VOB to AVI Job Control list for VirtualDubMod.

I wrote a little vbs utility (I know, you PHP and perl gurus out there are gagging) to search through a directory structure, find all the VOB files, and create a job control script that can be opened in VDubMod. (download link below) Ok, now your work flow looks like this:
1 - Use DVDDecrypter to get the VOB files onto your hard disk, in a separate folder for each DVD, all in the same parent folder. (I use two machines for this so I have two going at once, then copy the VOBs over to the same machine later)
2 - Run my script to create the Job Control List for VDubMod
3 - Open VDubMod, load the script, hit start and watch it crank away.
4 - Go to bed. It's going to be awhile. (Or if you have a fancy enough processor do something else while it's processing, like write a blog about it, which is what I'm doing write now. :-) )

Here is the script (lots of programs might complain about you downloading a VBS file, so I've renamed the extension to JRR. Rename it back to VBS after downloading):
createVirtualDubModJobs.jrr

My script is VERY unrefined, as I just created it. I'll probably refine it and upload a better version, but it works. You just need to edit the script and find the variables that set the parent folder for all your VOB files and the destination folder. The script assumes you have one parent folder with one or more subfolders that contain VOB files. Feel free to tweak to your liking.

Yes this will take gobs of hard disk space. Yes you still need to copy all the VOB files from the disks to your computer. Yes you still need to wait for VirtualDobMod to transcode all the VOB (MPEG II) files to DV AVI files.

Can't I just edit the VOB files in Premiere you ask? Yes - sort of. You can get a AVISynth Premiere Plugin, but it's a complicated, laborious process that you can't really script (have to do each VOB one by one). Also, I haven't played with it a lot, but I haven't had much luck getting it to work with Premiere CS3 anyway. If you want to look into it, here's the instructions and all download links for the relevant utilities:
http://www.wrigleyvideo.com/forum/index.php?s=776d0be8c3c99092874bce53a3756694&showtopic=22869

Labels: ,

19 Comments:

At 5:32 PM, Anonymous brinnis said...

heres an easy way to get your .vob files into adobe premiere:
1. DVD decrypter

2. add .vob's to DVD2AVI - (part of DVD2SVCD) and click save (makes a .d2v file and a .wav audio file)

3. use TMPEnc suite and click NTSC video cd, then browse for your .d2v file for video, and .wav for audio track.

4. Click ok, and ok then go to Other Settings and down bottom go to Highest Quality (very slow)

5. will output all .vobs as a high quality mpeg with high quality audio.

SIMPLE

 
At 6:19 PM, Blogger Josh said...

Thanks for your comments - that is also a good workflow, but still quite a bit of work just to end up still editing in MPEG, especially if you have a lot of VOB files. The point of my blog was taking a bunch of VOB files, and scripting the conversion of ALL of them to DV AVI.

 
At 11:13 AM, Blogger Jeremy said...

I renamed the VOB to MPG and it worked with audio. So it's only with AC3 as the audio track where this doesn't work?

 
At 11:52 AM, Blogger Josh said...

If you are referring to getting it to work in Premiere, then yes, it is just when AC3 is used for the audio track that it won't work. If you are talking about just renaming the file and playing it in something like Windows Media Player, then it may still work even if the audio is AC3 - you just won't get the audio when importing into Premiere. There are other issues that can arise by just renaming the VOBs, depending on how the DVD was authored. Sometimes it works, sometimes not. It's always safer to use DVDDecrypter to transfer the VOB files off the DVD, and better yet to convert the VOB's to DV AVI if you plan on using them to edit.

 
At 3:31 PM, Anonymous Anonymous said...

Nice to see serious pros still using serious tools (I mean Vdub, not Premiere!)Ever run into trouble because of inverted fields? I mainly use PAL, and it seems a lot of ppl with "desktop" DVD recorders usually get upper field first multiplexing in their VOBs.

 
At 11:40 AM, Blogger Josh said...

Your comments prompted me to do a little investigation. I found that when bringing the mpg into Premiere (just a renamed VOB) that there was no field dominance problem. So the original VOB seemed to use the standard lower field first. However, after using VDub to convert to DV AVI (using the Panasonic DV Codec), then it was very jerky (particularly if I stretched the speed out for slow motion) until reversing the field dominance (upper field first). I had previously just been deinterlacing the footage to smooth the footage, which of course removes a lot of detail and isn't the best solution, but it seems to work ok (at least better than very jerky slow motion). Reversing the field dominance will be a MUCH better option (or just editing with the MPGs rather than converted AVI's) and give me much smoother, more detailed slow motion. I'll have to fully test from multiple sources all the way through my editing process to a finished DVD, to verify this, but thanks for the comments! Maybe I'll change my workflow back to editing the MPGs and just using a demuxer to get the audio into Premiere when it's AC3.

 
At 1:46 PM, Anonymous Anonymous said...

I tried to follow your instructions on usind Virtualdubmod with the panansonic codec. Now I try to open with windows movie maker and avidemux and the sound doesn't come through in either editor. So, does that mean that I didn't install the codec correctly, or do I need another codec? I don't have adobe premier...

 
At 2:08 PM, Blogger Josh said...

I would guess that your issue is that the original DVD was encoded with AC3 audio and you don't have a AC3 codec registered on your machine, or at least with whatever application you are trying to play the avi back with.

Try this: in VirtualDubMod, go to streams -> stream list. You should see at least one source listed here, and it should tell you what type it is (AC3, MP3, WAV, etc.). If it is AC3, then click the Save WAV button. You will then have to bring the video and audio into your editing app individually, or use a tool to multiplex them back together.

 
At 11:11 PM, Blogger J R said...

A number of people have asked about audio problems when dealing with files encoded with AC3. I completely forgot that a long time ago I registered an AC3 codec on my machine - and I didn't mention that earlier. If you haven't done so, then VirtualDubMod may spit out an video file with no audio (or you may have no audio playing back the file in VDubMod. You can get the ac3 codec here.
Unzip the file, right click on AC3ACM.inf, and select install. Relaunch VDubMod and you should now have audio (and so should your exported files). No mess, no demuxing, just one nice file with audio. Sorry I forgot to mention that.

 
At 7:05 PM, Anonymous Anonymous said...

Are you saying that Adobe doesn't have any plugin for importing .VOB files or, a way of converting them without loosing quality??? Are you saying that the last 3 days I've spent looking for a plugin have been totally waisted??

Look, I can afford paying for a stupid plug-in, I can afford buying a converter... I've read a lot of the posts, but I need this strait... I have Adobe Premier CS3, I have 30 hours of .VOB files that I need to edit or convert into an AVI and then edit... I need a solution, not a possibility, because there is one thing I cant afford... being in the same place I am now, next week!

I'm going to give the other idea's a shot in the mean time... but if you can, I would really appreciate an answer... Thankyou for all you've done so far, I think its been helpful to a lot of other people besides me.

 
At 6:30 PM, Blogger J R said...

There is the AVISynth plugin mentioned above (see the link to wrigleyvideo.com in my original post) but it is meant for Premiere 1.5. I tried it in CS3 and couldn't get it to work, but honestly I didn't try very hard. As far as I know, there is no other plugin for VOB files, but I am not the definitive resource - you could check the adobe forums, but I think you'll find much of the same information - with a whole lot of people who'll readily criticize you for attempting to edit already compressed files. As far as you mentioning quality loss, you really don't lose quality converting the files to AVI (as long as you are using the right codec), nor do you lose quality using a workflow that allows you to edit the original VOB files (like just renaming them to MPG and using a AC3 to WAV demuxer). They have already been compressed, so the loss of quality occurred when they were converted to VOB files to put on DVD, and will occur again when you transcode them back to MPG to put on a DVD. Obviously you don't want to edit from compressed files if you have access to the original files (like the DV avi's).

It boils down to two options for you:
1 - Rip the VOB files off the DVDs (assuming they are on DVDs), rename to MPG, and use a demuxer to convert the AC3 files to wav files (assuming they are AC3 - it is possible the DVDs used MP3 audio, but that is not common).
2 - Rip the VOB files, use VirtualDubMod to convert them to DV AVI (and my script, if you want to automate the creation of the VDubMod jobs), let VDubMod crank on them all night, and edit in AVI.

There are pros and cons to both options. #1 requires a lot of manual time to demux the files. You edit in MPG, so your editing performance is reduced, and your render time for the finished product will likely take longer. But you get to editing quicker, and you don't use a ton of hard drive space for the AVI's. So my advice: accept the fact that there's a fair amount of work to do editing from VOB files, pick your poison, and start cranking.

By the way, if anyone is looking for a program to rename all your VOB files to MPG, I use a program called Batch File Renamer (http://cerebralsynergy.com/download.php?view.55)
There are lots of programs out there, this is just one I link that does everything I need (recursion, incremental counter, number padding, simple replace in file name or extension, change case, etc.)

 
At 12:27 AM, Blogger bali said...

If I won't do a heavily video editting (filter - multiple composite track - blue screen, etc)
from mpeg/vob source, I prefer to edit with womble mpeg video wizard.

you can do the following :
1. title composite
2. audio-video fade in-out
3. background music
4. transition

the good things, if you will export the final as the same mpeg source format it will only render
the audio/video which is edited,
save a lot of time.

 
At 5:41 PM, Anonymous Anonymous said...

there is an easy way to import mpg videos with ac3 audio into premiere Cs3. Just download "ad2ac3dec.dll" from thw web, its easy, and paste into the premiere folder!

 
At 5:51 PM, Anonymous thealanknox said...

jr,

that ac3 plugin you mentioned a few comments earlier was all it took for me.

here's my method that's working for me:

[1] drag drop .vob file; [using dvd decrypter only if i have to]

[2] rename .vob to .mpg

[3] opening .mpg file in virtual dub, and then doing the streams/streamlist/savewav

[4] import .mpg into premiere cs3, and then .wav into premiere cs3

[5] you might have to nudge audio a frame or two to the right in case it's outta sync

before downloading that ac3 codec, i could save the wav but couldn't play it. now it's all gravy. josh, jr, i know my post doesn't apply to the batch & script method you've formulated, but maybe this summary will work for other pc, production premium cs3 folks out there.

good luck,
ak

 
At 9:57 PM, Blogger J R said...

The tip about pasting ad2ac3dec.dll into the Premiere tip is a great tip!! Thanks! You don't actually have to even download it from the web - you can get it from the Encore folder. (Typically c:\program files\adobe\adobe encore cs3\ad2ac3dec.dll - paste it into the Premiere folder, typically C:\Program Files\Adobe\Adobe Premiere Pro CS3\)

 
At 4:10 AM, Anonymous Anonymous said...

Great suggestions from many of you.

I use FlaskMPEG for some of those pesky renamed VOBs to move into AVI or mpeg, but user interface needs more fixing on that little open source, free program.

 
At 8:46 AM, Blogger J R said...

There are a lot of different ideas and methods on this page. I thought I'd update what my current workflow is, which is much simpler. Due to the previous tip about using the AC3 dll you get with Encore to get AC3 support in Premiere, I now simply edit the MPG (VOB) files directly. My workflow now looks like this:

1. I use DVDDecrypter to get the VOB files off the DVD. DVDDecrypter can also be very handy when you want to get just one title or chapter off the DVD (mode -> IFO).
2. Change the filename(s) from .vob to .mpg. If you have a ton of VOB files, use a batch renamer like the one mentioned previously.
3. Import the MPG into Premiere, assuming you have followed the above tip about the ad2ac3dec.dll file from Encore.

I also upgraded my computer to a quad-core, much beefier machine, so that has made editing MPG as opposed to DV AVI nicer, since editing MPG is more processor intensive then editing DV AVI.

So in short, no more script, no more demuxing/remuxing, no more rendering forever. That AC3 dll tip has saved me HOURS of time. But if you're not using Premiere, or absolutely must edit in DV AVI, you'll still find some decent information in the previous post and comments.

 
At 4:04 AM, Anonymous Duso said...

Hi, im bit new to the VOB files and covertion stuff. I followed your tip with VirtualDubMod, starting with VOB file (30min,1gb) but ending with 5gb dvavi file, which is just too big. Is it possible to convert it into same size file, and not loosing quality ? Renaming VOB file into mpg/avi, helps me to load the video into Premiere, but it's length is suddenly only arround 9sec,..Any ideas? thanks

 
At 8:08 AM, Blogger Josh said...

Converting from MPG to DVAVI will always dramatically increase the file size, as DVAVI has little compression. Yes it is a big file, but only while you are editing. When you are done with the project, you will probably encode the whole thing back to MPEG for DVD and delete the AVI.

You could use Premiere to encode the AVI back to MPEG again, then edit with it, but that's a bit of overkill, and when you encode the final project you'll end up with video that's essentially been compressed three times.

I have seen it before where you only get the first little bit of the video by simply renaming, but I can't remember exactly what caused that for me. Make sure you are using DVDDecrypter to capture the VOB, not just copying it off the disk. Also, try the tip with the ad2ac3dec.dll tip mentioned - getting only the first few seconds in Premiere may be audio related.

 

Post a Comment

<< Home