[FFmpeg-user] vaapi: Impossible to convert between the formats
Mark Thompson
sw at jkqxz.net
Sun Jun 17 23:00:48 EEST 2018
On 13/06/18 11:29, André Hänsel wrote:
> I'm trying to transcode an MPEG4 avi to MP4 with VAAPI, but I'm getting an
> error:
>
> Impossible to convert between the formats supported by the filter
> 'Parsed_null_0' and the filter 'auto_scaler_0'
> Error reinitializing filters!
> Failed to inject frame into filter network: Function not implemented
>
> The failing command is:
> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
> -hwaccel_output_format vaapi -i test.avi -c:v h264_vaapi out.mp4
>
> Other combinations work just fine, like hardware decoding that same video:
> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i test.avi -c:v
> libx264 out.mp4
>
> Hardware transcoding an MPEG2 input video works fine as well:
> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
> -hwaccel_output_format vaapi -i test.mpg -c:v h264_vaapi out.mp4
>
> Hardware transcoding an H264 video works, too:
> ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
> -hwaccel_output_format vaapi -i test.mp4 -c:v h264_vaapi out.mp4
>
> How should I go about debugging this further?
Intel devices do not support MPEG-4 part 2 at all. If you are using the Mesa driver on an AMD device, some MPEG-4 part 2 streams may be supported if you set the environment variable VAAPI_MPEG4_ENABLED to 1, but it's not enabled by default because the implementation is incomplete due to API constraints.
For encoding of streams which may be decoded in hardware or software (but you don't know in advance), see <https://trac.ffmpeg.org/wiki/Hardware/VAAPI#Encoding> - in particular, something like the third example command in that section is probably what you want.
- Mark
More information about the ffmpeg-user
mailing list