[FFmpeg-user] Error:Impossible to convert between the formats supported by the filter..

James Girotti james.girotti at gmail.com
Tue Jul 25 00:11:17 EEST 2017

On Mon, Jul 24, 2017 at 11:15 AM, tasos <tasoss at trigonongroup.com> wrote:

> Hello.
> I'm using
>> ffmpeg -y  -c:v h264_cuvid -deint 1 -vsync 1 -timeout 999999 -i foo \
>> -map 0:v -c:v h264_nvenc -preset slow -profile:v high -b:v 1300k -pix_fmt
>> yuv420p -map 0:a -c:a libfdk_aac \
>> -ac 2 -b:a 64k -strict experimental -f mpegts foobar
> and everything works fine.
> When i add -hwaccel cuvid
> ffmpeg -y -hwaccel cuvid     -c:v h264_cuvid ...... the same as above
> I get
>> 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
>> Error while processing the decoded data for stream #0:4
I have run into the same many times trying to do stuff with nvenc and
hwaccel. You're trying to apply a software filter, but you're telling
ffmpeg to do everything in hardware (-hwaccel), so it cannot apply the
filter hence the error. Doesn't matter though, as from what I can tell
nvenc will not change pixel formats for you. Your source is yuv420p, output
will be yuv420p. If you want to change output pixel format to yuv444p, you
could do something like:

ffmpeg -hwaccel cuvid -c:v h264_cuvid -i foo -c:v h264_nvenc -preset slow
-profile:v high444p \
-vf "hwdownload,format=nv12,format=yuv444p,hwupload_cuda" -an -f mpegts

This would do the pixel format conversion in software (you could do the
same for any software filter you might want to use). Nvenc then outputs in
yuv444p pixel format.

Of course if you convert to anything but yuv420p, then decoding with cuvid
will not work because only yuv420p is supported in hardware.


More information about the ffmpeg-user mailing list