我正在尝试使用ffmpeg从Ubuntu Linux中的Blackmagic DeckLink 4K Extreme采集卡的HDMI输入端口捕获视频。
根据ffmpeg Documentation,我尝试了以下内容:
ffmpeg -f decklink -video_input 'hdmi' -i 'DeckLink 4K Extreme (1)@14' -acodec copy -vcodec copy ~/testCapture/card1_f14_hdmi.avi
我的ffmpeg版本是:
ffmpeg version git-2016-08-15-4899953 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/root/decklinkSDK/Blackmagic_DeckLink_SDK/Linux/include --extra-ldflags=-L/root/decklinkSDK/Blackmagic_DeckLink_SDK/Linux/include --enable-nonfree libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 51.102 / 57. 51.102 libavformat 57. 46.101 / 57. 46.101 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 51.100 / 6. 51.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100
我有两张这样的卡片如下:
ffmpeg -f decklink -list_devices 1 -i dummy ..... [decklink @ 0x2e9e440] Blackmagic DeckLink devices: [decklink @ 0x2e9e440] 'DeckLink 4K Extreme (1)' [decklink @ 0x2e9e440] 'DeckLink 4K Extreme (2)'
我可以通过以下方式获得支持的格式列表:
ffmpeg -f decklink -list_formats 1 -i 'DeckLink 4K Extreme (1)' ... [decklink @ 0x36e2440] Supported formats for 'DeckLink 4K Extreme (1)': [decklink @ 0x36e2440] 1 720x486 at 30000/1001 fps (interlaced, lower field first) [decklink @ 0x36e2440] 2 720x576 at 25000/1000 fps (interlaced, upper field first) [decklink @ 0x36e2440] 3 1920x1080 at 24000/1001 fps [decklink @ 0x36e2440] 4 1920x1080 at 24000/1000 fps [decklink @ 0x36e2440] 5 1920x1080 at 25000/1000 fps [decklink @ 0x36e2440] 6 1920x1080 at 30000/1001 fps [decklink @ 0x36e2440] 7 1920x1080 at 30000/1000 fps [decklink @ 0x36e2440] 8 1920x1080 at 25000/1000 fps (interlaced, upper field first) [decklink @ 0x36e2440] 9 1920x1080 at 30000/1001 fps (interlaced, upper field first) [decklink @ 0x36e2440] 10 1920x1080 at 30000/1000 fps (interlaced, upper field first) [decklink @ 0x36e2440] 11 1920x1080 at 50000/1000 fps [decklink @ 0x36e2440] 12 1920x1080 at 60000/1001 fps [decklink @ 0x36e2440] 13 1920x1080 at 60000/1000 fps [decklink @ 0x36e2440] 14 1280x720 at 50000/1000 fps [decklink @ 0x36e2440] 15 1280x720 at 60000/1001 fps [decklink @ 0x36e2440] 16 1280x720 at 60000/1000 fps ... DeckLink 4K Extreme (1): Immediate exit requested
我应该使用ffmpeg来捕获带有HDMI端口声音的高清视频?
答案 0 :(得分:1)
"当ffmpeg中设置的参数选择的分辨率/扫描速率与输入不匹配时,将显示条形图。您目前将其设置为1280x720 @ 50p"
来自https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=50941
条形码在卡内部生成。所以我的猜测是确认你的HDMI实际上正在传输720p50。也就是说," DeckLink Quad 2"支持更多格式,我也得到了条形码。
https://forum.blackmagicdesign.com/viewtopic.php?f=3&t=9654
使用来自https://github.com/lu-zero/bmdtools的工具调用bmdcapture
,可用于补充FFMPEG或libav。