[FFmpeg-user] Error: Impossible to convert between the formats...(Nvidia codecs)

DEF shaker.doc at gmail.com
Sat Jul 9 12:44:39 EEST 2022


On Sat, 9 Jul 2022 at 08:25, Ben Parham <behfarteam at gmail.com> wrote:
>
> Hello,
>
> I try to use Nvidia codecs in live transcoding. The input stream is from an
> IP camera (Hikvision) and its color format is "*yuvj420p*". My command is:
>
> ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -rtsp_transport tcp
> -i "rtsp://admin:Pass1@192.168.1.1" -flags +low_delay -vcodec hevc_nvenc
> -s 1920x1080 -preset p2 -pix_fmt yuv420p -tune hq -rc vbr -vb 700k -maxrate
> 800k -minrate 200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags
> +global_header -f rtsp "rtsp://localhost:8000/stream"

Check out documenation at
https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/

Use -vsync 0 option with decode to prevent FFmpeg from creating output
YUV with duplicate and extra frames.
This seems to be the commonest runtime issue.

Try
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda
rtsp_transport tcp -i "rtsp://admin:Pass1@192.168.1.1" -flags
+low_delay -vcodec hevc_nvenc -vf scale_cuda=1920:1080 -preset p2
-pix_fmt yuv420p -tune hq -rc vbr -vb 700k -maxrate  800k -minrate
200k -bufsize 800k -g 25 -acodec copy -strict -2 -flags +global_header
-f rtsp "rtsp://localhost:8000/stream"


Def


>
> but I am faced with this error:
> Impossible to convert between the formats supported by the filter
> 'Parsed_null_0' and the filter 'auto_scale_0'
> Error reinitializing filters!
> Failed to inject frame into filter network: Function not implemented
> Error while processing the decoded data for stream #0:0
> Conversion failed!
>
> if I remove  "-hwaccel_output_format cuda", the transcoding starts, but the
> decoded stream is sent to system memory. I prefer to keep it in GPU
> memory to decrease the latency.
> What should I do to fix this?
> I would appreciate any help.
>
> Regards,
> Ben.


More information about the ffmpeg-user mailing list