Page 1 of 1

Oh mpeg2 gurus - come forth! Question about compressing

Posted: Mon Oct 17, 2005 6:44 am
by Banterfield
I'm certain someone here can answer my question. :)

I'm using Vegas video to edit my Moho bits and pieces together. What I'd like to know is, if I send the same video clip through the mpeg2 compression twice, will I lose image quality? Or does the compressor recognize that the image is optimized, and leave it alone?

I'd like to:

1.) Take my .mov files that have lip-synched audio
2.) Render then as mpeg2s.
3.) Take those renders and lay fx over the top of them.
4.) Render them again with those audio layers (speech and fx) combined.

Will I lose image quality sending stuff through the mpeg compression twice?

Thanks,

Posted: Mon Oct 17, 2005 2:06 pm
by cribble
Yeah it should work fine.

As an idea, when you render to mpeg, change the kilobites so its quite high. Anything above 800kbs is safe for small projects (640x480 and below), obviously, a higher bit rate for larger dimensions. Then re-import that, and do the same over again, and hopefully the image shouldn't degrade too much. Having done this myself, i've noticed that it can become slightly blurred or pixellated if you try to be smug and use a low bit-rate.

Posted: Mon Oct 17, 2005 5:48 pm
by WillBellJr
It's best to think of MPEG as a terminal format - in other words as the final output format ready for burning to glass or playback.

If you need to render and >add addition passes<, it's best to use either a lossless or very high quality lossy format.

Huffy is a good intermediate lossless format, so is the Quicktime Animation format (I do however try to stay away from using Quicktime being on the Windows platform as much as possible...)

Since you're recompressing an already compressed file, you may notice "blockies" upon close inspection of your final output - increasing the data rate may help but if you're not concerned about files sizes, then Huffy or similar is the best way to go.

Good luck!

-Will
:!:

Posted: Mon Oct 17, 2005 7:03 pm
by Banterfield
Thanks for the replies.

I used Quicktime Animation for the rendering throughout, so keeping that high image quality is very important to me. Sounds like I need to load additional sound layers into the original video edit setup, so that mpeg2 pass can be the last.

Thanks very much for the thoughts!

Posted: Mon Oct 17, 2005 8:34 pm
by J. Baker
Yes, rendering to mpeg2 twice will loose quality. This is a very nice lossless codec I use all the time to reduce file size.

http://www.videohelp.com/tools?tool=Lag ... ideo_Codec

Posted: Mon Oct 17, 2005 10:31 pm
by Banterfield
I've spent the day transferring my effects audio tracks over to the original edit files so I won't loose that tasty uncompressed quicktime that's been plugging up my hard drives for some time.

Thanks to everyone,

Posted: Wed Oct 19, 2005 2:37 am
by mr. blaaa
well... don't ask me. I just post for being an MPEG-2-GURU :lol:

Posted: Wed Oct 19, 2005 3:47 pm
by nobudget
If you'd only want to add a new audio track (that's not your question but just in case you need it) you can process mpeg files using programs that support "direct stream copy" like Virtual Dub. Using that method the data gets copied without recompressing. Many people use that technique for cutting commercials out of PVR recordings for instance. For the new audio example you would need to render the mpeg file in "elementary streams", that means video and audio as a seperate file. Direct stream copy is also very fast, it's just like writing a file to disk. Do remember most video editing programs do not support this "lossless" feature on mpeg (as far as I know) but it is often used with DV files.

Sidenote: I've noticed in cartoon animation mpeg2 is often better than DV compression, consumer DV has quite poor color sampling and that can be noticed on sharp edges.

Reindert.
www.nobudgetvideo.com

Posted: Wed Oct 19, 2005 5:39 pm
by Banterfield
I have noticed that Vegas supports rendering to separate video and audio streams, though I'd have to experiment (yikes, maybe even read the manual) to determine how to fit that into my workflow.

With "direct stream copy" does the new audio track replace the old, or is there a way to still mix and fiddle with them? I imagine from the description it just reattaches the audio to the existing video stream, rather than rerendering the video stream, which would suggest that you can treat the audio separately, leaving plenty of room for the kind of fiddling I was thinking of.

Cheers,

Posted: Wed Oct 19, 2005 6:17 pm
by nobudget
I used a couple of terms and techniques together and that might make it a bit difficult to understand. Let me explain (I'm no compression expert though):
- The "direct stream copy" applies to the unaffected writing of the files, so without actual recompression.
- The seperate audio track is usually referred to as "demuxing". This separates the audio from the video and renders two files. You can edit the sound seperately from the video and later "remux" them and form a new mpeg file. This way you can work on the sound or video seperately. DVD authoring programs like Mediachance DVDLab and perhaps others prefer "demuxed" files as opposed to audio/video combined mpeg files. It can also come in handy for multiple audio tracks like different languages on a DVD. You would render the video as one mpeg stream and the audio tracks as seperate (but the same duration) audio streams.

But this might be getting a bit too involved for the Moho forum. The Mediachance website can give you more indepth information, the forum and the background articles on the site. Or search on sites about DVD ripping like videohelp.com, just ignore the illegal ripping stuff and concentrate on the how-to articles :wink:

One more thing, if you're concerned with NTSC compatible audio use AC3, that's the standard format, mpeg audio might not always work over there...

Reindert.
www.nobudgetvideo.com

Posted: Wed Oct 19, 2005 6:37 pm
by Banterfield
This is great information, really. Now that I know what is possible, I can do the appropriate search within my program documentation the next time I encounter this issue - which hopefully won't be for awhile.

As I said above, the forum feedback was sufficient to get me on the right track, so all this other information is simply icing on the cake! Thanks again to everyone who responded. You've really helped.

Posted: Wed Oct 19, 2005 6:52 pm
by Banterfield
Just a side question:

Quicktime Animation vs Lagarith vs Huffyuv?

My impression from what I've read is that Lagarith compresses better but takes a bit longer than the others. In my experience Quicktime animation looks great - but it seems huge (but then I haven't tried the others yet). I know nothing about Huffyuv, except that it is lossless and well regarded.

Could anyone comment on the varying performance of these (speed/file size/quality) with an eye to editing and ultimately, rendering to mpeg2?

Posted: Wed Oct 19, 2005 8:36 pm
by Banterfield
A quick render test showed the following:

Quicktime animation

3.85 megabytes
4min 01 seconds

Lagarith
1.67 megabytes
3min 35 seconds

I couldn't get huffyuv to work - I tried both of the most recent versions, and both threw up an error in Moho.

Nevertheless, Lagarith seems to compress very well. I should note that I deliberately used a scene that had static frames as this was said to be a strong point in the codec.

Regards,

Posted: Thu Oct 20, 2005 1:53 pm
by nobudget
I have never really worked with "exotic" codecs but I once tried a free Microsoft Photo program that can create videos out of stills with movement and that did look extremely good with high compression. I believe Windows Media 10 has a special codec for optimised still images also. I then removed the program because WMP10 screwed up my system...

Reindert.
www.nobudgetvideo.com