Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Codec Discussion > Lossless Video And Audio Encoding In Virtualdub


Posted by: Samu Jun 29 2010, 05:42 PM
Hi. I don't know if this is possible to do in virtualdub, please forgive me in advance if I am saying something completely nonsense. But the possibility makes me wonder if something like this or similar is possible to do.

This first list is for the video which was captured via Fraps without recording sound. The video is 256 colours, 640x480 resolution. I used different compression methods. The 7z method was the LZMA algorithm and it is an open source lossless archiver.
CODE

29-06-2010  17:17           442.628 Game 2010-06-29 17-13-08-59.fraps.7z
29-06-2010  17:21           443.032 Game 2010-06-29 17-13-08-59.fraps.avi.xz
29-06-2010  17:26           557.345 Game 2010-06-29 17-13-08-59.fraps.rar
29-06-2010  17:38           979.180 Game 2010-06-29 17-13-08-59.h264lossless.avi
29-06-2010  17:20         6.059.694 Game 2010-06-29 17-13-08-59.fraps.avi.bz2
29-06-2010  17:21        12.637.480 Game 2010-06-29 17-13-08-59.fraps.avi.gz
29-06-2010  17:16        12.637.626 Game 2010-06-29 17-13-08-59.fraps.zip
29-06-2010  17:13        23.430.696 Game 2010-06-29 17-13-08-59.fraps.avi


This second list is for a wave file extracted from a music CD I have. I then compressed using the different lossless compressors. Flac is the better one and it is also an open source free audio compressor.

CODE

15-02-2009  07:27         8.345.535 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.flac
29-06-2010  16:05         9.971.222 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.rar
29-06-2010  16:06        13.384.739 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.7z
29-06-2010  16:12        13.386.796 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.wav.xz
29-06-2010  16:09        14.872.192 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.wav.bz2
29-06-2010  16:11        17.740.760 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.wav.gz
29-06-2010  16:13        17.740.931 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.zip
29-06-2010  15:58        25.436.924 04_Madredeus - Os P ssaros Quando Morrem Caem No C‚u.wav


So, I guess you understand what I want to do. I wanted to know if it's possible to use the LZMA algorithm used on 7z to encode the video part, and at the same time to use the flac as the audio enconder, so I can later send an 100% lossless quality video to Youtube or to my Skydrive.

Thanks. smile.gif

Edit: Oops, I am sorry, the algorithm used was LZMA, my bad. I can't edit the topic title, can a moderator do it for me please?

Posted by: phaeron Jun 30 2010, 04:02 AM
There are better codecs specifically designed to compress 256 color video from games. In particular, DOSBox's Zipped Motion Block Vector (ZMBV) codec is a pretty good one, since it supports motion prediction. Its entropy coding is not as good as LZMA (it uses the same Deflate algorithm as zip), but if you've got scrolling it can make up for that. DOSBox comes with a VFW implementation, but I don't know if it supports 8-bit video input.

An issue with using something like .7z for video compression is that the way you've packed the file, it would be impossible to seek within it. Regular video codecs periodically reset the compression algorithm in order to provide seek points. This makes your comparison a little bit unfair.

I'm not sure which container formats might support FLAC for audio compression. There are issues with using it in AVI, but MKV or OGM might be OK with it. There's also WMA lossless if you use the WMV format.

Youtube is going to re-encode your video anyway when you upload it, so I'm not sure it's worth doing so much work over using one of the traditional video encodings.

Posted by: rjisinspired Jun 30 2010, 05:07 AM
I actually found a Flac acm codec.
http://www.jory.info/serendipity/archives/13-FLAC-ACM.html

Ogg too:
http://codecs.com/download/Vorbis_Ogg_ACM.htm

Now to check if Wavpack acm exists :-)

Edit:

Nope. Don't see one for Wavpack.

Posted by: rjisinspired Jun 30 2010, 05:27 AM
Flac in video works well with ffdshow but not through mpc-hc's built in flac decoder. The files will also load back in Vdub. Both tested with Xvid and uncompressed AVI.

biggrin.gif

Xvid and flac, coreflac acm
http://rjschat.dyndns.org:8080/Paranoha/APPS/VDUB/flactest.avi

Flac with Aiptek files would be a good idea maybe instead of going from adpcm to mp3 when encoding to another format because using mp3 on Aiptek files comes out terrible and there are random robotic glitch sounds in them, happens with either lame or regular mp3. The flac version doesn't seem to have those audio anomalies and is smaller in audio size than the adpcm version that the Aiptek comes with.

Flac audio size is in between that of adpcm and mp3. Seems like a good compromise.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)