[FFmpeg-user] Out of virtual memory (swap, I assume)

Mark Filipak (ffmpeg) markfilipak at bog.us
Tue Feb 2 20:19:23 EET 2021


Windows 10-1803
Memory: 32GB
Virtual memory: 128GB on an SSD-RAID0.

No other applications running.

ffmpeg -i "THE LAST EMPEROR [1987] source part5.mkv" -map 0 -filter_complex 
"minterpolate=fps=48000/1001:mi_mode=mci:mc_mode=obmc:scd=fdiff:scd_threshold=10:vsbmc=1:search_param=32, 
telecine=pattern=3322,pp=linblenddeint, setpts=N*1001/60000/TB" -codec:v libx265 -x265-params 
"crf=20:qcomp=0.60" -codec:a copy -codec:s copy "THE LAST EMPEROR [1987] part5.mkv"

As the transcode proceeds, I watch the virtual memory commit climb steadily.
As the transcode proceeds, I watch the memory allocation top out and then hover there.
I went to bed, but I assume that when the virtual memory commit tops out, ffmpeg reports the 
following error:
"Error while filtering: Cannot allocate memory
"Failed to inject frame into filter network: Cannot allocate memory
"Error while processing the decoded data for stream #0:0
"Conversion failed!"

There's something about 'source part5.mkv' that causes the fault, but I'll be damned if I can find it.

I tried the part 5 transcode 3 times:
1, While concurrently transcoding parts 1-4 (which all succeeded), and
2, On its own, and finally
3, I again extracted part 5 via MKVToolNIX, and transcoded again.
That last time I made sure that 'source part5.mkv' played correctly (with correct running times in 
MPV) and with monotonically increasing timestamps before transcoding for the 3rd time.

I took 4 pertinent files, renamed them, zipped them as part5.zip   ...6,138,036,350 bytes.
Inside part5.zip is:
[part5.zip]\source part5.mkv   ...6,150,347,006 bytes
[part5.zip]\source part5.mkv timestamps.txt   ...5,095,698 bytes
[part5.zip]\part5.mkv failure #3.log   ...3,372,428 bytes
[part5.zip]\part5.mkv timestamps.txt   ...3,114,801 bytes

*** Well, dropbox seems to be malfunctioning. Can you suggest an alternative? ***

Any/all ideas regarding how I can successfully transcode part 5 will be much appreciated even if 
it/they fail.

Thanks and Good Health. Regards,
Mark.


More information about the ffmpeg-user mailing list