Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7259 closed defect (duplicate)

Failed to inject frame into filter network: Out of memory when video has metadata "rotate : 90"

Reported by: bolds Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I built ffmpeg for android, it's working fine for some videos, but it crashes on high bitrate h264 videos with rotate tag.

First let me detail the enviroment:

1- the script i used to build ffmpeg can be found at https://github.com/bolds07/ffmpeg-for-android-for-dummies/blob/master/builder.sh
2 - im testing on android emulator and also in my real phone (i686 and arm64v8-a)
3 - the command i'm running is a simple encoding command like:
ffmpeg -y -i file.mp4 -c:v libx264 -crf 30 -c:a copy output.mp4
3a - I also tried to use mpeg4 and other encoders to replace libx264 but the same problem occurs
4 - all videos h264 i've with bitrate until 6.000 kbps work fine
5 - videos with bitrate 12.000kbps without the rotate metadata work fine
7 - I've tested big videos (200MB) with 5000kbps and they work fine (if the video hasn't the metadata rotate)
8 - I've tested small videos (15MB) with 12000kbps and they don't work (if it has)

I re-run tha command with the parameters -v 9 -loglevel 99 and pasted the result at:
https://pastebin.com/ihawsPvZ

I will set two video samples for anyone test, one which works and one which doesn't (the only difference i see is the metadata but i might be wrong)

https://www.dropbox.com/s/pdimy5rj8lnbn56/work.mp4?dl=1
https://www.dropbox.com/s/0tpkrgdm02qzj3s/crash.mp4?dl=1

Change History (2)

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegundetermined
Resolution: duplicate
Status: newclosed

Duplicate of #7001.
Since this ticket is incomplete, please continue the discussion there (or on the user mailing list).

comment:2 by bolds, 6 years ago

why do you mean by incomplete? i put all the necessary information to replicate the problem on the ticket or are you too lazy to click on the links and you need I copy paste them into the message?

seams that ffmpeg team is a "close ticked driven company" as you keep closing the tickets without any decent explanation and even a try to reproduce the problem...

at #7001 you told to use -noautorotate and it worked for me, but this workaround isn't enough since it generate many other problems.

i'm sucessfully encoded the same video with transpose=1 at same device (I ran another program to wipe the rotate matadata) so unless you tell me the memory needed to transpose a video while decoding is 3 or 4 times more than the memory needed to transpose it while encoding we still have a bug!

Im running ffmpeg in a device with 3GB of ram and the SO provides 150MB to my process, so far i'm only running tests, so my process never gets over 20MB of memory and ffmpeg crashes...

Note: See TracTickets for help on using tickets.