[FFmpeg-user] Can Decklink and GPu acceleration be used at same time ??

Matthew Reus matthew.reus01 at gmail.com
Sun Apr 12 12:32:16 EEST 2020


here i have attach the 2 of the  ffmpeg script

1. This code gave me error
* ffmpeg -f decklink -hwaccel_device 1 -hwaccel nvdec
-hwaccel_output_format cuda -format_code pal -i 'DeckLink Quad (4)' -r 25
-vf "format=yuv420p|cuda,yadif_cuda=0:-1:0,scale_npp=1280:720"  -b:v 2.5M
-bf 1 -aspect 16:9 -profile:v main -preset:v medium -c:v h264_nvenc -gpu 1
-c:a aac -b:a 128k -ar 48000 -strict -2 -f flv
'rtmp://admin:admin@192.168.10.100:1935/test/Test1500.stream
<http://admin:admin@192.168.10.100:1935/test/Test1500.stream>'*
ffmpeg version N-97249-gfc12d6c Copyright (c) 2000-2020 the FFmpeg
developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
--extra-cflags='-I/root/ffmpeg_build/include
-I/root/ffmpeg_sources/BMD_SDK/include'
--extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm'
--bindir=/root/bin --enable-cuda --enable-cuda-nvcc --enable-cuvid
--enable-libnpp --extra-cflags=-I../nv_sdk --extra-ldflags=-L../nv_sdk
--extra-cflags=-I/usr/local/cuda/include/
--extra-ldflags=-L/usr/local/cuda/lib64/ --enable-decklink
--extra-cflags=-I/usr/local/sdk/Linux/include/
--extra-ldflags=-L/usr/local/sdk/Linux/include/ --enable-gpl
--enable-libaom --enable-libass --enable-libfdk-aac --enable-vaapi
--enable-libfreetype --enable-libmp3lame --enable-libopus
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-nonfree --enable-nvenc
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.100 / 58. 78.100
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[decklink @ 0x55b6219b1b80] Found Decklink mode 720 x 576 with rate 25.00(i)
[decklink @ 0x55b6219b1b80] Frame received (#1) - No input signal detected
- Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Quad (4)':
  Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422(top first),
720x576, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
[rtmp @ 0x55b6219ec7c0] Ignoring unsupported var reason
[decklink @ 0x55b6219b1b80] Frame received (#9) - Input returned - Frames
dropped 2
Stream mapping:
  Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter
'Parsed_format_0' and the filter 'auto_scaler_1'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:1

*2. Its okay but i need to operate in above way ffmpeg to be fully implemnt
on gpu on on cpu*
* ffmpeg -fflags +genpts -vsync 0 -format_code pal -f decklink -i 'DeckLink
Quad (4)' -vf "format=yuv420p,yadif=0:-1:0,scale=1280:720"  -b:v 2.5M -bf 1
-aspect 16:9 -profile:v main -preset:v medium -c:v h264_nvenc -gpu 1 -c:a
aac -b:a 128k -ar 48000 -strict -2 -f flv
'rtmp://admin:admin@192.168.10.100:1935/test/Test1500.stream
<http://admin:admin@192.168.10.100:1935/test/Test1500.stream>'*
ffmpeg version N-97249-gfc12d6c Copyright (c) 2000-2020 the FFmpeg
developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
--extra-cflags='-I/root/ffmpeg_build/include
-I/root/ffmpeg_sources/BMD_SDK/include'
--extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm'
--bindir=/root/bin --enable-cuda --enable-cuda-nvcc --enable-cuvid
--enable-libnpp --extra-cflags=-I../nv_sdk --extra-ldflags=-L../nv_sdk
--extra-cflags=-I/usr/local/cuda/include/
--extra-ldflags=-L/usr/local/cuda/lib64/ --enable-decklink
--extra-cflags=-I/usr/local/sdk/Linux/include/
--extra-ldflags=-L/usr/local/sdk/Linux/include/ --enable-gpl
--enable-libaom --enable-libass --enable-libfdk-aac --enable-vaapi
--enable-libfreetype --enable-libmp3lame --enable-libopus
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-nonfree --enable-nvenc
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.100 / 58. 78.100
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[decklink @ 0x55da1a83c9c0] Found Decklink mode 720 x 576 with rate 25.00(i)
[decklink @ 0x55da1a83c9c0] Frame received (#1) - No input signal detected
- Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'DeckLink Quad (4)':
  Duration: N/A, start: 0.000000, bitrate: 167424 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422(top first),
720x576, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
[rtmp @ 0x55da1a876b40] Ignoring unsupported var reason
Stream mapping:
  Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[decklink @ 0x55da1a83c9c0] Frame received (#10) - Input returned - Frames
dropped 2
Output #0, flv, to 'rtmp://
admin:admin at 192.168.10.100:1935/test/Test1500.stream':
  Metadata:
    encoder         : Lavf58.42.100
    Stream #0:0: Video: h264 (h264_nvenc) (Main) ([7][0][0][0] / 0x0007),
yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 25 fps, 1k tbn,
25 tbc
    Metadata:
      encoder         : Lavc58.78.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2500000 buffer size: 5000000 vbv_delay:
N/A
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz,
stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.78.100 aac
[flv @ 0x55da1a85a340] Failed to update header with correct
duration.993.9kbits/s speed= 1.1x
[flv @ 0x55da1a85a340] Failed to update header with correct filesize.
frame=   78 fps= 27 q=19.0 Lsize=    1211kB time=00:00:03.15
bitrate=3141.3kbits/s speed=1.11x
video:1157kB audio:49kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.366168%

On Sun, Apr 12, 2020 at 2:53 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> Am So., 12. Apr. 2020 um 03:58 Uhr schrieb Matthew Reus
> <matthew.reus01 at gmail.com>:
> >
> > How can we take decklink input from QUAD 2 capture card  and use the gpu
> > for transcoding at same time , could anyone provide the example or
> tutorial
> > steps for it , as i have compile ffmpeg with gpu and decklink , but i
> could
> > not use hardware acceleration with decklink input
> > i
> >
> > *ffmpeg -fflags +genpts -vsync 0 -fflags +genpts -vsync 0
> -hwaccel_device 1
> > -hwaccel nvdec -hwaccel_output_format cuda -format_code Hi50 -f decklink
> -i
> > 'DeckLink Quad (1)'  -vf "format=yuv420p,yadif=0:-1:0,scale=1920:1080"
> >  -b:v 3.5M -bf 1 -aspect 16:9 -profile:v main -preset:v medium -c:v
> > h264_nvenc -c:a aac -b:a 128k -ar 48000 -strict -2 -f flv
> > 'rtmp://admin:admin@192.168.10.100:1935/test/Test1500.stream
> > <http://admin:admin@192.168.10.100:1935/test/Test1500.stream>'
>
> Complete, uncut console output missing and please consider to use
> file output for testing.
> vsync 0 is supposed to lead to A/V desync.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list