Log in

View Full Version : Is it possible to mux Mpeg4 into .mpg container


SeeMoreDigital
21st September 2004, 11:32
Is there's any "new" info with regards to this topic?

These days just about anything can be muxed into the AVI container, even Mpeg2. So I just just wondered if Mpeg4 can be muxed into .mpg or .vob yet!


Cheers

bond
22nd September 2004, 00:59
of course it can, and its even standardised by mpeg, still noone wrote a tool for it and there has been also a big discussion thread about this you will find when using search

LordRPI
22nd September 2004, 02:08
I've seen mpeg4 get muxed into a .mpg. Quicktime won't recognize it unless you change the extention to .mp4 though.

SeeMoreDigital
24th September 2004, 12:02
Originally posted by LordRPI
I've seen mpeg4 get muxed into a .mpg. Quicktime won't recognize it unless you change the extention to .mp4 though. Have you got a short sample you could upload so I can add it to my collection please?


Cheers

bond
24th September 2004, 20:10
Originally posted by LordRPI
I've seen mpeg4 get muxed into a .mpg. Quicktime won't recognize it unless you change the extention to .mp4 though.hm, .mpg and .mp4 are totally different containers, i cant imagine qt would handle a renamed .mpg correctly

stegre
24th September 2004, 20:48
SMD: If you count H.264 as MPEG-4 - which I don't, really, but anyway, if you do, then the MainConcept H.264 demo encoder (http://www.mainconcept.com/h264_encoder.shtml) would qualify; in fact you can optionally select MPEG-2 Transport Stream as the container for your encodes - otherwise it'll wrap them in the more familiar Program Stream, or create just elementary video. You may want to add those to your collection.

SeeMoreDigital
24th September 2004, 21:10
Hi stegre,

You've beaten me to the punch here ;).

If a load of people had said "no... it's not possible" I was going to bring up the MainConcept H.264/AVC in .MPG encode situation :)

I've always found it rather strange, that although Mpeg4 is "MPEG" it can't be easily muxed into the .mpg container (like Mpeg1 and Mpeg2).

Okay, so the generic container for Mpeg4 is .MP4 but this never stopped it being muxed into AVI, MKV or OGM.

I'm also still very interested in the idea of muxing Mpeg4 into the .VOB container (ie: swapping Mpeg2 for Mpeg4) - which has also been discussed on the forum before...

Oh well, what ever "floats your boat" I guess!


Cheers

RadicalEd
24th September 2004, 22:44
AFAIK, only AVC in MPEG has been standardized, not any of MPEG-4 p2.

movmasty
2nd November 2004, 04:58
Originally posted by SeeMoreDigital
Is there's any "new" info with regards to this topic?

These days just about anything can be muxed into the AVI container, even Mpeg2. So I just just wondered if Mpeg4 can be muxed into .mpg or .vob yet! a little precisation, mpeg2 streams ext is mpg or mpeg,
vob is for mpeg2 that is dat for mpeg1, a container with chapters infos for standalone players of dvd and vcd,
the same effects could be better obtained in pc playback on the player side by bookmarks ecc.
and i bet that mpeg2 could have the dat extension too.

I always liked the mpg container more than the avi one, and never understood why no one gave us mpg4.2 like mpg,
maybe because industry plays now with mpeg2, and for the future will look directly to mpeg4.10.

about open source and free programmers, dont know, maybe the mpg container is harder to handle?
I see that manono gets mad when someone says "mpg".

fccHandler
2nd November 2004, 08:42
Originally posted by movmasty
maybe the mpg container is harder to handle?
Indeed it is much more difficult to work with! But consider that MPEG is meant to represent a final (and permanent) video format, so it wasn't designed to be edited easily. The idea is that once you compress to MPEG, there's no going back.

SeeMoreDigital
2nd November 2004, 11:35
Originally posted by movmasty
..a little precisation, mpeg2 streams ext is mpg or mpeg... either can be used. When discussing containers I prefer to use the expression ".mpg" rather than just "mpg". And although ".mpeg" exists as an extension, personally I don't like to use it as many of our newbies have a tendency to confuse "streams" and "container" designations.

For example... I hate it when people say "I made this AVI encode and it don't work!" When they mean Mpeg4 .avi encode. Or... "I've seen this DivX player, is it any good?", when they mean Mpeg4 stand-alone player!

But, that's probably just me!

Manao
2nd November 2004, 13:17
I see that manono gets mad when someone says "mpg".Just for the record, it's Manao, not manono. And no, I don't get mad when somebody says "mpg".

