Log in

View Full Version : MP4Box vs. MP4Creator


vlada
14th November 2009, 08:26
Hello,

I have a problem with MP4Box. The files created by it don't play on my phone (General Mobile DSTL1, Android OS), I get only sound, no picture. The same source tracks muxed by MP4Creator play fine. I prefer mp4box, because it supports MP4 input and NeroAAC doesn't support raw AAC output, so I would need an extra step (demuxing) in my work flow.

The only obvious difference I can see are the track IDs. Is there any way to force mp4box to use IDs 1 and 2 for video a and audio track? Or is there any other problem?

Here are reports from MediaInfo:

General
Complete name : D:\video2.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 8.01 MiB
Duration : 3mn 50s
Overall bit rate : 292 Kbps
Encoded date : UTC 2009-11-13 23:05:18
Tagged date : UTC 2009-11-13 23:05:33
Writing application : mp4creator 1.6.1e-pre

Video
ID : 1
Format : MPEG-4 Visual
Format profile : AdvancedSimple@L5
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : 20
Duration : 3mn 44s
Bit rate mode : Variable
Bit rate : 269 Kbps
Maximum bit rate : 784 Kbps
Width : 320 pixels
Height : 184 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.183
Stream size : 7.18 MiB (90%)
Encoded date : UTC 2009-11-13 23:05:18
Tagged date : UTC 2009-11-13 23:05:19

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : Yes
Format settings, PS : No
Codec ID : 40
Duration : 3mn 50s
Bit rate mode : Variable
Bit rate : 28.8 Kbps
Maximum bit rate : 31.2 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 22.05 KHz
Resolution : 16 bits
Stream size : 810 KiB (10%)
Encoded date : UTC 2009-11-13 23:05:33
Tagged date : UTC 2009-11-13 23:05:33


General
Complete name : D:\video.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 8.02 MiB
Duration : 3mn 50s
Overall bit rate : 292 Kbps
Encoded date : UTC 2009-11-12 22:42:19
Tagged date : UTC 2009-11-12 22:42:19

