Opened 4 years ago

Closed 4 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 Changed 4 years ago by cehoyos

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

comment:2 follow-up: Changed 4 years ago by 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.

comment:3 in reply to: ↑ 2 Changed 4 years ago by kislovskij

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 Changed 4 years ago by cehoyos

Did you try reducing the resolution (significantly)?

comment:5 Changed 4 years ago by cehoyos

Using rawvideo as input may also increase transcoding speed.

comment:6 Changed 4 years ago by cehoyos

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 Changed 4 years ago by michael

  • Resolution set to needs_more_info
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.