linux - 在 Ubuntu Linux 中从 Decklink 4k Extreme 捕获视频的 Ffmpeg 命令

标签 linux video ffmpeg video-capture

我正在尝试使用 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

但不管我做什么,我总是把这张照片拍成视频
Video unavailable

我的 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

为了从 HDMI 端口捕获带有声音的高清视频,我应该使用 ffmpeg 做什么?

最佳答案

“当 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 配合使用。

关于linux - 在 Ubuntu Linux 中从 Decklink 4k Extreme 捕获视频的 Ffmpeg 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38955775/

相关文章:

android - 在 Android WebView 中播放 Youtube HTML5 嵌入视频

ffmpeg - 当我用 ffmpeg 解码 h264 720p 时输出黑色

audio - 从 ffmpeg 与专辑封面进行管道传输时,mp3 中的元数据不起作用

c - posix sem_post 无法在线程中的 sem init 处唤醒 sem_wait。 Linux

python - 如何在子目录中创建一个 "just fits"文件的 block 设备?

linux - 适用于 linux 内核 2.6.31 的 Apparmor 补丁

linux - 状态 : 301 Moved Permanently ActiveCollab

python - OpenCV VideoWriter 不写任何东西

video - 如何使用 FFMPEG 获得最佳的总体 FLV 质量?

ffmpeg - 防止 FFMPEG 跳过过期帧