Video
ID : 201
Format : MPEG-4 Visual
Format profile : AdvancedSimple@L5
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : 20
Duration : 3mn 44s
Bit rate mode : Variable
Bit rate : 269 Kbps
Maximum bit rate : 825 Kbps
Width : 320 pixels
Height : 184 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.183
Stream size : 7.19 MiB (90%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Encoded date : UTC 2009-11-12 22:42:19
Tagged date : UTC 2009-11-12 22:42:24

Audio
ID : 101
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : Yes
Format settings, PS : No
Codec ID : 40
Duration : 3mn 50s
Bit rate mode : Variable
Bit rate : 28.8 Kbps
Maximum bit rate : 32.3 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 22.05 KHz
Resolution : 16 bits
Stream size : 810 KiB (10%)
Encoded date : UTC 2009-11-12 22:42:22
Tagged date : UTC 2009-11-12 22:42:24

Kurtnoise
14th November 2009, 09:05
How we can help you without having access to the files ?

vlada
14th November 2009, 12:38
Sorry, I will provide samples in the evening. I'm currently at work and can't upload any files.

I was hoping for an advice on how to set track IDs in files created by mp4box in the first place. I haven't found such option in documentation...

Kurtnoise
14th November 2009, 13:15
you cannot overwrite trackIDs within MP4Box...

vlada
14th November 2009, 20:14
I uploaded samples here (http://www.mediafire.com/?gwywzimomqx). I found out, that the video created by mp4box doesn't play in WMP neither (Haali + ffdshow). The result is identical as on my phone - no picure, only sound. Both samples play fine in MPC.

The command line I used to create the video is MP4Box.exe -add "video.m4v#video:fps=23.393" -add "audio.aac#audio" -isma "video.mp4"


Is there any obvious mistake?

Kurtnoise
15th November 2009, 10:36
1. fps=23.393 doesn't exist !
2. -isma is not needed when you specify -add arguments. MP4Box creates ISMA compliant file by default (and discards streams which are not compliant).
3. both files play fine here on WMP12 (Seven 64bits).
4. As I said, you cannot overwrite the track IDs within MP4Box.

vlada
15th November 2009, 12:28
Thanks a lot for your interest and answers, Kurtnoise.

The 23.393 is the original framerate of my test file and the RAW stream. I thought it can be any real number. Anyway I tried to change it to 25. The results are the same as with 23,393.

Do you have any other idea what setting might cause the problem? Removing -isma shouldn't have any impact, if I understood you correctly.

Would it possible to modify MP4Box so that it always assigns track IDs starting from 1?

shon3i
15th November 2009, 12:39
I am not using MP4 container for while, but earlier versions of mp4box somehow can create broken or non compilant mp4 files. Looks like problem still presist. That's why i sometimes prefer ateme's mp4mux and/or MP4Creator.

crypto
18th November 2009, 23:22
I also checked both files and couldn't find any problems. They play both. The mp4box version has two additional tracks, "Object Descriptor" and "BIFS" which are on ID 1 and 2. This is perfectly ok, but maybe this confuses some splitters. Delete them and try, if that version plays.

vlada
19th November 2009, 10:09
crypto> Thank you. I know about these tracks but I don't know how to create the MP4 file in mp4box without them. They were created automatically.

If I remove them and recreate the MP4 file with other tool then mp4box, the file will play.

b66pak
19th November 2009, 21:47
i demuxed the "mp4box.mp4" file to an .avi video and a .mp4 audio then remuxed...

#demux video

mp4box -avi 201 mp4box.mp4


#demux audio

mp4box -single 101 mp4box.mp4


#remuxing...and displaying the results

mp4box -add mp4box_track201.avi -add mp4box_track101.mp4 -ipod -new new_mp4box.mp4

mp4box -info new_mp4box.mp4

pause

_

N.B. I am using the last mp4box from the megui tools folder...
_

P.S. The result...

General
Complete name : new_mp4box.mp4
Format : MPEG-4
Codec ID : M4V
File size : 1.81 MiB
Duration : 22s 570ms
Overall bit rate : 673 Kbps
Encoded date : UTC 2009-11-18 20:38:43
Tagged date : UTC 2009-11-18 20:38:43

Video
ID : 1
Format : MPEG-4 Visual
Format profile : AdvancedSimple@L5
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : 20
Duration : 22s 570ms
Bit rate mode : Variable
Bit rate : 478 Kbps
Maximum bit rate : 886 Kbps
Width : 400 pixels
Height : 224 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.393 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.228
Stream size : 1.29 MiB (71%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Encoded date : UTC 2009-11-18 20:38:43
Tagged date : UTC 2009-11-18 20:38:43

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 22s 570ms
Bit rate mode : Variable
Bit rate : 192 Kbps
Maximum bit rate : 198 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 529 KiB (29%)
Encoded date : UTC 2009-11-18 20:38:43
Tagged date : UTC 2009-11-18 20:38:43

vlada
19th November 2009, 23:04
Thanks a lot, I will try it tomorrow. Your file after remuxing seems to be what I need.

welpigh09
25th November 2009, 23:53
Hi,

why does the box creator object loses its script and notecard when it is touched? My problem with it is that I intend to make a big building composed of more prims than the notecard with its max size can handle. So, my only option was to run the script once with half the prims and then run it again with the rest of it. The problem is I cant do it because the box creator object becomes empty and I cant use another one just because it wouldnt be in the same start position to build the other half of the building.
How can I handle this?

Another question, do I need to buy 0 a box creator object every time I need to build something?

Thank you

vlada
26th November 2009, 01:21
b66pak> Sorry I didn't have time to check it before today. The "-ipod" switch sets the Track IDs to 1 and 2. Unfortunately the result of playing the file on my Android phone remains the same - no video, only audio.

b66pak
28th November 2009, 19:17
try to encode the video with no b frames...
_

vlada
28th November 2009, 19:29
The video has no b-frames. It is restricted to SP, as can be seen in MediaInfo output.

b66pak
28th November 2009, 19:39
do you have any video that work on the phone? post a sample (check it first on the phone to be sure!)...use mediafire...
_

L.E. oops...you posted already a working sample...i am out of new ideas...it seams that you will have to stick with mp4creator...
_

littleD
28th November 2009, 23:03
You cant view your files oh your phone cause probably it requires videos optimized for streaming (with metadata at beggining of the file). In Yamb go to settings and check proper box. In 2.1 beta2 i get error just once after checking, but muxed file should be ok.

vlada
29th November 2009, 16:02
littleD> Do you know what settings it affects for MP4Box? I tried all possible switches (3gp, iphone etc.) but I can't get any video that works on my phone.

b66pak> Thanks for your help and ideas anyway.

b66pak
29th November 2009, 18:15
try this on the phone please...

http://www.mediafire.com/?xzg0fdnw15j
_

littleD
29th November 2009, 23:04
Why dont you look in the source? http://gpac.sourceforge.net/doc_mp4box.php

Looks like yamb use -flat command when checking metadata at begining option... but funny.. look at description on the site i linked. It does actually inversely

EDIT
As of version 0.2.4, MP4Box always stores the file with 0.5 second interleaving and meta-data at the begining, making it suitable for HTTP streaming.

Hmm, why then yamb use -flat option for streaming?
-flat : forces flat storage of the file: media data placed at the begining of the file without interleaving, and meta-data at the end of the file

Or am i wrong?

vlada
30th November 2009, 10:13
b66pak> You sample plays fine. How did you create it?

littleD> I'll try the -flat switch later, thank you for the idea.

b66pak
30th November 2009, 19:29
@ vlada i created from your non-working mp4box.mp4 with this line:

mp4box -add mp4box.mp4 -new sample.mp4

i thing the problem is with the build of mp4box you are using...do this and post the result:

mp4box -version


i am using a kurtnoise build:

MP4Box - GPAC version 0.4.6-DEV (build 1 - May 19 2009) - compiled by Kurtnoise

http://www.mediafire.com/?zjmmzn41imn
_

vlada
1st December 2009, 22:55
I use the same mp4box version as you:

MP4Box - GPAC version 0.4.6-DEV (build 1 - May 19 2009) - compiled by Kurtnoise
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
(c) ENST 2005-200X


There seems to be something very strange in mp4box. If I use
mp4box -add video.m4v -add audio.aac -new video.mp4
the resulting file doesn't play. Now I take this video and do
mp4box -add video.mp4 -new video2.mp4
and the second video suddenly plays fine everywhere - on my PC, on my phone etc.

The 2 files differ in 16 bytes, but I'm not able to find out what is the difference. According to MediaInfo they are identical.

b66pak
2nd December 2009, 21:11
to avoid problems always encode to raw (.h264) then mux to .mp4...encoding to .mp4 is buggy...
_

vlada
2nd December 2009, 22:46
That's what I do. I encode to raw m4v (using xvid_encraw) and then mux it. But this doesn't work.