Vegas, MPEG4s, AC3, and AAC

bortbox wrote on 2/9/2005, 9:12 AM
I am not usually one to post messages. I usually just comb through them till I find what I need (most people have asked all the important questions). However there is one thing I can't find a good discussion on.

I am going to call this subject: DirectShow Hell

Let me start with the end: I need a DVD, and two different Mpeg4s of the same content.
Anyone doing this quickly and easily with Vegas?


I work for a small group of doctors at a major hospital and research center. My job is to collect footage of different surgeries and procedures, and then distribute that video to doctors, educators, and students for reviews and seminars.

The camera system composes of several fixed views that are fed into a central "media hub" that timecodes these videos and produces real time mpegs (one for each stream).The room is setup with a couple overhead mics, and sometimes the doctors choose to wear a mic. Each of the sound feeds is coupled with a camera.

So in the end I am left with a collection of time stamped MPEG2s (these are GOOD Mpegs, 20 M/sec on average. Not one person has complained about our source video). These MPEG2s have Layer-2 sound tracks. Some of them room mics, some of them lapel mics. These import PERFECTLY into Vegas. In fact, the vendor of the camera system RECOMMENDS Vegas. And for a while everything was nice and smooth.

I take the video feeds, splice together the surgery leaving everything real time, just changing camera angles as needed, maybe even some crop and zoom if the doctor cared to sit in the editing room with us. I usually just pick the best audio feed and leave it intact.

Next, render and transcode using Vegas and the Mainconcept encoder. Although I much prefer a 2pass encoder, the Mainconcept renderer (when tweaked to my taste) does a good job while keeping the workflow simple, and the render times short (I have 48 hours to get this out before someone starts getting mad). Import those Mpegs into DVD architect with my templates already designed, and a DVD is made.

We keep everything on file as professors and other educators make random requests for any number of videos we have. Either they wait 24 hours for a DVD to be made (disc images are stored on DLT tape), or schedule the video onto the closed-circuit TV system.

NOW everything is changing, and I thought I was well equipped to handle the change. First of all, the doctors want to be able to view the video on their smart devices. The hospital gave a lot of them Treo 650s on the assumption my department could crank out SD cards with a requested surgery. Second, a new on-demand video server is replacing the closed circuit video broadcasts. This of coarse makes Mpeg-4 VERY important to me, and I find that Vegas is causes headaches.

This leaves me with 3 renders for every project: the Mpeg-2 for DVD, an Mpeg-4 at 720 for the on demand video system, and a Mpeg4 at 320x240 with color and chroma corrections for the small LCD screens.

Vendors flooded me with sample mpeg4s that their product could produce, and I played them all very successfully on both the smart devices and the video server.

I purchased: Quicktime Pro because it seemed to just be useful to have on hand, and the 3ivx D4 codec's, because their package seemed to offer me DirectShow compatibility, IT OFFERED A DUAL PASS ENCODER, and it was supposed to integrate into Vegas (via DirectShow).

I can't get the 3ivx Mpeg4 AUDIO encoder to show up in Vegas at all. I quickly realised that I whatever I did, I would have to render my projects as .AVI or .MOV and then re-mux them using graph edit and the 3ivx DirectShow muxer. As I couldn't get the 3ivx audio encoder to even show as an option, it started to look like I was going to have to create an .AVI, with Mpeg4 video and raw audio, then use graph edit to demux, recode the audio to AAC, then mux the video and audio to an mpeg4. Although the 3ivx video encoder shows up as a compression option when making an AVI, it actually doesn't want to work as a dual pass. It fails about 5 minutes into the first pass. Single pass works but the quality is unacceptable.

I have tried using the quicktime renderer in Vegas to produce an Mpeg4, but again, no audio options for AAC even though I should be able to use the quciktime encoder OR the 3ivx audio encoder, and the quicktime Mpeg4 encoder does not seem to be dual pass, and the quality vs. file size is unacceptable.

