我下载了最新的静态
ffmpeg 构建它支持 Windows 的 decklink 格式 (-f decklink)。
我还安装了 decklink 10.8.2 驱动程序(这是此版本发布时可用的最新驱动程序)
请参阅 decklink 设备:
ffmpeg -f lavfi -t 1 -i nullsrc -f decklink -list_devices 1 虚拟
Input #0, lavfi, from 'nullsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[decklink @ 0000000000733c00] Blackmagic DeckLink devices:
[decklink @ 0000000000733c00] 'DeckLink SDI (1)'
[decklink @ 0000000000733c00] 'DeckLink SDI (2)'
Could not write header for output file #0 (incorrect codec parameters ?): Immediate exit requestedStream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Last message repeated 1 times
第一台设备支持的格式:
ffmpeg -f lavfi -t 1 -i nullsrc -f decklink -list_formats 1 "DeckLink SDI (1)"
Input #0, lavfi, from 'nullsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[decklink @ 0000000000e03320] Supported formats for 'DeckLink SDI (1)':
[decklink @ 0000000000e03320] 1 720x486 at 30000/1001 fps (interlaced, lower field first)
[decklink @ 0000000000e03320] 2 720x486 at 24000/1001 fps
[decklink @ 0000000000e03320] 3 720x576 at 25000/1000 fps (interlaced, upper field first)
[decklink @ 0000000000e03320] 4 1920x1080 at 24000/1001 fps
[decklink @ 0000000000e03320] 5 1920x1080 at 24000/1000 fps
[decklink @ 0000000000e03320] 6 1920x1080 at 25000/1000 fps
[decklink @ 0000000000e03320] 7 1920x1080 at 30000/1001 fps
[decklink @ 0000000000e03320] 8 1920x1080 at 30000/1000 fps
[decklink @ 0000000000e03320] 9 1920x1080 at 25000/1000 fps (interlaced, upper field first)
[decklink @ 0000000000e03320] 10 1920x1080 at 30000/1001 fps (interlaced, upper field first)
[decklink @ 0000000000e03320] 11 1920x1080 at 30000/1000 fps (interlaced, upper field first)
[decklink @ 0000000000e03320] 12 1280x720 at 50000/1000 fps
[decklink @ 0000000000e03320] 13 1280x720 at 60000/1001 fps
[decklink @ 0000000000e03320] 14 1280x720 at 60000/1000 fps
Could not write header for output file #0 (incorrect codec parameters ?): Immediate exit requestedStream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Last message repeated 1 times
但使用单引号它不起作用(可能很重要):
ffmpeg -f lavfi -t 1 -i nullsrc -f decklink -list_formats 1 'DeckLink SDI (1)'
Input #0, lavfi, from 'nullsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[NULL @ 0000000002687480] Unable to find a suitable output format for 'SDI'
SDI: Invalid argument
但是当我尝试以下命令时:
ffmpeg -i RTMPsource -s 720x576 -r 25000/1000 -pix_fmt uyvy422 -f decklink "Decklink SDI (1)"
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Metadata:
duration 0.00
width 1024.00
height 576.00
videodatarate 2441.41
framerate 25.00
videocodecid 7.00
audiodatarate 125.00
audiosamplerate 48000.00
audiosamplesize 16.00
stereo TRUE
audiocodecid 10.00
encoder Lavf57.71.100
filesize 0.00
[flv @ 00000000001c68a0] video stream discovered after head already parsed
[flv @ 00000000001c68a0] audio stream discovered after head already parsed
Input #0, flv, from 'RTMPsource':
Metadata:
encoder : Lavf57.71.100
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
Could not write header for output file #0 (incorrect codec parameters ?): No such device or addressStream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Last message repeated 1 times
我收到下一个错误:“无法写入输出文件 #0 的标头(编解码器参数不正确?):没有此设备或地址”
有人能解释一下这个错误的原因是什么以及有什么方法可以解决它吗?