PDA

View Full Version : Problem Muxing with mp4box


Sgt.CrappyPants
25th January 2006, 08:26
I am encountering some problem when muxing the video and audio.
I use this command line to compress the video and audio

-----------------
x264 --crf 22 --filter -2,-1 --trellis 1 --threads 2 --ref 3 --mixed-refs --bframes 3 --b-pyramid --subme 6 --b-rdo --weightb --analyse all --8x8dct --progress --output v.mp4 1.avs

aacenc32 -profile HE -vbr normal a.wav

mp4box -fps 23.976 -add v.mp4 -add a.mp4 -new vid.mp4
------------------

1.avs
DirectShowSource( "v.avi" ) #this is an xvid

------------------

The thing is that the video and audio come out fine when played separately.
But when I try to mux them, it takes eternity for mp4box to import the video files. I started muxing and left it running only to get an ouput after 13 hrs. And the output when played back crashes the MPlayerc.

I am using x264 core:44 svn-408 and mp4box gpac version 0.4.1-DEV

I have encountered this problem with several of my encodes, tried searching the forums only to get no results.

also, x264 outputs this before starting the encode
-------------
Index Type(1) chunks(111063)
Index Type(2) chunks(111054)
Index Type(1) chunks(111063)
Index Type(2) chunks(111054)
Index Type(1) chunks(111063)
Index Type(2) chunks(111054)
Index Type(1) chunks(111063)
Index Type(2) chunks(111054)
-------------

Whats the possible remedy of this problem. Help anyone!!!

chros
25th January 2006, 11:25
mp4box -fps 23.976 -add v.mp4 -add a.mp4 -new vid.mp4


Maybe it's not your main problem, but - as I recall - the -fps switch doesn't working with video in mp4 container (*.mp4), just for the pure .h264 stream, so:

mp4box -fps 23.976 -add v.h264 -add a.mp4 -new vid.mp4

Sgt.CrappyPants
25th January 2006, 11:35
i was using fps switch becos i read somewhere tht mp4box uses a default fps of 25, and since my vid was 23.976 i had to make the change.

So as u suggest i shud be converting to .h264 from .mp4 and then redo the muxing.

how do i extract .h264 from .mp4

chros
25th January 2006, 11:45
how do i extract .h264 from .mp4

First check the video stream number, then if it 1 (as usually):

MP4Box.exe -raw 1 v.mp4

(Or try the YAMB gui for mp4box)

Zero1
25th January 2006, 14:25
Hmm, I can't get to a computer to test this (typing on my mobile phone at work), but try:
mp4box.exe -add a.mp4 -fps 23.976 v.mp4
but this will mux the audio to the output of x264.
I suggest outputting to .264 and trying a different mp4box build, it could be possible that the version of mp4box you are using, or x264 has broken output.

bond
25th January 2006, 19:01
the -fps switch will only work when importing raw video streams, so not with .mp4

try the latest mp4box compiles from here:
http://kurtnoise.free.fr/mp4tools/?M=D

Sgt.CrappyPants
25th January 2006, 19:45
allright i tried as suggested, these are my new commandlines

------------
x264 --crf 22 --filter -2,-1 --trellis 1 --threads 2 --ref 3 --mixed-refs --bframes 3 --b-pyramid --subme 6 --b-rdo --weightb --analyse all --8x8dct --progress --output v.264 1.avs

aacenc32 -profile HE -vbr normal a.wav

mp4box -fps 23.976 -add v.264 -add a.mp4 -new vid.mp4
--------------

I am using the latest version of mp4box "MP4Box_20060119+pengvado-patch.zip"

The muxing now works like a breeze. The output can be played back, but the audio and video are completely out of sync. Moreover, ffdshow reports the video as 25 fps.

bond
25th January 2006, 19:54
why dont you simply feed x264 with a 23.976fps .avs and output to .mp4?

try
mp4box -add v.264 -fps 23.976 -add a.mp4 -new vid.mp4

Sgt.CrappyPants
26th January 2006, 06:14
@bond

that is exactly whan i am doing.
the avs is reported as 23.98 by x264 and VdubMod reports it 23.976

even mp4box reports the final video as 23.976 while muxing, but ffdshow reports it as 25 fps.

bond
26th January 2006, 20:30
@bond

that is exactly whan i am doing.
the avs is reported as 23.98 by x264 and VdubMod reports it 23.976

even mp4box reports the final video as 23.976 while muxing, but ffdshow reports it as 25 fps.propably ffdshow is wrong ;)
try other tools