Opened 10 years ago

Closed 10 years ago

#3504 closed defect (needs_more_info)

Memory allocation error when coding very long files using libx264

Reported by: kislovskij Owned by:
Priority: important Component: undetermined
Version: 2.1.4 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When coding an around 260 hours long video using libx264, I am experiencing a memory allocation error although I have memory left.

Also I tried to "purge" the memory every minute while coding the video, but still no success.

Expected total frames: 23185800
Frames until error: 21911761

Verbose log output:

[...]
[AVIOContext @ 0x7fc87a100560] Statistics: 108445 bytes read, 0 seeks
[libx264 @ 0x7fc87984b600] frame=21911761 QP=0.00 NAL=2 Slice:P Poc:1161650 I:0    P:0    SKIP:3600 size=11 bytes
av_interleaved_write_frame(): Cannot allocate memory
[AVIOContext @ 0x7fc879425540] Statistics: 0 seeks, 55465203 writeouts
[AVIOContext @ 0x7fc87940ed40] Statistics: 3505979392 bytes read, 0 seeks

How to reproduce:

% ffmpeg -f image2 -loop 1 -i keyvisual_video.png -strict experimental -i test-audio.mp3 -r 25 -vcodec libx264 -preset ultrafast -tune stillimage -acodec copy testoutput.mp4
ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 19 2014 11:41:50 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.1.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libass --enable-libfdk-aac --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100

Change History (7)

comment:1 by Carl Eugen Hoyos, 10 years ago

Do you think this a regression?
Please test current FFmpeg git head.

comment:2 by Carl Eugen Hoyos, 10 years ago

And to make this a valid ticket, please provide either the complete, uncut console output of your failing command or at least the first 50 and last 50 lines.

in reply to:  2 comment:3 by kislovskij, 10 years ago

Replying to cehoyos:

And to make this a valid ticket, please provide either the complete, uncut console output of your failing command or at least the first 50 and last 50 lines.

Ok, I will use the dev branch and post more console output. It takes around 20 hours to reproduce the error. I will write as soon as it is finished.

comment:4 by Carl Eugen Hoyos, 10 years ago

Did you try reducing the resolution (significantly)?

comment:5 by Carl Eugen Hoyos, 10 years ago

Using rawvideo as input may also increase transcoding speed.

comment:6 by Carl Eugen Hoyos, 10 years ago

Any news on this issue? You neither provided the input files nor the console output, so I am not sure how to test this myself.

comment:7 by Michael Niedermayer, 10 years ago

Resolution: needs_more_info
Status: newclosed
Note: See TracTickets for help on using tickets.