[FFmpeg-user] Creating video with xfade takes 27 GB of memory

Cecil Westerhof Cecil at decebal.nl
Sun May 28 13:20:25 EEST 2023


Reindl Harald <h.reindl at thelounge.net> writes:

> Am 25.05.23 um 08:16 schrieb Cecil Westerhof via ffmpeg-user:
>> Paul B Mahol <onemda at gmail.com> writes:
>> 
>>> Use master FFmpeg version, where memory requirements for this filter
>>> have been drastically reduced.
>> I installed the version from here:
>>      https://johnvansickle.com/ffmpeg/
>
> git master: built on 20230313
> we have 20230525
>
>> Or should I be trying (I am on Debian):
>> https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
>
> that's the point of "use master"

That makes it even worse. Then I get:
    [vost#0:0/libx264 @ 0x565136728c00] Too many packets buffered for output stream 0:0.
    [vost#0:0/libx264 @ 0x565136728c00] Error submitting a packet to the muxer
    [vost#0:0/libx264 @ 0x565136728c00] Too many packets buffered for output stream 0:0.
    [vost#0:0/libx264 @ 0x565136728c00] Error submitting a packet to the muxer

and it seems to go on forever.

I also found it a bit strange, because I do it with a lot of different
videos and only one went wrong.

It seems I have found a bug in ffmpeg.
For the first input-file I used:
    -ss 48 -t 4

But when looking in the log I see:
    Input #0, matroska,webm, from 'langeLijn1c.mkv':
      Metadata:
        ENCODER         : Lavf60.3.100
      Duration: 00:00:52.05, start: 0.000000, bitrate: 20470 kb/s
      Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn
        Metadata:
          DURATION        : 00:00:52.047000000
      Stream #0:1: Audio: mp3, 48000 Hz, stereo, fltp, 117 kb/s
        Metadata:
          DURATION        : 00:00:51.768000000

So the video is long enough, but the audio is to short.
Personally I would say that instead of going berserk when the input is
to short an error should be generated.
When changing the timing to:
    -ss 47 -t 4

Everything went fine.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list