movmasty
2nd November 2004, 13:25
Originally posted by fccHandler
Indeed it is much more difficult to work with! But consider that MPEG is meant to represent a final (and permanent) video format, so it wasn't designed to be edited easily. The idea is that once you compress to MPEG, there's no going back.
yeah there is this urban legend too...

in fact in the old days, when video formats were mpg1 and indeo only,
to load a mpg in one editor was a pain, but this more for inadeguate sw that made usable just almost uncompressed format like indeo...

but today...avis in mpg4 are still less editable than mpg, due to the bigger kf distance and more sophisticated compression techniques,
on the mpg side, look how vdub handles mpg well(mpeg2 also with appropriate vers)it is a pleasure to load a mpg,also incomplete, to browse it for-and-backward, to fine cut it,
do this with an avi-mpeg4 with kf distance of 300 frames and b frames!!!
and look how mpg handles b frames well!(in xvid without packedb you never know if the frame you see is that you are pointing to!)

Nowdays, if you use high qual mpeg4 to store sources, better to have them in mpg than avi container, as to edit a mpg stream is more easy than a avi-mpeg4,
and about the "no going back", high quality mpeg2 vids are good sources to edit from,and there are also "all I" mpg codecs....
no going back had sense with low quality mpg1.

movmasty
2nd November 2004, 13:27
Originally posted by Manao
Just for the record, it's Manao, not manono. And no, I don't get mad when somebody says "mpg".
yes, it is manao, sorry,

but still yes, you got mad talking about mpg :D

Manao
2nd November 2004, 13:36
do this with an avi-mpeg4 with kf distance of 300 frames and b frames!!!It's not the fault of the container if the kf distance is 300. I don't see your point here.
and look how mpg handles b frames wellThat's true, avi doesn't handle well b-frames. But .mp4 and .mkv do as good a job as .mpg concerning b-frames

movmasty
2nd November 2004, 13:51
Originally posted by Manao
It's not the fault of the container if the kf distance is 300. I don't see your point here. the point is that it is not a fault of mpg to have edit difficulties, just avi-indeo was low compressed,
when avi stores high compressed codecs, it is still more difficult to edit....
.mpg is the native format for all mpeg codecs, avi was made to play in 386 and windows 3.1.
Originally posted by Manao
That's true, avi doesn't handle well b-frames. But .mp4 and .mkv do as good a job as .mpg concerning b-frames OK, give me all the edit tools i have for avi and mpg for those formats too then.

(and, do mp4 and mkv plays without probs if incomplete?
could they be joined like plain text also with dos copy command?
are they cross-platform like mpg is?
could you play any chunk in the middle of the movie like a complete movie??)

Manao
2nd November 2004, 14:48
OK, you have to stopped dreaming about what could bring the .mpg container to mpeg4.
.mpg is the native format for all mpeg codecsNo, not mpeg4 part 2.
could you play any chunk in the middle of the movie like a complete movieA mpeg4 stream without header won't play correctly. So you shouldn't be able to play any chunk of an mpeg4 stream if it doesn't have its header.
could they be joined like plain text also with dos copy commandOnce again, it's also codec related, not only container related ( two avi paste together won't play whatever the codec is). If you copy two mpeg4 stream together, you'll end up with two clips, not one.
are they cross-platform like mpg isYes
OK, give me all the edit tools i have for avi and mpg for those formats too then.For mp4, follow the links in bond's sig. For mkv : virtualdubmod + mkvtoolnix.
do mp4 and mkv plays without probs if incomplete ?They should ( provided it's the end which is missing ), though I never tested.

movmasty
2nd November 2004, 15:26
Originally posted by Manao

Once again, it's also codec related, not only container related ( two avi paste together won't play whatever the codec is)
then it is container related, NOT codec related :)

stephanV
2nd November 2004, 15:33
Originally posted by movmasty
yeah there is this urban legend too...
but today...avis in mpg4 are still less editable than mpg, due to the bigger kf distance and more sophisticated compression techniques,
on the mpg side, look how vdub handles mpg well(mpeg2 also with appropriate vers)it is a pleasure to load a mpg,also incomplete, to browse it for-and-backward, to fine cut it,


this is BS... you cannot cut mpg-files in VirtualDub... you can only convert them (and ironically it converts them to AVI). Dont talk about YMPEG, thats *re-encoding* and which has nothing to do with cutting.


