0

I'm using Plex as my DVR and I have a process that uses ffmpeg to convert the recordings to a standard format and reduces the size. I've recently been getting 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
[aac @ 0x55b1c3edd7c0] Qavg: 388.931
[aac @ 0x55b1c3edd7c0] 2 frames left in the queue on closing
Conversion failed!

Here is the command it's using:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /media/video.ts -max_muxing_queue_size 8000 -map 0:0 -c:v:0 hevc_vaapi -vf fps=25,scale_vaapi=format=p010 -b:v 4147200 -map 0:1 -c:a:0 aac -b:a 384000 -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=2021-12-23T23:57:44.168Z -map_chapters 0 /temp/video-IYU7Rix9M.mkv

I have a solid machine with an i7 9th generation processor, 32GB of RAM, and plenty of storage.

Edit: Adding additional info, is there anything else that will help?

Video file is: .ts Codec is: mpeg2video Filesize: 1-3GB

Plex removes commercials before I process them to shrink/standardize them.

2
  • Check the following post: Error while filtering: Cannot allocate memory - FFMPEG Commented Dec 25, 2021 at 9:02
  • @Jackdaw thank you! I saw that before but didn't think it applied to my situation. I re-reviewed it and they were saying it was something with the video filter settings. So i tried messing with my command. Removing the fps=25 (resetting the frame rate) resolved the issue and lets me process the file. Commented Feb 15, 2022 at 19:45

1 Answer 1

1

Thanks to user @Jackdaw I found that it was the part of the ffmpeg command that was reducing the framerate to 25. I modified my command to remove the fps=25 and it works now.

The command to process them successfully is:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /media/video.ts -max_muxing_queue_size 8000 -map 0:0 -c:v:0 hevc_vaapi -vf scale_vaapi=format=p010 -b:v 4147200 -map 0:1 -c:a:0 aac -b:a 384000 -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=2021-12-23T23:57:44.168Z -map_chapters 0 /temp/video-IYU7Rix9M.mkv

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.