PDA

View Full Version : Using different quant matrices in same file


Prettz
10th October 2003, 00:50
Simple question: can you combine two clips together when one uses the H.263 matrix and the other uses the MPEG matrix (and GMC as well)? Is doing this MPEG-4 compliant?

superdump
10th October 2003, 01:42
This is not a good idea and also, h.263 is not a matrix, it's a quantisation formula.

Teegedeck
10th October 2003, 08:13
Originally posted by Prettz
Is doing this MPEG-4 compliant?

Sorry: it isn't.

Koepi
10th October 2003, 09:34
It can be compliant. The header carrying these information (quant matrices,...) is demanded to be at the start of a _stream_. (It's for fixing possible transmission errors that every mpeg4 encoder sends these headers with every keyframe anyways I think.)

So if you chain two bitstreams it can be perfect valid to merge those files. But I doubt that it'll work with virtualdub(mod) as those video streams are too different. Maybe you should simply try to use a mp4 container and use a file level copy to merge them (copy /b a.mp4+b.mp4 c.mp4)

Just my oppinion.

Regards
Koepi

mf
10th October 2003, 14:02
Originally posted by superdump
This is not a good idea and also, h.263 is not a matrix, it's a quantisation formula.
Actually, it works the same as a matrix, however it isn't a matrix as such, because all values would be the same. Now you think: "that's what the ultra-low-bitrate and CG matrixes are too", and that's right. They work the same as h.263, and, in fact, you can even use trellis quantization with them. If you have an undersized h.263 file, you can even use CG matrix as an alternative.

sysKin
10th October 2003, 14:22
Originally posted by mf
Actually, it works the same as a matrix, however it isn't a matrix as such, because all values would be the same.It is not *perfectly* true but quite close :) There differences are very small.

Radek

shitowax
10th October 2003, 15:59
Originally posted by Koepi
It can be compliant. The header carrying these information (quant matrices,...) is demanded to be at the start of a _stream_. (It's for fixing possible transmission errors that every mpeg4 encoder sends these headers with every keyframe anyways I think.)


I doubt that DivX and XviD encoders set those headers with each keyframes for any reason except than to be editable inside AVI ... For example, Apple MPEG-4 encoder is optimized for streaming and doesn't add those header inside .mov or inside .mp4 ... and it's still editable.


So if you chain two bitstreams it can be perfect valid to merge those files. But I doubt that it'll work with virtualdub(mod) as those video streams are too different. Maybe you should simply try to use a mp4 container and use a file level copy to merge them (copy /b a.mp4+b.mp4 c.mp4)


I wouldn't do that if I were you ;)

The only clean and ISO compliant solution is to use the multitrack capabilities of .mp4 ... But of course, you would need some sort of editor to do that (QT Pro is able to produce multitrack .mp4, but it won't let you open ASP MPEG-4 video).
Just my 2 cents tho

mf
10th October 2003, 19:20
Originally posted by Koepi
Maybe you should simply try to use a mp4 container and use a file level copy to merge them (copy /b a.mp4+b.mp4 c.mp4)
Can you simply append MP4? I'm not sure, but I don't think so. My idea: extract raw mpeg4 stream to m4v file, append, then mux to MP4.

Originally posted by sysKin
It is not *perfectly* true but quite close :) There differences are very small.

Radek
Peh, you should have said so from the beginning then. I got all this information from you, so if it's incomplete, it's your fault for not informing me better :D.