[FFmpeg-trac] #8342(undetermined:new): FFmpeg kills machine with infinitely increasing memory usage at end of PSNR calculation
FFmpeg
trac at avcodec.org
Wed Oct 30 17:04:53 EET 2019
#8342: FFmpeg kills machine with infinitely increasing memory usage at end of PSNR
calculation
-------------------------------------+-------------------------------------
Reporter: eero-t | Owner:
Type: defect | Status: new
Priority: important | Component:
| undetermined
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by eero-t):
Replying to [comment:4 eero-t]:
> How? And why FFmpeg would change the timebase for output from what's
used in the input? Only difference between them is the selected codec
(AVC vs. HEVC), doesn't HEVC support all timebases that AVC does?
>
> Btw. I just noticed that PSNR calculation complained about "-frames"
option, and if I use "-vframes" option instead, then FFmpeg behaves just
fine. Resident memory usage keeps within 0.6GB, instead of going to 8GB
and beyond. WTF?
That warning was:
{{{Applying unspecific -frames to non video streams, maybe you meant
-vframes ?}}}
Note that:
* "-frames" option isn't ignored by FFmpeg, if I make it smaller, FFmpeg
goes haywire earlier
* using "-an" option instead of "-vframes" in metrics calculation will
also make it behave sanely
So the problem seems to be related to redundant processing of audio. This
is weird because AFAIK PSNR filter handles only video data (at least it
outputs values only for YUV channels, not audio), and because
"output.h265" file doesn't have any audio track (same issue happens if
"-an" is applied only to transcoding).
Questions:
* Does "-vframes" imply "-an"? And if yes, why it's not documented?
* How audio handling can affect video frame quality calculation, and why
it explodes FFmpeg?
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8342#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list