Opened 7 years ago

Closed 7 years ago

#6513 closed defect (fixed)

FFmpeg VAAPI hwaccel decode -> hwupload/hwdownload -> x264 will block

Reported by: Jun Zhao Owned by:
Priority: important Component: avfilter
Version: git-master Keywords:
Cc: sw@jkqxz.net Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i input.mp4 -vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720:format=yuv420p,hwdownload' -c:v libx264 output.mp4
ffmpeg version : master branch (f1baafa)

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (3)

comment:1 by jkqxz, 7 years ago

I've seen this too a few times - seems to be something in libavfilter to do with format negotiation around the hw* filters, but I've never pursued it beyond that. You can work around it by specifying the formats explicitly (i.e. add 'format=yuv420p' to the end of your filter graph).

comment:2 by Jun Zhao, 7 years ago

The work around is working, tks, Mark. BTW: libav is ok in this case.

comment:3 by jkqxz, 7 years ago

Resolution: fixed
Status: newclosed

The hang is fixed by 8a442d7a8a687a469ca502a18a0c68f5302b15e0. The command line above works sensibly with that, but there are still cases where additional format filters are necessary to stop it making bad choices (though they do at least fail immediately now rather than hanging).

Note: See TracTickets for help on using tickets.