Opened 10 years ago

Closed 6 years ago

#1133 closed enhancement (invalid)

multiple edit list entries in mov

Reported by: ehsmeng Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mov edts
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,

If i transcode this file I get a rather aggressive memory leak on ffmpeg 0.10.3

Example file memleak_transcoding_audio.mov has been uploaded to upload.ffmpeg.org/incoming

ffmpeg -i memleak_transcoding_audio.mov -y -r 30 -deinterlace -ab 56k -ar 22050 -ac 1 -s 640x480 -acodec libfaac -vcodec png apa.mov

top - 21:17:31 up 63 days, 7:24, 2 users, load average: 0.77, 0.44, 0.29
Tasks: 80 total, 2 running, 78 sleeping, 0 stopped, 0 zombie
Cpu(s): 24.5%us, 0.1%sy, 0.0%ni, 66.4%id, 0.0%wa, 0.0%hi, 0.0%si, 9.0%st
Mem: 7860060k total, 2292324k used, 5567736k free, 150696k buffers
Swap: 0k total, 0k used, 0k free, 711152k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

2348 root 20 0 964m 879m 3384 R 100 11.5 3:32.70 ffmpeg

1 root 20 0 8352 700 572 S 0 0.0 1:03.36 init
2 root 20 0 0 0 0 S 0 0.0 0:00.03 kthreadd
3 root RT 0 0 0 0 S 0 0.0 0:08.92 migration/0
4 root 20 0 0 0 0 S 0 0.0 0:59.81 ksoftirqd/0
5 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
6 root RT 0 0 0 0 S 0 0.0 0:07.92 migration/1
7 root 20 0 0 0 0 S 0 0.0 1:09.40 ksoftirqd/1
8 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
9 root 20 0 0 0 0 S 0 0.0 0:53.73 events/0


(executed on an EC2 high cpu instance)

root@ip-10-101-22-134:~/t# ffmpeg -i memleak_transcoding_audio.mov
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers

built on Mar 25 2012 19:59:53 with gcc 4.4.5
configuration: --enable-gpl --enable-libmp3lame --enable-shared --enable-nonfree --enable-libx264 --enable-libfaac --enable-filter=movie --enable-libvpx --enable-pthreads --enable-libtheora --enable-libvorbis
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x11603a0] multiple edit list entries, a/v desync might occur, patch welcome
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x11603a0] max_analyze_duration 5000000 reached at 5005005
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'banan.mov':

Metadata:

major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2009-03-09 18:50:39
encoder : Lavf53.32.100

Duration: 00:40:37.07, start: 0.000000, bitrate: 35 kb/s

Stream #0:0(eng): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 64x64 [SAR 15:11 DAR 15:11], 4 kb/s, SAR 4:3 DAR 4:3, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc
Metadata:

creation_time : 2009-03-09 18:50:39
handler_name :

DataHandler

Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s
Metadata:

creation_time : 2009-03-09 18:50:39
handler_name :

DataHandler

At least one output file must be specified

Thanks,
Marcus

Change History (3)

comment:1 by Carl Eugen Hoyos, 10 years ago

Keywords: memory leak audio removed
Priority: importantnormal

For memleak-reports, valgrind output is needed.

For future bug-reports: Please always add the command line you used together with the complete, uncut output (in this case, this will be part of the valgrind output).

Is the problem also reproducible with current git head? If yes, please add the needed information for git head.

comment:2 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: mov edts added; memleak removed
Priority: normalwish
Reproduced by developer: set
Status: newopen
Summary: aggressive memory leak transcoding Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/smultiple edit list entries in mov
Type: defectenhancement
Version: 0.10git-master

Please understand that "memleak" is a clearly defined problem that you cannot reproduce with "top" (but only with valgrind or another memory checker), what you see is just increasing memory consumption.
The reason is A/V desync for the provided sample, since FFmpeg clearly warns that such problems may arise with the file, this is an enhancement wish.

comment:3 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: openclosed

The sample is "broken" but apart from ticket #4674, I don't think anything in FFmpeg can be done to improve it (except if we knew how it was created).

Note: See TracTickets for help on using tickets.