View Full Version : Find out the used matrix(urgent) :)


movmasty
11th January 2005, 19:50
i need to paste a clip with one encoded before in xvid

i dont remember the custom mpeg matrix that i used in the old clip,

How could i find out the matrix encoded in that vid?

BigDid
11th January 2005, 20:08
Originally posted by movmasty
i need to paste a clip with one encoded before in xvid

i dont remember the custom mpeg matrix that i used in the old clip,

How could i find out the matrix encoded in that vid?
Hi movmasty,

Indirect answer but you said it is urgent; mpeg4 modifier gives you (video info) the content of the matrix used (intra/inter) and also names it if h263 or mpeg. So it seems you can at least compare different clips to see which uses the same matrix :)

Did

movmasty
11th January 2005, 20:16
many many thanks,

but why compare? I only need to find out the used matrix and encode the new clip with it.

I always use my custom matrices, but i've built a whole serie from 8-8 to 17-17 and with two "steps" for each one,
i mean eg. 14-14-15 0r 14-14-14 referring to upper left 3 values.

i usually use 14 or 15 with min quant 3,

so i have the choice between 14-14-14, 14-14-15, 15-15-15, 15-15-16...

where do i find that modifier, i read that doesnt supports openDML....

Sharktooth
11th January 2005, 20:18
here: http://forum.doom9.org/showthread.php?s=&threadid=78050

movmasty
11th January 2005, 20:31
thanks, but i dont have net.framework installed :(

movmasty
11th January 2005, 20:36
this is a general utility question,

since mpeg4 doesnt support different matrices in the same stream, codec, framerate and screen size par. are not enough to paste two clips.

i have to encode a Star trek episode that is the 2nd part of another and would like to paste them together...

movmasty
11th January 2005, 21:04
so, what is going to happen if i paste two movies with matrices that are not exactly the same :confused:

movmasty
11th January 2005, 21:26
matrix' "jungle" is growing, so, how to paste clips encoded in different times??

a simple tool to find out the matrix is needed , c'mon, would be a light work for a programmer :devil:

bond
11th January 2005, 22:31
1) mux from .avi to .mp4 with mp4box (gpac project)
2) run the mpeg4vol tool (mpeg4ip project) on the .mp4 file, which will display the custom matrix

you can find both by using search (celtic_druid's site)

movmasty
11th January 2005, 22:47
ehm....some more info will be appreciated as im not very much familiar with those tools

bond
11th January 2005, 22:51
1) place mp4box.exe and mpeg4vol.exe in the same folder
2) place your input.avi file in the same folder
3) create a .txt file and place the following lines in it:
MP4Box -convert input.avi output.mp4
mpeg4vol output.mp4 > log.txt4) rename the .txt to .bat and execute it
5) the custom matrix should be displayed in the log.txt

movmasty
11th January 2005, 22:53
oh, many thanks, i am just looking for the celtic_druid's site

-

i got this msg " Option -convert unknown. Please check usage "

movmasty
11th January 2005, 23:51
Yahoo! i did it! many thanks bond :)

i used this bat:

MP4Box -import C.avi C.mp4
mpeg4vol C.mp4 > log.txt

and got these matrices:
load_intra_quant_mat - 1
8 14 14 16 14 16 17 17 17 17 18 18 18 18 18 19
19 19 19 19 19 21 21 21 21 21 21 21 23 23 23 23
23 23 23 23 25 25 25 25 25 25 25 27 27 27 27 27
27 30 29 29 29 30 32 32 32 32 36 36 36 40 40 44

load_nonintra_quant_mat - 1
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 18
18 18 18 18 18 19 19 19 19 19 19 19 20 20 20 20
20 20 20 20 21 21 21 21 21 21 21 22 22 22 22 22
22 23 23 23 23 23 24 24 24 24 25 25 25 26 26 28

also if written in unusual format i found out which of my custom matrices was used

url for MP4Box
http://www.rarewares.org/files/mp4/mp4box.zip

url for mpeg4vol.exe
http://webs.ono.com/de_xt/mpeg4ip-1.1-tools.zip

try that guys.

Just thinking, someone could add the pack(MP4Box + mpeg4vol.exe +bat file to any matrices zip)

bond
12th January 2005, 00:13
you used old versions of the tools, but still they worked fine :)

movmasty
12th January 2005, 00:59
ok, of MP4Box maybe, where to find the new?

-one hint, isnt necessary to convert all the movie, i used the first mega,without audio, extracted with vdub

fccHandler
12th January 2005, 04:55
Originally posted by movmasty
since mpeg4 doesnt support different matrices in the same stream
:confused: Is this true?

I know little of the details of MPEG-4, but even MPEG-1 supports changing matrices every GOP. And in theory, MPEG-2 can change matrices every picture! What's wrong with MPEG-4? Or is this just a limitation imposed by hardware decoder chips?

bond
12th January 2005, 10:38
Originally posted by movmasty
ok, of MP4Box maybe, where to find the new?search for celtic_druids site, eg via typing "celtic_druid" in google ;)

one hint, isnt necessary to convert all the movie, i used the first mega,without audio, extracted with vdubindeed, mpeg4vol analyses the vol of the stream and that will not change no matter how big the file is

Originally posted by fccHandler
I know little of the details of MPEG-4, but even MPEG-1 supports changing matrices every GOP. And in theory, MPEG-2 can change matrices every picture! What's wrong with MPEG-4? Or is this just a limitation imposed by hardware decoder chips?interesting, i also thought you have to use the same (eg the vol of the mpeg-4 stream is only signalling one matrix for the whole stream. as the vol is stored only once in .mp4 i wonder how signalling matrices for every single frame should work?)

stephanV
12th January 2005, 10:46
Originally posted by fccHandler
I know little of the details of MPEG-4, but even MPEG-1 supports changing matrices every GOP. And in theory, MPEG-2 can change matrices every picture! What's wrong with MPEG-4? Or is this just a limitation imposed by hardware decoder chips?

I believe XviD had such a mode once... but besides from not being compliant with the standard, it is kinda hard to implement.

bond
12th January 2005, 11:03
Originally posted by stephanV
I believe XviD had such a mode once... but besides from not being compliant with the standard, it is kinda hard to implement.quant modulation was about mixing h.263 and mpeg quants, not about mixing custom quants, and was indeed not spec compliant

fccHandler
12th January 2005, 17:42
Originally posted by bond
interesting, i also thought you have to use the same (eg the vol of the mpeg-4 stream is only signalling one matrix for the whole stream. as the vol is stored only once in .mp4 i wonder how signalling matrices for every single frame should work?)
I glanced at the MPEG-4 spec briefly, though I'm not at all familiar with it. Just like you said, the matrices are signalled at the VOL layer. Assuming only one VOL per stream, then indeed there can be only one matrix. :(

In MPEG-1 and -2, matrices are signalled in the "sequence header," which normally appears at every GOP. MPEG-2 adds a "quant matrix extension" which could be used to signal new matrices at the start of each picture.