Oh mpeg2 gurus - come forth! Question about compressing

A place to discuss non-Moho software for use in animation. Video editors, audio editors, 3D modelers, etc.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Oh mpeg2 gurus - come forth! Question about compressing

Post 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,
Last edited by Banterfield on Mon Oct 17, 2005 3:36 pm, edited 1 time in total.
Dave
User avatar
cribble
Posts: 899
Joined: Wed Aug 04, 2004 12:42 pm
Location: London, UK
Contact:

Post 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.
--Scott
cribble.net
User avatar
WillBellJr
Posts: 41
Joined: Mon Oct 25, 2004 7:49 pm
Location: New York
Contact:

Post 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
:!:
"With THIS!, you could be like GOD!..." - Kozer, Blake's 7
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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!
Dave
User avatar
J. Baker
Posts: 1063
Joined: Wed Mar 23, 2005 7:22 pm
Location: USA
Contact:

Post 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
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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,
Dave
User avatar
mr. blaaa
Posts: 622
Joined: Sun Jul 31, 2005 12:41 am
Location: ---
Contact:

Post by mr. blaaa »

well... don't ask me. I just post for being an MPEG-2-GURU :lol:
Image
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post 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
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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,
Dave
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post 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
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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.
Dave
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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?
Dave
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post 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,
Dave
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post 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
Post Reply