Discussion:
[FFmpeg-user] Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Garri Djavadyan
2018-02-13 17:25:08 UTC
Permalink
Hello FFmpeg community,


Recently, I faced transcoding issues with fully hardware nvdec/nvenc
scheme. Particularly, my FFmpeg feed fails with the following error
after 30-60 minutes of live transcoding:

---
[h264_cuvid @ 0x556e21e67e00] Initializing cuvid hwaccel
[h264_cuvid @ 0x556e21e67e00] Initializing CUDA frames context:
sw_format = nv12, width = 720, height = 576
[h264_cuvid @ 0x556e21e67e00] Format cuda chosen by get_format().
[h264_cuvid @ 0x556e21e67e00] Formats: Original: cuda | HW: cuda | SW:
nv12
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'video_size'
to value '720x576'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'pix_fmt' to
value '119'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'time_base' to
value '1/90000'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'pixel_aspect'
to value '16/11'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'sws_param' to
value 'flags=2'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] Setting 'frame_rate'
to value '25/1'
[graph 0 input from stream 0:16 @ 0x556e28bcd500] w:720 h:576
pixfmt:cuda tb:1/90000 fr:25/1 sar:16/11 sws_param:flags=2
[scaler_out_0_0 @ 0x556e280d4380] Setting 'w' to value '720'
[scaler_out_0_0 @ 0x556e280d4380] Setting 'h' to value '576'
[scaler_out_0_0 @ 0x556e280d4380] Setting 'flags' to value 'bicubic'
[scaler_out_0_0 @ 0x556e280d4380] w:720 h:576 flags:'bicubic' interl:0
[format @ 0x556e23b23600] Setting 'pix_fmts' to value 'cuda'
[auto_scaler_0 @ 0x556e2596efc0] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x556e2596efc0] w:iw h:ih flags:'bicubic' interl:0
[scaler_out_0_0 @ 0x556e280d4380] auto-inserting filter 'auto_scaler_0'
between the filter 'Parsed_null_0' and the filter 'scaler_out_0_0'
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:16
[AVIOContext @ 0x556e21e02e40] Statistics: 0 seeks, 9266 writeouts
[h264_nvenc @ 0x556e21e69cc0] Nvenc unloaded
[libfdk_aac @ 0x556e21e3abc0] 2 frames left in the queue on closing
[AVIOContext @ 0x556e21da2d80] Statistics: 1869799120 bytes read, 0
seeks
Conversion failed!
---


As I understand, some parameters change after 30-60 minutes in video
stream and FFmpeg tries to use software scaler in fully hardware scheme.
But I can't figure out exact reasons to act against the problem. I will
be very grateful if someone could direct me. I use following cmd line:

---
/usr/local/ffmpeg/bin/ffmpeg -analyzeduration 100M -probesize 100M
-loglevel debug -hwaccel_device 1 -hwaccel cuvid -c:v h264_cuvid -deint
2 -drop_second_field 1 -i
udp://224.4.4.13:1013?fifo_size=250000&overrun_nonfatal=1 -map p:1011:0
-map p:1011:1 -c:v h264_nvenc -profile:v high -level 4.1 -b:v 2048k -c:a
libfdk_aac -b:a 128k -af aresample=async=1000 -f mpegts
http://192.168.0.10/15/mpegts
---


Many thanks in advance!

Garri
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpe
James Girotti
2018-02-13 18:56:17 UTC
Permalink
Post by Garri Djavadyan
Recently, I faced transcoding issues with fully hardware nvdec/nvenc
scheme. Particularly, my FFmpeg feed fails with the following error after
I have recently encountered this as well, but with DVD video material.
Post by Garri Djavadyan
As I understand, some parameters change after 30-60 minutes in video
stream and FFmpeg tries to use software scaler in fully hardware scheme.
But I can't figure out exact reasons to act against the problem. I will be
---
/usr/local/ffmpeg/bin/ffmpeg -analyzeduration 100M -probesize 100M
-loglevel debug -hwaccel_device 1 -hwaccel cuvid -c:v h264_cuvid -deint 2
-drop_second_field 1 -i udp://224.4.4.13:1013?fifo_siz
e=250000&overrun_nonfatal=1 -map p:1011:0 -map p:1011:1 -c:v h264_nvenc
-profile:v high -level 4.1 -b:v 2048k -c:a libfdk_aac -b:a 128k -af
aresample=async=1000 -f mpegts http://192.168.0.10/15/mpegts
The solution I used was to drop the all the "hwaccel" parameters, still
using hw-decoding and encoding. This does impact performance, but it
ensures that if the stream contains material of a different pixel format
that the sws can correct it and transcoding will continue.

