# Automating DVD Transcoding & Archiving



## Rhett (May 11, 2011)

The services at my church/venue are recorded to DVD. I then process that DVD in a number of ways, and would love to automate that process. Here's what I do:

[WINDOWS XP]
1. Copy VIDEO_TS folder from DVD to HDD.
2. Using AVS Audio Editor, I extract the WAV and save it separately for CD dups.
3. Using AVS Video Converter, I transcode the DVD to H.264 and upload to FTP.

Other points:
1. I do have an iMac available.
2. I use some video processing (brightness/contrast/scaling) when transcoding to H.264.
3. When automated, I would need file and folder naming based on variables.
4. It would be great if the chapter marks on the DVD could be converted to track marks on a CD. (I can split the wav file by chapter marks on the .IFO using AVS.)
5. I would like to create a disc image of a CD as opposed to the WAV file. (to keep track marks)
6. BIG ONE - Since the DVDs are recorded live (JVC SR-DVM700), there are breaks in the timecode. Not all encoding software handles this correctly.
7. ANOTHER BIG ONE - The DVD audio is AC3. And I'm not switching to PCM. Quicktime MPEG2 decoders have a hard time with this. MPEG STREAMCLIP won't play muxed AC3 without "hack-like" drivers.

If you've got suggestions for multiple softwares, or one big package, I'm all ears. What are you guys doing to automate these weekly things?

Thanks

Rhett


----------



## cpf (May 12, 2011)

Apart from the chapter marker bits, that could probably all be done with FFMPEG or Handbrake's CLI and a batch script (or some C#).


----------



## Rhett (May 12, 2011)

I like the Handbrake idea, but I need different containers than MP4 or MKV. Also it won't extract a WAV.

When I used FFMPEG, it didn't handle the timecode breaks correctly, and the audio became further out of sync as the video progressed.

I can actually fix the timecode breaks using MPEG Streamclip with Perian drivers on my iMac. But Streamclip won't export back to VOB (VIDEO_TS folder). But I've been using the AVS package in the meantime to eliminate a step.

Can you point me in a good direction to get started with C#? Or would automation software be easier?


----------



## cpf (May 12, 2011)

It really depends if you want to learn how to program or want to learn a specific automation scripting language. My advice (regarding c#) as an experienced C# programmer is to just think of stuff you'd like to do (like this) then go about googling all the information you need to put something workable-ish together, then repeat till you're confident. Of course, there are hundreds of tutorials out there, too, if that's your learning style. 

Would it be possible to record whatever video it is directly onto your computer and skip the DVD entirely? You could use Windows Movie Maker or Flash Media Live Encoder (free) or OnLocation/Premiere/Any-consumer-editing-package ($$$) along with a capture box/card (or direct link from the camera) to do it quite easily, and your video would already be in a sane format palatable to most software (and you can DVD/CD it later). If you can't do that I'm really out of ideas.


----------



## Rhett (May 12, 2011)

I am definitely thinking about building an ingest server. Great recommendation. Solves alot of the MPEG2 transport stream problems.

Also a good question on programming or automation. I've automated and scripted alot, but have not gotten into general programming since my Basic days in the 80s. I do feel like I could learn C#. I just have a couple reservations that maybe you could shed some light on:

1) What about mouse movements? I don't know that a keystroke could accomplish everything with the softwares I'm using.
2) How good is C# at running and interacting with non-automated programs?

But you're right, either way I'm learning some language. It would be nice if it was something universal like C#.


----------



## cpf (May 12, 2011)

Rhett said:


> I am definitely thinking about building an ingest server. Great recommendation. Solves alot of the MPEG2 transport stream problems.
> 
> Also a good question on programming or automation. I've automated and scripted alot, but have not gotten into general programming since my Basic days in the 80s. I do feel like I could learn C#. I just have a couple reservations that maybe you could shed some light on:
> 
> ...


 
Ideally for trouble-free automation you want whatever you're using to work via command line, or at least key presses (any legitimate video editor will have stacks of these), simulating the mouse is a recipe for disaster, e.g. a UI panel accidentally gets resized and you end up watching an unstoppable trainwreck unfold before your eyes. But yes, C# mouse automation is entirely possible using a slew of Windows API calls, I just wouldn't recommend it. In fact, if you need to do such automation it'd be easier to use a pre-made automation system that includes macro functions like "Click on button labelled..." or "Switch to window..."


----------