do this with an avi-mpeg4 with kf distance of 300 frames and b frames!!!
So how will this change if you put it in to mpg? The key frame distance will stay the same. The only reason why mpg is more accurate in cutting is that the two codecs used in that container (mpeg1 and 2) usually dont have a bigger keyframe distance of approx 30 frames and the GOP-size is fixed. The cutting trouble does not come from avi, but from mpeg4.

Secondly, as fcc already pointed out, cutting end format streams is silly.


Nowdays, if you use high qual mpeg4 to store sources, better to have them in mpg than avi container, as to edit a mpg stream is more easy than a avi-mpeg4,
Why and with which tools?


could they be joined like plain text also with dos copy command?
Neither can mpg... timestamps will not get updated this way and begin/end markers will not be removed... joining mpg-files with copy/b is a bad idea although most software players still read them (hardware certainly not always).

movmasty
2nd November 2004, 16:39
Originally posted by stephanV
this is BS... you cannot cut mpg-files in VirtualDub... you can only convert them (and ironically it converts them to AVI). Dont talk about YMPEG, thats *re-encoding* and which has nothing to do with cutting. bullshit you say?,this only depends from vd not saving as .mpg
there are plenty of free utilities to split-paste-extract mpgs without re encoding.

And who was talking about cutting? i said editing, and cutting is not editing, editing is cut-paste-RECOMPRESS, and since mpg handles b frames better, is also a better format to edit from.

And obviously, if we put mpeg4 in .mpg container, then avery should put the "save as mpg" option in vd......

stephanV
2nd November 2004, 16:46
Originally posted by movmasty
bullshit you say?,this only depends from vd not saving as .mpg
there are plenty of free utilities to split-paste-extract mpgs without re encoding.
You were talking how well VirtualDub handles mpg, not me.


And who was talking about cutting? i said editing, and cutting is not editing, editing is cut-paste-RECOMPRESS, and since mpg handles b frames better, is also a better format to edit from.

If you recompress then all this b-frame/keyframe hassle has nothing to do with it anymore... so what would your point be then?


And obviously, if we put mpeg4 in .mpg container, then avery should put the "save as mpg" option in vd......

right.. :)

movmasty
2nd November 2004, 16:47
Originally posted by stephanV
So how will this change if you put it in to mpg? The key frame distance will stay the same. The only reason why mpg is more accurate in cutting is that the two codecs used in that container (mpeg1 and 2) usually dont have a bigger keyframe distance of approx 30 frames and the GOP-size is fixed. The cutting trouble does not come from avi, but from mpeg4.

Secondly, as fcc already pointed out, cutting end format streams is silly. excuse me about my silly bullshit, but many cards can capture in mpg, that would be a source, not an "end"....
dvd can be considerd a source as well....

discussion started about mpg being less editable than avi, i just showed that is not true when the avi use a great compression codec,
and with b frames an avi-xvid stream shows to me two diff pictures for a frame regarding if i come from "left" or "right"

stephanV
2nd November 2004, 16:55
Originally posted by movmasty
discussion started about mpg being less editable than avi, i just showed that is not true when the avi use a great compression codec
You are missing the point... you should not use MPEG4 to edit... thats silly. Whether you do it in mpg or AVI it does not make sense either way. And yes, you can cap in with MPEG2 I frame only in the MPG container... just as you can cap with huffyuv in the AVI container.

DVDs are not a source: they are an end product, despite what many people would like to let you believe.

And yes, AVI is a more versatile format for editing... you are the one having problems putting MPEG4 in MPG :p

Mug Funky
2nd November 2004, 17:55
hmm. i'm considering doing my capping in I-frame only Xvid. i think avi and mpg will handle this equally well, but of course there's a nice handy vfw codec for avi, whereas mpeg-4 in mpg transport will be difficult (i certainly don't know of any NLEs that can handle that without serious patching, hacking or plugging-in).

Cuttermaran is a cool program for cutting MPEG, though. only recompresses frames on cut points, so you get frame-accurate editing, and keep as much quality as humanly possible.

oh, FWIW, DVDs get used as sources frighteningly often. it's just the only thing available sometimes. in some cases it's actually the lesser of two evils, though ideally this should never happen.

recompressing lossy video isn't nearly as bad as recompressing lossy audio (which also happens quite a bit in the industry, unfortunately). in short this is because lossy video plays tricks with space and time, whereas lossy audio plays tricks with your ears and brain...

i'd like to see mp4 taken up though. the multitude of pseudo-standards surrounding mpeg-4 ASP is a real problem here (i've mentioned before that divx 3 was a blessing and a curse at the same time).