I'm not sure if this is a regression in ffmpeg/nvidia or just bad video
material. I hadn't ever run into this until about a month ago. And it's
happened on several videos from different DVD's. I didn't dig into it, I
just dropped the hwaccel parameters and moved on with my life. I wonder if
it's actually a problem in the hw-decoder, but I didn't see any error
messages to prove that.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffm
Garri Djavadyan
2018-02-14 21:58:48 UTC
Permalink
Post by James Girotti
Post by Garri Djavadyan
Recently, I faced transcoding issues with fully hardware nvdec/nvenc
scheme. Particularly, my FFmpeg feed fails with the following error after
I have recently encountered this as well, but with DVD video material.
Post by Garri Djavadyan
As I understand, some parameters change after 30-60 minutes in video
stream and FFmpeg tries to use software scaler in fully hardware scheme.
But I can't figure out exact reasons to act against the problem. I will be
---
/usr/local/ffmpeg/bin/ffmpeg -analyzeduration 100M -probesize 100M
-loglevel debug -hwaccel_device 1 -hwaccel cuvid -c:v h264_cuvid -deint 2
-drop_second_field 1 -i udp://224.4.4.13:1013?fifo_siz
e=250000&overrun_nonfatal=1 -map p:1011:0 -map p:1011:1 -c:v
h264_nvenc
-profile:v high -level 4.1 -b:v 2048k -c:a libfdk_aac -b:a 128k -af
aresample=async=1000 -f mpegts http://192.168.0.10/15/mpegts
The solution I used was to drop the all the "hwaccel" parameters, still
using hw-decoding and encoding. This does impact performance, but it
ensures that if the stream contains material of a different pixel format
that the sws can correct it and transcoding will continue.
James, thank you very much for the advise. I've solved the issue using
partially hardware transcoding (h264_cuvid -> system memory ->
h264_nvenc), so the cmd line now is:

---
/usr/local/ffmpeg/bin/ffmpeg -analyzeduration 100M -probesize 100M
-loglevel debug -c:v h264_cuvid -deint 2 -drop_second_field 1 -gpu 1 -i
udp://224.4.4.13:1013?fifo_size=250000&overrun_nonfatal=1 -map p:1011:0
-map p:1011:1 -c:v h264_nvenc -gpu 1 -profile:v high -level 4.1 -b:v
2048k -c:a libfdk_aac -b:a 128k -af aresample=async=1000 -f mpegts
http://192.168.0.10/15/mpegts
---
Post by James Girotti
I'm not sure if this is a regression in ffmpeg/nvidia or just bad video
material. I hadn't ever run into this until about a month ago. And it's
happened on several videos from different DVD's. I didn't dig into it, I
just dropped the hwaccel parameters and moved on with my life. I wonder if
it's actually a problem in the hw-decoder, but I didn't see any error
messages to prove that.
After migration to partially hardware transcoding, I don't see any calls
for sws in debug log any more, but the following periodical messages
from h264_cuvid:

[h264_cuvid @ 0x5616844a6c00] Format nv12 chosen by get_format().
[h264_cuvid @ 0x5616844a6c00] Formats: Original: nv12 | HW: nv12 | SW:
nv12


I noticed that aspect ratio of TV programs changes over the time
(visually) on the problem stream, but the actual SAR/DAR never changes
(inspected by ffprobe periodically).


Garri
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.

Loading...