using YADIF_CUDA - how to fix error "Impossible to convert between the formats supported by the filter"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using YADIF_CUDA - how to fix error "Impossible to convert between the formats supported by the filter"

hydra3333
Hello, seeking help to use the newly updated FFMPEG filter YADIF_CUDA.  

I keep getting error  "Impossible to convert between the formats supported
by the filter 'graph 0 input from stream 0:0' and the filter
'auto_scaler_0'"

I'm obviously doing something wrong in (not?) converting between formats in
the second commandline, but I don't know what to do to fix it.

Example 1 works, using NVDEC as source input filter.
Example 2 fails, using vanilla ffmpeg mpeg2 source input filter.

Can anyone please clarify and how to fix the issue ?

1. ----------------------------------------------------
"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel verbose -stats
-hwaccel nvdec -hwaccel_output_format cuda -i ".\1.7TWO.mpg" -t 05 -vf
yadif_cuda=0:-1:0 -c:v h264_nvenc -preset lossless -f mp4 -y
".\1.7TWO.aac.yadif_cuda.works.mp4"
ffmpeg version N-93276-g3b23eb283a-test Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 8.3.0 (GCC)
  configuration: --arch=x86_64 --target-os=mingw32
--cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config
--disable-w32threads --enable-pthreads --enable-cross-compile --enable-pic
--enable-libsoxr --enable-libass --enable-iconv --enable-libtwolame
--enable-libzvbi --enable-libcaca --enable-libmodplug --enable-cuvid
--enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libgsm
--enable-libopus --enable-bzlib --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvpx
--enable-libilbc --enable-libwavpack --enable-libwebp --enable-dxva2
--disable-avisynth --enable-vapoursynth --enable-gray --enable-libmysofa
--enable-libflite --enable-lzma --enable-libsnappy --enable-libzimg
--enable-libx264 --enable-libx265 --enable-libaom --enable-libdav1d
--enable-frei0r --enable-filter=frei0r --enable-librubberband
--enable-libvidstab --enable-libxvid --enable-libgme
--enable-runtime-cpudetect --enable-libfribidi --enable-gnutls --enable-gmp
--enable-fontconfig --enable-libfontconfig --enable-libfreetype
--enable-libbluray --enable-libcdio --enable-libmfx --disable-schannel
--enable-ladspa --enable-libxml2 --enable-libdavs2 --enable-libopenmpt
--enable-libxavs --enable-libxavs2 --enable-libmfx --enable-amf
--enable-ffnvcodec --enable-cuvid --enable-opengl --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-gpl
--extra-version='test _of_DeadSix27/python_cross_compile_script'
--enable-avresample --pkg-config-flags=--static --extra-libs='-lintl
-liconv' --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC
--enable-libbluray
--prefix=/home/u/Desktop/workdir/x86_64_products/ffmpeg_static_non_free_open
cl.installed --disable-shared --enable-static --enable-cuda-nvcc
--enable-nonfree --enable-opencl --enable-nonfree --enable-libfdk-aac
--enable-decklink --extra-cflags=-DLIBXML_STATIC
--extra-cflags=-DGLIB_STATIC_COMPILATION
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.102 / 58. 47.102
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[mpeg @ 000002199435b3c0] max_analyze_duration 5000000 reached at 5000000
microseconds st:0
Input #0, mpeg, from '.\1.7TWO.mpg':
  Duration: 01:24:11.57, start: 0.229856, bitrate: 3129 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), 1 reference frame,
yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr,
90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
[mpeg2video @ 000002199436d380] NVDEC capabilities:
[mpeg2video @ 000002199436d380] format supported: yes, max_mb_count: 65280
[mpeg2video @ 000002199436d380] min_width: 48, max_width: 4080
[mpeg2video @ 000002199436d380] min_height: 16, max_height: 4080
[graph 0 input from stream 0:0 @ 000002199486ffc0] w:720 h:576 pixfmt:cuda
tb:1/90000 fr:25/1 sar:64/45 sws_param:flags=2
[h264_nvenc @ 00000219943cf680] Loaded Nvenc version 9.0
[h264_nvenc @ 00000219943cf680] Nvenc initialized successfully
[graph_1_in_0_1 @ 00000219943b3f00] tb:1/48000 samplefmt:s16p
samplerate:48000 chlayout:0x3
[format_out_0_1 @ 00000219943b4800] auto-inserting filter 'auto_resampler_0'
between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 00000219943b3800] ch:2 chl:stereo fmt:s16p r:48000Hz ->
ch:2 chl:stereo fmt:fltp r:48000Hz
Output #0, mp4, to '.\1.7TWO.aac.yadif_cuda.works.mp4':
  Metadata:
    encoder         : Lavf58.26.101
    Stream #0:0: Video: h264 (h264_nvenc), 1 reference frame (avc1 /
0x31637661), cuda(progressive, left), 720x576 [SAR 64:45 DAR 16:9], q=-1--1,
2000 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.47.102 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay:
-1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, delay 1024, 128 kb/s
    Metadata:
      encoder         : Lavc58.47.102 aac
No more output streams to write to, finishing.
frame=  125 fps=0.0 q=-1.0 Lsize=   13331kB time=00:00:05.01
bitrate=21783.7kbits/s speed=16.7x    
video:13249kB audio:78kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.030828%
Input file #0 (.\1.7TWO.mpg):
  Input stream #0:0 (video): 128 packets read (1379392 bytes); 128 frames
decoded;
  Input stream #0:1 (audio): 210 packets read (120960 bytes); 210 frames
decoded (241920 samples);
  Total: 338 packets (1500352 bytes) demuxed
Output file #0 (.\1.7TWO.aac.yadif_cuda.works.mp4):
  Output stream #0:0 (video): 125 frames encoded; 125 packets muxed
(13566744 bytes);
  Output stream #0:1 (audio): 235 frames encoded (240000 samples); 236
packets muxed (80158 bytes);
  Total: 361 packets (13646902 bytes) muxed
[AVIOContext @ 000002199435d200] Statistics: 2 seeks, 56 writeouts
[h264_nvenc @ 00000219943cf680] Nvenc unloaded
[aac @ 000002199435c840] Qavg: 515.211
[AVIOContext @ 0000021994363d40] Statistics: 3330192 bytes read, 2 seeks

2. ----------------------------------------------------
"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel verbose -stats -i
".\1.7TWO.mpg" -t 05 -map_metadata -1 -vf "format=cuda,yadif_cuda=0:-1:0" -r
25 -c:v h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq
-rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder cabac -strict
experimental -movflags +faststart+write_colr -profile:v high -level 4.1 -an
-y ".\1.7TWO.aac.yadif_cuda.mp4"
ffmpeg version N-93276-g3b23eb283a-test Copyright (c) 2000-2019 the FFmpeg
developers
  built with gcc 8.3.0 (GCC)
  configuration: --arch=x86_64 --target-os=mingw32
--cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config
--disable-w32threads --enable-pthreads --enable-cross-compile --enable-pic
--enable-libsoxr --enable-libass --enable-iconv --enable-libtwolame
--enable-libzvbi --enable-libcaca --enable-libmodplug --enable-cuvid
--enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libgsm
--enable-libopus --enable-bzlib --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvpx
--enable-libilbc --enable-libwavpack --enable-libwebp --enable-dxva2
--disable-avisynth --enable-vapoursynth --enable-gray --enable-libmysofa
--enable-libflite --enable-lzma --enable-libsnappy --enable-libzimg
--enable-libx264 --enable-libx265 --enable-libaom --enable-libdav1d
--enable-frei0r --enable-filter=frei0r --enable-librubberband
--enable-libvidstab --enable-libxvid --enable-libgme
--enable-runtime-cpudetect --enable-libfribidi --enable-gnutls --enable-gmp
--enable-fontconfig --enable-libfontconfig --enable-libfreetype
--enable-libbluray --enable-libcdio --enable-libmfx --disable-schannel
--enable-ladspa --enable-libxml2 --enable-libdavs2 --enable-libopenmpt
--enable-libxavs --enable-libxavs2 --enable-libmfx --enable-amf
--enable-ffnvcodec --enable-cuvid --enable-opengl --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-gpl
--extra-version='test _of_DeadSix27/python_cross_compile_script'
--enable-avresample --pkg-config-flags=--static --extra-libs='-lintl
-liconv' --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC
--enable-libbluray
--prefix=/home/u/Desktop/workdir/x86_64_products/ffmpeg_static_non_free_open
cl.installed --disable-shared --enable-static --enable-cuda-nvcc
--enable-nonfree --enable-opencl --enable-nonfree --enable-libfdk-aac
--enable-decklink --extra-cflags=-DLIBXML_STATIC
--extra-cflags=-DGLIB_STATIC_COMPILATION
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.102 / 58. 47.102
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Routing option strict to both codec and muxer layer
[mpeg @ 000001caa72dbd80] max_analyze_duration 5000000 reached at 5000000
microseconds st:0
Input #0, mpeg, from '.\1.7TWO.mpg':
  Duration: 01:24:11.57, start: 0.229856, bitrate: 3129 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), 1 reference frame,
yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr,
90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[mpeg @ 000001caa72dbd80] Correcting start time by 10144
[graph 0 input from stream 0:0 @ 000001caa7346b40] w:720 h:576
pixfmt:yuv420p tb:1/90000 fr:25/1 sar:64/45 sws_param:flags=2
[auto_scaler_0 @ 000001caa7806a40] w:iw h:ih flags:'bicubic' interl:0
[Parsed_format_0 @ 000001caa72c8780] auto-inserting filter 'auto_scaler_0'
between the filter 'graph 0 input from stream 0:0' and the filter
'Parsed_format_0'
Impossible to convert between the formats supported by the filter 'graph 0
input from stream 0: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:0
[AVIOContext @ 000001caa73a9780] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 000001caa72e4d40] Statistics: 1855632 bytes read, 2 seeks
Conversion failed!
----------------------------------------------------


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

winmail.dat (14K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: using YADIF_CUDA - how to fix error "Impossible to convert between the formats supported by the filter"

hydra3333
> Hello, seeking help to use the newly updated FFMPEG filter YADIF_CUDA.  
>
> I keep getting error  "Impossible to convert between the formats supported
by the filter 'graph 0 input from stream 0:0' and the filter
'auto_scaler_0'"
>
> I'm obviously doing something wrong in (not?) converting between formats
in the second commandline, but I don't know what to do to fix it.
>
> Example 1 works, using NVDEC as source input filter.
> Example 2 fails, using vanilla ffmpeg mpeg2 source input filter.
>
> Can anyone please clarify and how to fix the issue ?
>

OK, in this forum post Selur indicated something which worked.
https://forum.videohelp.com/threads/392398-FFMPEG-and-new-GPU-based-YADIF_CU
DA-deinterlacer#post2544264
Viz adding "hwupload_cuda," as in
-init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -vf
"hwupload_cuda,yadif_cuda=0:-1:0"
like
"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel verbose -stats -i
".\1.7TWO.mpg" -t 05 -map_metadata -1 -init_hw_device opencl=ocl:0.0
-filter_hw_device ocl -vf "hwupload_cuda,yadif_cuda=0:-1:0" -r 25 -c:v
h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v 32
-cq 22 -qmin 16 -qmax 25 -coder cabac -strict experimental -movflags
+faststart+write_colr -profile:v high -level 4.1 -an  -y
".\1.7TWO.aac.yadif_cuda.mp4"

Great !

However - when I need to combine the YADIF_CUDA deinterlacer with a GPU
based sharpener such as the UNSHARP_OPENCL opencl filter (each filter works
OK by itself) then I can't seem to jag a commandline which works with both.
This fails

"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel debug -stats
-init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i ".\1.7TWO.mpg" -t 05
-map_metadata -1 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]hwupload_cuda,yadif_cuda=0:-1:0,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:c
y=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p,setdar=dar=16/9" -r 25 -c:v
h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq
-rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder cabac -strict
experimental -movflags +faststart+write_colr -profile:v high -level 4.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-25.78:measured_LRA=4.50:measured_TP
=-6.82:measured_thresh=-36.00:offset=0.17:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000  -y ".\1.7TWO.aac.xxx.mp4"

