Log in

View Full Version : avc mp4->avi using mp4box


[)370|\|470!2
16th September 2005, 19:53
MP4Box - GPAC version 0.4.1-DEV
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
(c) ENST 2005-200X
Here's command log:
\MP4Box.exe -avi 1 -fps 23.976 "D:\pvcrwork\bk\avc.mp4"
Creating AVI file 0 x 0 @ 23.98 FPS - 4CC "XVID"
B-Frames detected - using unpacked bitstream with max B-VOP delta 2

Resulting .avi file causes to crash any app with august ffdshow release(newer ffdshow just ignores it) and it has vssh fourcc and looks like it's really 0x0 ar.
What am i doing wrong..?

stephanV
16th September 2005, 20:02
You cant use mp4box for that IIRC...

maybe you can extract to raw and use avc2avi (can be found in x264 download sticky)

[)370|\|470!2
16th September 2005, 20:07
-avi TrackID : extracts visual track in avi format (MPEG-4 Visual and AVC/H264 supported). According to Gpac guide (http://gpac.sourceforge.net/auth_mp4box.php)

stephanV
16th September 2005, 20:24
Then you are either having the wrong track ID or mp4box is buggy (no surprise there)

Drachir
16th September 2005, 20:42
I think you should only extract H.264 to avi if no B-frames are used.

I wouldn't extract to avi at all "^^ .

The resulting file comes with the fourcc vhss?
From the output of MP4Box I would have thought it is set to xvid.

Write a bugreport at GPAC.

[)370|\|470!2
16th September 2005, 21:02
Heheh, i just wanted to know, if converting an. avi to .mp4 is reversable, since this
mp4 file was made from VDM-created x.264 avi, and if i couldn't do avi-mp4 and vice-versa,
then mp4 is of no use for me. Unless there's some VD-like tool for it, which looks like we'd
have to wait for 10 years %)

Drachir
16th September 2005, 21:28
B-Frames detected - using unpacked bitstream with max B-VOP delta 2

It is possible to use B-Frames with x264 vfw? I don't use VDM. Had not thought so.

I would be interested at a Macromedia Flash like tool for mp4 (BIFS/LASeR). Let see if there will happen something in the next 10 years.

[)370|\|470!2
16th September 2005, 21:32
I think you should only extract H.264 to avi if no B-frames are used.

I wish there would be a really detailed guied to mp4box somewhere:D

I wouldn't extract to avi at all "^^ .

Look my previous post ^^

The resulting file comes with the fourcc vhss?
From the output of MP4Box I would have thought it is set to xvid.

Write a bugreport at GPAC.

Hmm, i don't think that it is a "bug" since it easily can be changed using hexeditor xD
Furthermore, vssh is same as h264 in terms of decoding: if i'm not wrong,
it's videosoft H264 4cc

[)370|\|470!2
16th September 2005, 21:38
It is possible to use B-Frames with x264 vfw? I don't use VDM. Had not thought so.

If XviD uses it, why x264 can't?


I was thinking... is there any way to force AR in mp4box..? It just looks like it creates
AR 0x0 Video... Interesting, would mp4box be able to open it? Gotta try.

I don't use VDM.

Hmm, then you've must be using AVISinth, right? If so, is there any filter for it
to process an .mp4?

Drachir
16th September 2005, 21:48
MP4Box don't change the PAR of the Video Elementary Stream. The tool which create the Vidoe ES have to set the right PAR.

Hmm, then you've must be using AVISinth, right? If so, is there any filter for it
to process an .mp4?

I use mencoder with -of rawvideo.

Drachir
16th September 2005, 22:22
Hmm, i don't think that it is a "bug" since it easily can be changed using hexeditor xD
Furthermore, vssh is same as h264 in terms of decoding: if i'm not wrong,
it's videosoft H264 4cc

Don't meant the 4cc. Vssh is all right. But the message, that MP4Box uses the 4cc XVID, is wrong.
I mean you should write a bugreport for your mp4 to avi export problem.
But I don't think, that there will be a propper support for it, if B-Frames are used. Maybe MP4Box should print a warning if B-frames are used.

stephanV
16th September 2005, 22:36
whats so difficult about b-frames? you just store them in decoding order, just like is done in any other sane container (i presume)

[)370|\|470!2
16th September 2005, 22:55
Well, mp4box-created .avi is b0rked deffo. i've just loaded it back to mp4box and extracted raw .h264 stream from it(no problems so far). Now, when i'm trying to create an
.mp4 of it, app suddenly says:
MP4Box.exe -add D:\pvcrwork\1_video.H264 D:\pvcrwork\1_video.mp4
Cannot find H264 start code
Error: BitStream Not CompliantError importing D:\pvcrwork\1_video.H264: BitStream Not Compliant
Though it claims:
MP4Box.exe -info D:\pvcrwork\1_video.H264
Import probing results for D:\pvcrwork\1_video.H264:
File has 1 tracks
Track 1 type: Video

Drachir
16th September 2005, 23:10
Write a bugreport at GPAC and provide a sample file.

foxyshadis
17th September 2005, 03:06
AVC in AVI loses 1+ frames each conversion to another format (besides direct stream copy) with B-frames; xvid loses 1-2. Depends on how many b-frames and what type. So they aren't fully reversible, and the audio will desynchronize noticably eventually.

It's possible for vdub and other avi applications to support cutting the initial blank frames and flushing the codec framebuffer at the end, they just don't yet. Maybe some of the command line tools do, you can check.