View Full Version : MPEG1/2 AVI's?
yawnmoth
31st October 2002, 07:19
So... avi's are a container format that can hold any number of codecs... so why can't avi's hold MPEG1 or MPEG2 encoded video?
Also, MPEG4 is supposed to take more CPU power to decode than MPEG2... but MPEG2 won't decode without a hardware based decoder - if you do it with a software based one (i've only seen one), it'll play back even worse than MPEG4... why?
bb
31st October 2002, 07:41
Theoretically it would be possible to create MPEG-1 or MPEG-2 AVIs, I guess. But you'd need special MPEG-1 / MPEG-2 Video for Windows codecs, and you'd need to copy the intermuxed audio stream to a separate auds stream in the AVI container (similar to DV type-2).
Don't know if such approaches exist; probably not.
bb
Neo Neko
31st October 2002, 10:35
Originally posted by yawnmoth
So... avi's are a container format that can hold any number of codecs... so why can't avi's hold MPEG1 or MPEG2 encoded video?
It is in part due to a current dificulty of MPEG4 in AVI. AVI does not work well with B frames. And B frames IIRC have been around since MPEG1. I expect Nic will know for sure on this. With the MPEG system streams it is possible to MUX VBR audio and video that uses multiple consecutive B frames and still keep synch. There were no other containers untill very recently besides the MPEG system streams that could do this. MPEG4 must leave the AVI container behind if there is to be any future for it.
Originally posted by yawnmoth
Also, MPEG4 is supposed to take more CPU power to decode than MPEG2... but MPEG2 won't decode without a hardware based decoder - if you do it with a software based one (i've only seen one), it'll play back even worse than MPEG4... why?
You should not need special hardware to decode MPEG2. An MPEG4 video of resolution equal to the original MPEG2 version will indeed take more CPU.
Nic
31st October 2002, 11:50
B-Frames have been around for ages in MPEG-1/2 & even D-Frames existed once upon a time (well almost :) )
Sigma had some ideas of there own once:
http://www.graphcomp.com/info/specs/ms/editmpeg.htm
& Avery Lee once said it was almost impossible to get MPEG into an AVI container (although ive lost the link where he said it). BFrames would be a real pain because the vfw interface only expects one frame in & then one frame out. Its also more difficult than normal formats because of the way the information is split over a MPEG stream (sequence headers, GOPS, etc)
Slow MPEG-2 decoding is what made isibaar look into libmpeg2, he realised it was as quick to go from MPEG-4->MPEG-4 as it was for MPEG-2->MPEG-4 which he thought was crazy....
Cheers,
-Nic
ps
Elecard's directshow decoder is very quick....
(& probably the best by far)
yawnmoth
1st November 2002, 02:05
Actually, I think I found the link where Avery Lee said it...
http://www.virtualdub.org/docs_codecs
Thanks for the replies! :)
spyder
1st November 2002, 21:43
Actually Entymonix made a MPEG2 codec for AVI.
tanksimpson
2nd November 2002, 00:12
Spyder is right, here's the link if you want to try it:
http://www.etymonix.com/products/VideoCodec/VideoCodec.htm
I tried it a while back, though, and it doesn't really fit the needs of the typical DVD backup: the bitrate averages out to like 20 Mbits/sec! It's more of a competitor to huffyuv and other lossless codecs used for video editing.
unixfs
2nd November 2002, 21:34
well, mplayer (which runs well also under cygwin32) can multiplex and demultiplex mpeg1/2 in avi:
mencoder -oac copy -ovc copy -o file.avi file.vob
Maybe it can be used as a basis for a VFW codec.
Besides, mplayer would be a wonderful DS source filter, it reads almost everything :)
OntzA
3rd November 2002, 01:02
In fact mplayer uses libavcodec an ffmpeg as well as ffdshow. And ffdshow also implements mplayer's postprocessing.
And yes, it's a wonderful DS filter ;)
Neo Neko
11th November 2002, 09:15
MPEG in AVI is just a bad thing. B frames are an important part of MPEG performance. And AVI just can't properly handle B frames nor can VFW. We should not spend time on it. Instead we should persue better formats. MP4, OGG, and MCF come to mind.
ChristianHJW
11th November 2002, 10:01
MPEG1/2/4 will be natively supported by MCF, they will even get their own MCF Identifier. Dont ask me if it will be possible to make something like a MPEG2 'codec' with UCI interface quickly ( maybe based on ffmpeg code ), but for sure we will find a way to mux MPEG2 video data into MCF, like we do right now with MP2/3 audio already ...
spyder
14th November 2002, 03:42
An MPEG-2 codec for UCI shouldn't be hard.
@ChristianHJW: I see you are reclaiming your position as head advertiser. ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.