I later purchased Nero Vision, and now have to make 3 renders from Vegas. The Mpeg2 for DVD, a 720 uncompressed AVI to encode with Nero, and a 320x240 uncompressed AVI to encode with nero (because I can't resize the AVI correctly or make color adjustments within Nero). What a headache AND A SLOW PROCESS.

Additionally, I can't use my old DVDs because Vegas can't import a large VOB with AC3 sound! On top of that, DVD architect can't make a DVD with layer-2 mpeg audio! This is really burning me because DVD architect transcoded all the audio (even though the original audio was up to DVD spec). Now I have to DEMUX my VOB file and uncompress the AC3 in order to put it BACK into vegas, which SOMETIMES causes the audio to fall out of sync.

WHY WHY WHY!?

Am I the only one faced with a library of DVDs (that I made) which needs to be transcoded to a commercial MPEG-4?
Why doesn't Vegas have the ability to at least uncompress an AC3 to import it, but seems to have no problem making AC3 files?

Does anyone have DirectShow codec's that play nicer with Vegas?

Sorry for butchering all the technical terms, I am writing this from weeks of frustration. But I have yet to ACTUALLY produce an Mpeg4 from any previous content AT ALL.

-bortbox

Comments

johnmeyer wrote on 2/9/2005, 9:27 AM
Well, you don't post much, but when you do ...

There have been several posts about MPEG-4 recently. You might want to search on that term, over the past 30 days.

A few thoughts:

1. Encoding takes a long time, and the results eat up disk space. Therfore, goal #1 has to be to reduce the number of encodes, and to have the results take the smallest space. To this end, you should not render to an uncompressed AVI. Instead, use the Vegas DV AVI codec when you render, and make this your core starting point. You would be hard-pressed to see the differences between the DV AVI that Vegas produces, and an uncompressed AVI, yet the difference in size is 13 Gbytes/hour vs. 90 GBytes/hour.

2. Something I do all the time, when working with external encoders, is to use Satish's frameserver. In fact, just last night, I used TWO frameservers, operating simultaneously. I had my edited project in Vegas. I then selected Render As and started the Satish frameserver. I opened the project in an AVISynth script, and did a whole bunch of things there. I then opened that script in VirtualDub and used its frameserver to serve the result into the external Mainconcept encoder (I had to use the VD frameserver, because the Mainconcept encoder refuses to read the AVISynth script, but WILL read the VD frameserver.)

Thus this was the flow:

Vegas -> Frameserver -> AVISynth script -> VirtualDub -> Frameserver -> Mainconcept external MPEG encoder

This chain is happening all at once, i.e., each frame is served from the Vegas timeline and is eventually, a fraction of a second later, encoded by the Mainconcept encoder. The AVISynth script had a chroma noise filter, a sophisticated temporal filter, a film dust removal filter, a sophisticated inverse telecine filter (29.97 -> 23.976), and two color space conversions, and yet with all this going on, I was encoding at 10 frames/second. Best of all, it is "set it and forget it," meaning that I don't have to do one thing, come back, do the next thing, etc.

Thus, my recommendation is that you consider frameserving as a way to reduce your steps, and eliminate creating huge, uncompressed AVI files.
Liam_Vegas wrote on 2/9/2005, 9:40 AM
Just to take a couple of your points....

I use the 3ivx codec (downloaded direct from the 3ivx) site. I can render audio with this just fine. Not sure if this is the same audio format you are having trouble with... but I thought you should at least know there may be another route.

You say that DVDA re-encoded your audio even though it was within DVD spec. DVDA will encode the audio to the destination format as specified in the DVDA project settings. If you had that set as AC3 instead of PCM for instance - that is what you would get.

DVDA2/Vegas5 does support 2 pass encoding of MPEG2
B_JM wrote on 2/9/2005, 9:46 AM
a possibility is to use Canopus Procoder 2, which will create all three of your outputs at the same time and will take dvd as input (including ac3) , it also has batch function and smart folders (drop any media in the folder and it will resize and spit out all three of your formats on its own without the program even running (runs as a service)

it works well with vegas also
bortbox wrote on 2/9/2005, 12:20 PM
Ok, so I have Satish's frameserver dumping into virtual dub, and finally the 3ivx compressor seems to work (video). However I can't seem to change the frame size to 320x240 within virtual dub. I guess I would have to use AVISynth to resize?

Unfortunately I have never used AVISynth (and my workflow doesn't seem to benifit).

I STILL have to take the output into graphedit to demux-remux to turn that .avi into a .mp4.

Any apps to take the input from the frameserver (which has my color correction via vegas), resize to 340x240, reduce to 20 or 24 fps and then mux the output to .mp4?

-bortbox
B_JM wrote on 2/9/2005, 1:22 PM
virtualdub resize -> video (in menu bar) -> filters -> resize

and yes -- as i said before once already, procoder will take the input from the frameserver, resize to 340x240, reduce to 20 or 24 fps and then mux the output to .mp4

B_JM wrote on 2/9/2005, 1:23 PM
you also can change the frame rate in virtualdub btw
scdragracing wrote on 2/9/2005, 2:32 PM
i think that you need to be looking at the pro tools before the freeware hacks... your time is too valuable to hassle with a bunch of different tools.

like somebody mentioned above, procoder should be thoroughly evaluated, as well as the latest version of sorenson squeeze... you want to develop an automated script that will spit out everything you need at once.

B_JM wrote on 2/9/2005, 2:43 PM
on the defense -- though i suggested procoder , many of the freeware "hacks" are better than many paid programs for some things ....

procoder is a better choice in this case though -- hands down, even compared to squeeze
bortbox wrote on 2/9/2005, 3:39 PM
thank you B_JM for the suggestion, and scdragracing for putting it in perspective. I spent the day looking at procoder, and it looks like exactly what I want.

I have a PO put in and will be ordering a copy.

VirtualDub has a great reputation and I am sure a lot of pro-rigs have it and other freeware tools in their lineup, hoever editing and distributing are the meat and potatoes, encoding should be a point and click operation.

My only problem is with the USB dongle that comes with procode. I am using NetFinity servers as my workstation (for the storage flexibility) and they well.... don't come with USB ports. I will put a USB card in them for the dongle, but it seems like I am now setting up drivers, installing cards, and inserting dongles instead of setting up a long frameserver chain. (sigh)

-martin
B_JM wrote on 2/9/2005, 4:33 PM
contact canopus about the dongle -- maybe they can help you w/ an alternative.

also -- if using the canopus dongle -- follow the install instructions carefully , basically instal software l first - then install the dongle ... and then no problems .. i have 6 dongles installed at times - i use a usb hub with them all attached (procoder used to come w/ a 3 port hub, i dont know if it does anymore). The package comes with a great book on compression - really good reading ..
Laurence wrote on 2/9/2005, 7:33 PM
Are you aware of the mpeg version of VirtualDub with the AC-3 decoder plugin?

http://fcchandler.home.comcast.net/stable/

This will let you do everything you want in one step (providing you have the mpeg4 codec you need installed. Just load your initial mpeg with AC-3 audio in, resize, reduce framerate or whatever and have it output the format you want. That is how I do this kind of thing. You may also want to install the free Panasonic DV codec available here:

http://www.free-codecs.com/download/Panasonic_DV_Codec.htm

It is a nice intermediary between VirtualDub and Vegas.

If you want to trim or re-edit your original mpeg files you can use MPEG VCR and MPEG Wizard from here:

http://womble.com

If you buy MPEG Wizard, MPEG VCR is included. It is the fastest way to trim and edit mpeg video, and it does it WITHOUT rerendering so the quality of the edited video doesn't take a hit.

Here is how I'd do it.

1/ Trim and save original mpeg files in MPEG VCR. If you want to do a compilation or add titles, do this with MPEG Wizard. MPEG Wizard will only render changes and it will do it in a format that matches the input format. The bulk of the video will just be recopied as a straight data transfer. This is quick and very high quality and lets you do things like add titles to the front of a file without rerendering the entire thing.

2/ Load the edited MPEGs into VirtualDub MPEG. Set up a chain of filters to reduce the size and maybe the framerate. Select the data compression format you want and save the file as an avi with that data format. If you have an avi file with mpeg4 compression, you should be able to rename the extension from avi to mp4 and have it play back on the portable players.

Laurence wrote on 2/9/2005, 7:51 PM
I was re-reading your initial post. If you just want to rip from DVDs to mpeg4 directly, use the ImTOO DVD ripper program found here:

http://www.imtoo.com/

I have tried all the rippers and this one is best. You can select exactly what you want on the DVD and rip it directly to any codec format you have installed in a single step. Whereas most DVD rippers (there are dozens of them) don't do smooth motion on the rips, the ImTOO rips are really high quality. It will also do things like reducing the video size and a whole lot more as it's ripping. That would by far be your easiest solution.

Another solution would be to use a DVD recorder with firewire in and out. The Pioneer DVR-320-S has a 1394 port like a lot of DVD burners. The difference is that their firewire port is both an input and an output. With a deck like this you can capture video directly off a DVD (as long as its not copy protected) and edit and rerender however you like with Vegas.

http://www.pioneerelectronics.com/pna/product/detail/0,,2076_4139_98124082,00.html

Another option is just to capture from any old DVD player using a Canopus ADVC-100 or similar capture box.
MR.PRODUCER wrote on 3/20/2005, 1:11 PM
I FOUND THAT TO MAKE IT SIMPLE . GET ( INTERVIDEO DVD COPY 2 PLATIMUN ) AND GET THE ( ANY DVD WIHT THE FOX SOFTWARE ) AND DIVIX PRO 5 )
AND EVERTHINGS WILL BE ALRIGHT. YOU CAN SAVE DIFFERENT FILES
INTO AVI , MPEG, DIVX, LOAD INTO VEGAS 5 & EDIT.

ANY DVD TO BYPASS DVD S ........ & DIVX FOR DIVX .
SONY & INTERVIDEO NEED TO GO INTO BIZNESS .
Jay Gladwell wrote on 3/20/2005, 2:46 PM

Welcome to the forum! Just a hint, USING ALL CAPS is the equivalent of shouting or screaming. Using lower case is adequate.

Enjoy!


p@mast3rs wrote on 3/20/2005, 4:25 PM
John,

Would you mind pasting your script for avisynth? Id love to give it a try. Thanks