Log in

View Full Version : Problems with MP4Creator/MP4UI


Pages : 1 [2]

bond
15th February 2004, 19:55
i assume thats because mp4ui gives this stream the 4cc of divx4 (it has to give a 4cc)!?

SeeMoreDigital
15th February 2004, 20:19
Originally posted by bond
i assume thats because mp4ui gives this stream the 4cc of divx4 (it has to give a 4cc)!? It does'nt only happen with 'known' XviD video streams.

I've just demuxed the video stream from out of the animatrix (http://www.comelec.enst.fr/osmo4/mp4/mediacontrol_animatrix.mp4) test encode and that's identified as being DivX4.x.x too! God know's what this stream really is!

Cheers

bond
15th February 2004, 20:52
hm i dont know where or if it is stored in a mp4 which codec was used for the video stream but i am sure mp4ui doesnt care about that anyways:
it handles all mpeg-4 compliant streams the same way, meaning from what you said it adds to all mpeg-4 streams the divx4 4cc when extracting to avi

use the 4cc changer coming with xvid to change the 4cc of the avi (this 4cc doesnt really matter cause all mpeg-4 decoders (divx5, xvid, 3ivx, ffdshow) can decode all mpeg-4 streams (no matter if labelled as divx4/5, xvid...)

SeeMoreDigital
15th February 2004, 21:51
Originally posted by bond
...use the 4cc changer coming with xvid to change the 4cc of the avi (this 4cc doesnt really matter cause all mpeg-4 decoders (divx5, xvid, 3ivx, ffdshow) can decode all mpeg-4 streams (no matter if labelled as divx4/5, xvid...) Talking about 4cc changing. I used to use a little application called 'avic100' but I guess it's a little out of date now!

Shame there is'nt something else around - well, not that I can find anyway.

It would also be nice if there was a tool that could embed an anamorphic switching signal to DivX Mpeg4 streams but hey you can't have everything!

Cheers

EDIT: Sad that 'Nic's Mini FourCC Changer' does'nt include a DivX5.x.x ident.... why is that I wonder? And why is it that Nero Recode2 video streams don't like a DivX 4cc only XviD?

yakima
17th February 2004, 11:19
following on to my previous posts:
- mp4creator will have fixes for both problems in v. 1.1 (i.e.: userdata field issues & profile setting in xvid 1.0 issues)
- if someone has a xvid 1.0 avi with profile level set (results in seeking problems when muxed w/ mp4creator), here is how to deal (thanx to bill may): just use mp4creator on the elementary stream, e.g.:
avi2raw -v test.avi test.m4v
avidump test.avi (to get frame rate)
mp4creator -r <frame rate> test.m4v test.mp4

bond
17th February 2004, 11:29
great that you could convince bill may to do it (i never was able to do this :D )

or did he convince you do submit the fixes?

yakima
17th February 2004, 13:05
well, as the ppl at xvid did not want to change their userdata positioning and as there are problems with most (xvid, divx, ffmpeg: most if not all versions) encoders' userdata field, i guess there was no way around. (of course, i could not do that - i don't really get how the fields are identified, and i don't even get the syntax apart from what i remember from school days ... which is pretty much nothing ...)
and concerning the other issue: it seems xvid is putting the profile level at every keyframe, so the fix is just to strip that when muxing.

btw. thanx for the faq and the hunt for new solutions & fixes for mp4. for a time i really thought nobody was really interested in mp4, hearing everyone keeping to the hacked avi "because it works" ;) (and bugging me with: oh, mp4s don't play ..)

do you by any chance know where userdata is supposed to go in a mp4?

Stux
17th February 2004, 17:37
Originally posted by yakima
do you by any chance know where userdata is supposed to go in a mp4?

ain't that a million dollar question :)

userdata can be at virtually every higher level syntactic layer in an MP4 file from the 'moov' atom downards to the frames :)

And that's just in the MP4 file.

What's causing this problem is MP4V user-data in the MPEG-4 video bitstream, which can be at all higher level syntactic layers too :)

ie

Object, Stream, Group of Vops, VOL, VOP etc

by convention most MPEG-4 codecs (3ivx, divx, xvid, nero, fraunhoffer (essentially everyone except Apple)) write a codec identifier into a userdata chunk in the VOL chunk

the problem isn't actually the user-data, its the VOL hacking that AVI codecs use to get MPEG-4 video into AVI.

The 3ivx muxer reverses this during MP4 muxing.

The codec identifiers are important to identify buggy streams from buggy encoders to enable correct decoding of the non-compliant streams... the largest culprit is DivX5 ;), although a more sinister problem is untagged bitstreams from buggy encoders :( (like XviD 0.9 stable series)

yakima
18th February 2004, 01:27
yep, agreed: million dollar question ... and agreed regarding the usefulness of codec/version identifiers ... but what exactly is the problem with the avi-hack?

the following is basically guess work, so feel free to correct me:
the problem with userdata and mp4creator to me really is that upon checking for isma-compatibility the decspecificinfo gets too long if userdata is in there.
(there appears to be another problem where mp4creator seems to get confused if the userdata is after the vol, but that shall not be the issue here).

the 3ivx-muxer really does exactly the same: write the vol header to decspecificinfo including the userdata. so if i take a video mp4 muxed with 3ivx and add audio with mp4creator, the isma-compliance check fails.

so i wonder:
- is the 3ivx muxer doing anything in this regard (is this what you meant)?
- is it ok ("isma-compliant") if the userdata is written to the decspecificinfo (as 3ivx does)?

maybe i miss the point about the decspecificinfo, so it would really help out if someone could explain the avi-hack thing that's screwing up the vol ..

to stux (and all else involved): thanx for the new 3ivx! it really fixes the audio lag that has been bothering me for so long ...

yakima
20th February 2004, 13:05
seems putting the userdata into the decspecificinfo should be isma-compliant; for some reason though the isma-compliance check in mp4creator fails if userdata is present ... (in the source it looks like a checksum thing that somehow gets confused if userdata is present)

bond
29th February 2004, 10:03
yakima,
thanks for your efforts in bringing light into this topic

for everyone who hadnt followed the discussion look here (http://sourceforge.net/forum/forum.php?thread_id=1018315&forum_id=59136)

bond
26th March 2004, 10:07
ok another report that there might be something wrong with xvids profile setting:

jeanlf from the gpac project meant: "not sure that's not an XviD bug. The xvid bitstream info is correct with simple profile and set to 0xFE (= undetermined) with other profiles."

look here (http://sourceforge.net/tracker/index.php?func=detail&aid=916440&group_id=84101&atid=571738)

g.geek
31st March 2004, 20:29
Help,

This seems like such a general and obvious question & topic, but I can't find it in any of the previous posts.

All I wanna do is take real raw audio & video files (.yuv or .rgb, .pcm) files, and create an .mp4 file.
Right now, I'm working on getting mp4creator to work, and am
using the latest sources from mpeg4ip-1.0.tar.gz

mp4creator is creating files that appear to not be mp4 compliant (QuickTime doesn't like them).
mp4creator also warns 3 times that it's dropping 626 bytes, when using output from either avi2raw60 or BeSweet. The .mp3 files output from avi2raw60 and BeSweet sound fine on Netscape Winamp.

e.g.
avi2raw60 -a Matrix_short.avi Matrix_short.mp3
mp4creator -c Matrix_short.mp3 -H -optimize Matrix_short.mp4
or
BeSweet -core( -input "Matrix_short.vob" -substream 0x80 -
output "Matrix_short.mp3" )
mp4creator -c Matrix_short.mp3 -H -optimize Matrix_short.mp4

QuickTime's error msg is:
An Audio Decoder Configuration Descriptor is corrupted.
Expected ObjectType=Audio(0x40); found ObjectType=^0 instead.

Thanks for any insights.

bond
31st March 2004, 20:39
welcome to doom9 g.geek :)

first of all i have to warn you mp4creator is not the most stable mp4 tool around

also i am not sure that avi2raw and besweet (when encoding directly from .vob) outputs reliable results
if you want to extract audio streams (ie mp3) from .avi i recommend you to use widely known and tested tools, like virtualdubmod
also if you want to encode ac3 streams (from vob) it would be better to extract them first from the vob (for example with dvd2avi) and than encode these .ac3 files to mp3/aac in besweet (to avoid any possible problems)

g.geek
2nd April 2004, 08:39
Hi bond,

Thanks for the suggestions. Here's what I did:

used dvd2avi to extract an .ac3 from a .vob file,
used BeSweet to gen an .mp3 file, (which plays on Netscape Winamp)
used mp4creator to gen an .mp4 file.

mp4creator complained again about dropping bytes, and the resulting .mp4 file is rejected by QT (again with the same error msg). Here are the commands:

BeSweet -core( -input MS192.ac3 -substream 0x80 -output MS192.mp3 )
::
mp4creator -c MS192.mp3 -H myaudio.mp4
:: (myaudio.mp4 fails to play on QT)

I would think that what I need to do is fairly straightforward -- use batch programs to take real raw audio & video files (.yuv or .rgb, .pcm) files, and create an .mp4 file. However, few things in life are as simple as they appear to be.

I would assume that mp4creator has worked at some point, but it doesn't work for me. So I think that it's something that I'm doing, but I can't see anything wrong. You said that mp4creator is not the most stable mp4 tool. How can I get a working mp4creator, or is there another tool that will create .mp4 files?

Thanks again.

bond
2nd April 2004, 09:12
Originally posted by g.geek
You said that mp4creator is not the most stable mp4 tool. yep

How can I get a working mp4creator, or is there another tool that will create .mp4 files?have a look at the mp4 faq, there are lots of other different tools
i would recommend you to use the 3ivx dshow mp4 muxer or mp4box (commandline like mp4creator)
note that mp4ui is totally based on mp4creator and therefore is likely to produce the same output

plz report your findings, perhaps qt is simply not able to play mp3-in-mp4 files!?

yakima
3rd April 2004, 11:07
i'd guess the problem with qt is just that qt doesn't like mp3 in mp4 - at least this was the case in earlier qt6 versions & this is what the error msg. hints at. qt will have problems with any mp4 content that is not really simple profile & aac (bframes will be ignored though).
i've seen the "dropping bytes" error msg. in mp4creator, i am not sure, but i think it had to do with something being wrong in the audio stream. you might want to try around a bit, just producing an mp4 with audio only and different mp3 encoders/encoding settings, to see if the audio is the problem (btw: why don't you just use aac?). and leave out the hinting part, keep things simple to figure out what is wrong.
good luck

yakima
3rd April 2004, 11:11
oh, and btw: you can't optimize in the same step that you create in mp4creator (not sure if you can hint, cause it seems mp4creator produces only one track at a time)

SeeMoreDigital
3rd April 2004, 11:27
Hi yakima,

I think this tread (http://forum.doom9.org/showthread.php?s=&threadid=73532) I started in the XviD section of the forum might interest you!

Cheers

g.geek
10th September 2004, 07:22
Hi again,

I've not been working on this for a while, but have come back to try and solve it. Mp4creator doesn't work well, and Mp4box doesn't do what I need.

As I said before, it seems that what I need to do is fairly straightforward -- generate a DOS-type .exe stand alone program that will allow me to take video (.yuv or .rgb) and audio .pcm files, and combine them to create an .mp4 file, then have a similar program that will play that .mp4 file. Is this even possible?

When I run xvid_encraw to gen an .mp4 file, neither Quicktime nor Divx likes the output. Here's the cmd line, if it helps:
xvid_encraw -i 320_368.yuv -type 0 -h 320 -w 368 -single -o out.mp4

Without knowing the format of .mp4 files, it's impossible to determine why this fails.

Does anyone have any suggestions? One big help would be knowing where to get the format of .mp4 files so I could at least intelligently parse the output file (QT docs certainly don't help.)

A million thanks in advance,
g.geek

ak
12th September 2004, 00:10
Have you tried ffmpeg? It should suffice for that purpose

ffmpeg -s 320x368 -i vid.yuv -i aud.wav -acodec aac -vcodec mpeg4 (that'll be libavc, current cvs can do xvid as well) -other -options out.mp4.

Don't have QT here, but I once tried and QT ate it, although with pretty humble encoding options (e.g no b-frames etc)

bond
13th September 2004, 18:37
dont use b-frames, as they might f* up things, additionally quicktime doesnt understand qpel and gmc