[FFmpeg-user] Intel QSV Transcoding Stops on Resolution Change

Oliver Fromme oliver at fromme.com
Sat Aug 31 16:09:03 EEST 2024


Shane Warren wrote:
 > I am transcoding live video using intel flex 140 cards, and the video mostly stays one resolution/framerate but sometimes ads come in that are in different resolutions, and that either crashes ffmpeg (in libmfx) or stops ffmpeg.
 > 
 > For example, an input stream starts out at 1280x720p at 60 then eventually changes 1920x1080i at 30 and then back to 1280x720p at 60.
 > 
 > I've tried using many ways to make FFmpeg survive the resolution change:
 > - software decoding, then vpp_qsv (for deinterlacing and scaling), then h264_qsv... this crashes inside libmfx if a resolution change happens
 > - hardware decoding using vaapi, then hwmap=derive_device=qsv, then vpp_qsv (for deinterlacing and scaling), then h264_qsv this just stops with this message:

I have no experience with Intel Flex 140, but apparently the QSV code
seems to be unable to handle resolution changes.

You might try to use the standard software scaler as the very first
filter (i.e. ``-vf scale=1280:720'' or similar), and only then feed
the stream to the QSV code.

The change from p at 60 to i at 30 might be a problem, too.  In that case,
you'll need another filter for deinterlacing and keeping the frame
rate, like ``yadif=mode=send_field:deint=interlaced'' or similar.
That might require a bit of experimenting.

Best regards
 -- Oliver


More information about the ffmpeg-user mailing list