View Full Version : MPEG4 files maximum duration
gfil
7th December 2005, 08:53
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 ?
:thanks: for help
best regards
Grzesiek
SenorKaffee
7th December 2005, 09:31
Maybe itīs a file size problem? When you are on Windows NT, make sure you use NTFS.
gfil
7th December 2005, 09:41
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: "Error -2014: the movie contains an incorect duration")
:thanks: for help
charleski
7th December 2005, 10:54
Are these files over 4Gb in size? If so, the problem may lie with the number format used within the player itself.
gfil
7th December 2005, 11:30
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
foxyshadis
7th December 2005, 14:12
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.
gfil
7th December 2005, 14:22
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 ?
:thanks:
bond
7th December 2005, 19:30
no crossposting, especially not in forums where things absolutely are not belonging
striked and moved
foxyshadis
7th December 2005, 23:09
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.
Elias
8th December 2005, 00:03
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 ?Try MP4Box and let us know the results.
bond
8th December 2005, 15:00
I 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
gfil
8th December 2005, 22:08
hi
I have a question to "foxyshadis". Could You explain me this calculation's values.
" (2*(1024^3)/(90000*3600))=~6:38 h "
I don't understand exactly this rule.
:thanks: for Your help ;)
best regards
charleski
8th December 2005, 22:55
hi
I have a question to "foxyshadis". 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?
foxyshadis
9th December 2005, 01:00
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.)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.