MPEG4 files maximum duration
Hello,
I'm working with 3gp files (encoded with mpeg4 codec) and I found a problem with maximum duration. I can't produce files longer than 6,5 hours. Does anybody knows the maximum duration of files coded with mpeg4 codec ?
for help
best regards
Grzesiek
Maybe it´s a file size problem? When you are on Windows NT, make sure you use NTFS.
I have windows xp with NTFS file system. When I produce files below 6,5h everything is ok but when i try to play longer files with all players I get an error. (for Quicktime 7.0: quot;Error -2014: the movie contains an incorect durationquot;)
for help
Are these files over 4Gb in size? If so, the problem may lie with the number format used within the player itself.
Hi
File details:
resolution:
Video Object Layer Width: 176
Video Object Layer Height: 144
Video Profile is MPEG4 Simple Profile Level 0
file size: 88 MB
thanks for help
No, a duration issue wouldn't have anything to do with 4gb boundary. Something's creating the files with too high resolution timestamps, and they're wrapping when they max out. I'm estimating it would be 10 us (signed) or 5 us (unsigned).
The app should reduce the resolution as necessary for longer files! If there's no setting to change this somewhere, you should tell us what app it is so maybe we could help more.
Thanks for sugestions
I use modified MPEG4IP to create files. Timescale of files is 90 000. Can I change it to lower value without lost in streaming ?no crossposting, especially not in forums where things absolutely are not belonging
striked and moved
Ah, indeed, that fits perfectly with my calculation. (2*(1024^3)/(90000*3600))=~6:38 h
Definitely set the timecode scale lower in mp4creator, depending on how much you need. To figure out how much, find (2*(1024^3)/time) where time is the length in seconds.
Originally Posted by gfilThanks for sugestions
I use modified MPEG4IP to create files. Timescale of files is 90 000. Can I change it to lower value without lost in streaming ?
Try MP4Box and let us know the results.
Originally Posted by gfilI use modified MPEG4IP to create files. Timescale of files is 90 000. Can I change it to lower value without lost in streaming ?
mp4creator offers the -timescale option which allows you to use the timescale you want
hi
I have a question to quot;foxyshadisquot;. Could You explain me this calculation's values.
quot; (2*(1024^3)/(90000*3600))=~6:38 h quot;
I don't understand exactly this rule.
for Your help
best regards
Originally Posted by gfilhi
I have a question to quot;foxyshadisquot;. Could You explain me this calculation's values.
It's down to the format of the numbers used internally by the programs. A signed int type can range from -2,147,483,648 to 2,147,483,647. 2*(1024^3) = 2,147,483,647. So you divide that by the number of timesteps and you get the maximum allowed.
[Edit]I might add that it's a bit short-sighted for developers to use ints for numbers like this. Do they really offer any real performance advantage over unsigned longs?
Saves 4 bytes per frame, which can add up, although it's only maybe two-tenths of a percent. Having to support 64-bit arithmatic on 32-bit embedded systems might be more of a reason. (I'm assuming you mean 64-bit by long.) Using signed is a rather silly, the format doesn't even use negative timestamps. (Except maybe in bizarre corner cases that supporting wouldn't outweigh using unsigned.) |