Memory allocation problems with 2.0.x

Locked
akov
User
Posts: 1
Joined: Thu Mar 25, 2010 1:40 pm
Are you a spambot?: no

Memory allocation problems with 2.0.x

Post by akov » Fri Mar 26, 2010 11:57 am

Hi,

I am new to getid3 forums, so please don't take it seriously if I am not doing something due to your practice.

I am currently working with 2.0.0b5 and I experience several file parsing problems.

I. Memory allocation problem with F4V and MP4 file types:

F4V file, size = 1.2GB

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20 bytes) in /home/conv/getid3/getid3/getid3.php on line 1442

ffmpeg -i gives:

Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../../nfs/files/uploaded/sze-rozsa.f4v':
Metadata:
major_brand : f4v
minor_version : 0
compatible_brands: isommp42m4v
Duration: 01:10:36.62, start: 0.000000, bitrate: 2315 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2113 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 192 kb/s
Stream #0.2(eng): Data: amf0 / 0x30666D61

MP4 file, size = 1.3GB

ffmpeg -i gives:

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../../nfs/files/uploaded/sze-rozsa.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41
Duration: 01:10:36.60, start: 0.000000, bitrate: 2465 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 720x576 [PAR 768:702 DAR 160:117], 2271 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 189 kb/s

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 532012882 bytes) in /home/conv/getid3/getid3/module.audio-video.quicktime.php on line 133

II. M4V realted problems:

getid3() v1.7.x give similar faults with M4V files, but this beta fixed it now (thanks!).

Although, I experience some problems with these files:
1. Video array does not contain bandwidth at all:

[video] => Array
(
[resolution_x] => 960
[resolution_y] => 540
[frame_rate] => 29.97
[dataformat] => quicktime
)

2. Same goes with audio array

3. Some sub-sub-sub... array of moov chunk contains some extreme sized crap:

[moov] => Array
(
[hierarchy] => moov
[name] => moov
[size] => 2146196
[offset] => 32
[subatoms] => Array
(
....

[2] => Array
(
[hierarchy] => moov trak mdia minf stbl ctts
[name] => ctts
[size] => 731904
[offset] => 632
[data] => ^@

Size is around 800KB for this single field!

III. FLV related problem:

Under meta chunk, I can see a lots of crap, that is seeminly fallen apart:

[meta] => Array
(
[onMetaData] => Array
(
[hasKeyframes] => 1
[hasMetadata] => 1
[duration] => 615.16
[cuePoints] => Array
(
[0] => 1.3727197784276E-234
)
[lerate^@@<E5>|^@^@^@^@^@^@^Maudiodatarate^@@P^T^F<94>6<85><D4>^@^Hdatasize^@A<89>^R?^@^@^@^@ framerate^@@9^@^@^@^@^@^@^@^HhasVideo
^A^A^@^Oaudiosamplesize^@@0^@^@^@^@^@^@^@^Fstereo^A^A^@^LcanSeekToEnd^A^A^@^Lvideocodecid^@@^P^@^@^@^@^@^@^@^Mlasttimestamp^@@<83>8<F5><U+008F>\)^@^Ulastkeyf
rametimestamp^@@<83>8<F5><U+008F>\)^@ audiosize^@AS<DA>^Y@^@^@^@^@^HhasAudio^A^A^@
audiodelay^@^@^@^@^@^@^@^@^@^@ videosize^ ...]

This seems like something very nasty is used as an array index!

ffmpeg -i output:

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from '../../nfs/files/uploaded/1205_800K.flv':
Metadata:
hasKeyframes : true
hasMetadata : true
duration : 615
audiosamplerate : 44000
audiodatarate : 64
datasize : 52582962
framerate : 25
hasVideo : true
audiosamplesize : 16
stereo : true
canSeekToEnd : true
videocodecid : 4
lasttimestamp : 615
lastkeyframetimestamp: 615
audiosize : 5204069
hasAudio : true
audiodelay : 0
videosize : 47375755
height : 480
filesize : 52738699
metadatacreator : inlet media FLVTool2 v1.0.6 - http://www.inlet-media.de/flvtool2
audiocodecid : 2
videodatarate : 614
hasCuePoints : false
width : 592
Duration: 00:10:15.15, start: 0.000000, bitrate: 692 kb/s
Stream #0.0: Video: vp6f, yuv420p, 592x480, 628 kb/s, 25 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 64 kb/s

Thanks for your help in advance.

Andras

Locked