with log

[format @ 0000021d2443d580] Setting 'pix_fmts' to value 'nv12'
[auto_scaler_0 @ 0000021d0db5a200] w:iw h:ih flags:'bilinear' interl:0
[Parsed_unsharp_opencl_2 @ 0000021d0db67000] auto-inserting filter
'auto_scaler_0' between the filter 'Parsed_yadif_cuda_1' and the filter
'Parsed_unsharp_opencl_2'
Impossible to convert between the formats supported by the filter
'Parsed_yadif_cuda_1' 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:0

Anyone able to indicate what to do to make this work ?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: using YADIF_CUDA - how to fix error "Impossible to convert between the formats supported by the filter"

hydra3333
In reply to this post by hydra3333
OK, just for completeness then, these work, as mentioned here
https://forum.videohelp.com/threads/392398-FFMPEG-and-new-GPU-based-YADIF_CU
DA-deinterlacer#post2544357

Result = slower to use yadif_cuda with unsharp_opencl than vanilla yadif
with unsharp_opencl

----------------------------------------------------
"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel verbose -stats -i
".\1.7TWO.mpg" -t 05 -map_metadata -1 -init_hw_device opencl=ocl:0.0
-filter_hw_device ocl -vf "hwupload_cuda,yadif_cuda=0:-1:0" -r 25 -c:v
h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v 32
-cq 22 -qmin 16 -qmax 25 -coder cabac -strict experimental -movflags
+faststart+write_colr -profile:v high -level 4.1 -an  -y
".\1.7TWO.aac.yadif_cuda.mp4"
----------------------------------------------------

"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel warning -stats
-init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i ".\1.7TWO.mpg" -t 60
-map_metadata -1 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,
hwdownload,format=pix_fmts=yuv420p,setdar=dar=16/9" -r 25 -c:v h264_nvenc
-pix_fmt nv12 -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v
32 -cq 22 -qmin 16 -qmax 25 -coder cabac -strict experimental -movflags
+faststart+write_colr -profile:v high -level 4.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-25.78:measured_LRA=4.50:measured_TP
=-6.82:measured_thresh=-36.00:offset=0.17:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000  -y
".\1.7TWO.aac.standard.mp4"

frame= 1500 fps=142 q=18.0 Lsize=   15010kB time=00:01:00.01
bitrate=2049.0kbits/s speed=5.66x    
----------------------------------------------------

"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -loglevel warning -stats
-init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i ".\1.7TWO.mpg" -t 60
-map_metadata -1 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]hwupload_cuda,yadif_cuda=0:-1:0,hwdownload,format=pix_fmts=yuv420p,hwu
pload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix
_fmts=yuv420p" -r 25 -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g 50
-refs 3 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder
cabac -strict experimental -movflags +faststart+write_colr -profile:v high
-level 4.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-25.78:measured_LRA=4.50:measured_TP
=-6.82:measured_thresh=-36.00:offset=0.17:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000  -y
".\1.7TWO.aac.yadif_cuda.opencl.mp4"

frame= 1500 fps=125 q=18.0 Lsize=   15000kB time=00:01:00.01
bitrate=2047.7kbits/s speed=5.01x    
----------------------------------------------------



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".