lu-zero / bmdtools Goto Github PK
View Code? Open in Web Editor NEWBasic capture and play programs for Blackmagic Design Decklink
License: Boost Software License 1.0
Basic capture and play programs for Blackmagic Design Decklink
License: Boost Software License 1.0
when i try and build i get the following
xpd259@mars:~/workspace/apps/Blackmagic DeckLink SDK 9.7.1/Linux/Samples/bmdtools$ make
g++ -o bmdcapture bmdcapture.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat libswscale
bmdcapture.cpp:194:61: error: use of enum ‘AVCodecID’ without previous declaration
bmdcapture.cpp: In function ‘AVStream* add_audio_stream(AVFormatContext_, int)’:
bmdcapture.cpp:207:21: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
bmdcapture.cpp: At global scope:
bmdcapture.cpp:234:61: error: use of enum ‘AVCodecID’ without previous declaration
bmdcapture.cpp: In function ‘AVStream_ add_video_stream(AVFormatContext_, int)’:
bmdcapture.cpp:247:21: error: invalid conversion from ‘int’ to ‘CodecID’ [-fpermissive]
bmdcapture.cpp:264:21: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
bmdcapture.cpp: In function ‘int main(int, char__)’:
bmdcapture.cpp:846:51: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
bmdcapture.cpp:846:74: error: ‘AV_CODEC_ID_V210’ was not declared in this scope
bmdcapture.cpp:847:59: error: ‘AV_CODEC_ID_PCM_S16LE’ was not declared in this scope
bmdcapture.cpp:847:83: error: ‘AV_CODEC_ID_PCM_S32LE’ was not declared in this scope
make: *_* [bmdcapture] Error 1
is this because i'm using debian Jessie/Testing?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942860-fails-to-build-on-debian-jessie?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Interested in the ability to use a graphical interface to bmdtools. Does anyone know how to organize it just?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5117739-gui-for-bmdtools?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Hello,
SDI capture works fine but I didn't manage to capture SD video :
./bmdcapture -C 0 -m 2 -V 1 -F nut -f pipe:1 | ffmpeg -y -i - -f v4l2 /dev/video10
...
Failed to set video input - result 80000001
pipe:: Invalid data found when processing input
the source seems ok (digtal camera tested on a beamer analog in) and this command works great with SDI video in 1080i with -m 8 -V 4
thks
benjamin
Hi community,
Is there a way to output ASI from Decklink Duo or Quad cards?
Afaik only SDI/HDI outputs are possible with rawvideo.
If output is formatted, can ASI out can be taken from SDI output port?
BR,
Zulu
Tested current version of ffmpeg instead of avconv - bmdtools compiling and working (atleast bmdcapture) with it. So i guess readme needs to be updated :)
I know there is a longish previous thread under "Memory Usage", but also noticed the libav / nut branch that thread refers to appears to no longer be in the repo.
I am seeing bmdplay grow in memory usage - playing a 720P stream over the course of about an hour, it grows to around 1.4 GB.
I know in the previous thread there was some conclusion that the nut container format was the culprit, but also the conclusion that you could not change that option in bmdplay (vs bmdcapture) since in that scenario, you are intputing the format into bmdplay and you can't just randomly try an alternate format.
SO, I wanted to ask: was there every a conclusion on bmdplay? were the changes in the nut / libav branch included in master eventually? anything to try or data I can send you with bmdplay and high memory usage?
Thanks!
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942855-memory-usage-with-bmdplay-specifically?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Hi all,
I don't know why but i can't install bmdtools correctly.
It says something is missing, apparently libavutil/time.h and i don't know how to fix it. I tried with an ubuntu and a debian but sill the same damn shit. I have ffmpeg, ffmbc, libav.
I just noticed that ffmbc use timer.h instead time.h
If somebody could help me.
Thanks a lot
I've built bmdcapture, but when I try to run it, I get the error
[pcm_s16le @ 0x1b9aca0] Specified sample_fmt is not supported.
could not open codec
I've built my own libav, so that might be the problem. However, pcm_s16le is supported, from everything I can tell:
> ../libav/avconv -codecs | grep -i pcm
avconv version v11.2, Copyright (c) 2000-2014 the Libav developers
built on Mar 4 2015 15:03:14 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
...
DEA..S pcm_s16le PCM signed 16-bit little-endian
DEA..S pcm_s16be PCM signed 16-bit big-endian
...
>../libav/avconv -sample_fmts
name depth
u8 8
s16 16
s32 32
....
Ubuntu 14.04, libav 11.2 with libavutil 54.3.0. Latest bmdtools from git.
Try to download this stream:
/usr/bin/avconv -i 'rtmp://flash3.todostreaming.es/telelinea1/mystream live=1' -c:a copy -c:v copy -map 0 -f flv /root/dump.flv
And then play it:
/usr/bin/avconv -vsync 1 -re -i dump.flv -c:v rawvideo -pix_fmt uyvy422 -threads 0 -c:a pcm_s16le -r:a 48k -map 0 -f nut - | /usr/local/bin/bmdplay -m 2 -C 0 -b 0 -f pipe:0
It is out of sync.
Hello,
Can anyone help me to capture video using bmdtools with DekcLink 4K Extreme with ffpmeg.
I have a trouble tocapture frames from my Set-Top-Box that he have color space output Y'CbCr 4:4:4 and capturing from this color space is a card feature.
Thanks
Tomas
I can playout with this command
�./bmdplay -m 10 -C 0 -O 4 -f /Test_Clip.mov
Though I can not seem to get this one to work. I am interested in making a universal video player
Thanks for any help.
avconv -vsync 1 -i /Test_Clip.mov -c:v rawvideo -pix_fmt uyvy422 -c:a pcm_s16le -ar 48000 -f nut -f_strict experimental -syncpoints none - | ./bmdplay -f pipe:0
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22449376-command-syntax?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).On Mac the audio timestamps reported aren't in sync with the video. Possibly it is a driver bug.
How to compile without bmplay?
diff --git a/Makefile b/Makefile
index 6ec6851..bba8bf9 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ SDK_PATH=../../include
SYS=`uname -s`
-CXXFLAGS=-Wno-multichar -I $(SDK_PATH) -fno-rtti -D__STDC_CONSTANT_MACROS -g
+CXXFLAGS=-Wno-multichar -I $(SDK_PATH) `pkg-config --cflags libavformat libswscale` -fno-rtti -D__STDC_CONSTANT_MACROS -g
LDFLAGS=-lm -ldl -lpthread `pkg-config --libs libavformat libswscale`
ifeq ($(SYS),Darwin)
Now I can use an custom place for libav with:
export PKG_CONFIG_PATH=/opt/custom_whatever/lib/pkgconfig/
With no video source on 8 bit color bars are shown, but the data is only in uyvy422 (see https://github.com/lu-zero/bmdtools/blob/master/bmdcapture.cpp#L407-L408). I propose adding a version for v210.
bmdcapture -m 0 -V 4 -A 2 -c 8 -s 32 -p 10 -F nut -f pipe:1 | avplay -
Could you occasionally mark bmdtools with releases in git? https://github.com/lu-zero/bmdtools/releases Would make it a little easier to manage in homebrew (such as here: https://github.com/amiaopensource/homebrew-amiaos/blob/master/bmdtools.rb)
ubuntu server 14.04, decklink studio 4k, 10.1.1sdk and drivers
~/bmd/bmdtools# make SDK_PATH=/root/bmd/sdk/Linux/include/
g++ -o bmdcapture bmdcapture.cpp /root/bmd/sdk/Linux/include//DeckLinkAPIDispatch.cpp `pkg-config --cflags libavcodec libavformat libswscale libavutil` -D__STDC_CONSTANT_MACROS -Wno-multichar -I /root/bmd/sdk/Linux/include/ -fno-rtti -g `pkg-config --libs libavcodec libavformat libswscale libavutil` -lm -ldl -lpthread
bmdcapture.cpp: In function ‘int main(int, char**)’:
bmdcapture.cpp:803:64: error: ‘av_dict_parse_string’ was not declared in this scope
if (av_dict_parse_string(&opts, optarg, "=", ":", 0) < 0) {
^
make: *** [bmdcapture] Error 1
ffmpeg and libav was installed and bmdtools was copyed file in BlackmagicDeckLinkSDK9.7.1/Linux/Samples.
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
errors appears when make was ran
g++ -o bmdcapture bmdcapture.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat libswscale
bmdcapture.cpp:66: error: use of enum âAVSampleFormatâ without previous declaration
bmdcapture.cpp:66: error: invalid type in declaration before â=â token
bmdcapture.cpp:66: error: âAV_SAMPLE_FMT_S16â was not declared in this scope
bmdcapture.cpp:194: error: use of enum âAVCodecIDâ without previous declaration
bmdcapture.cpp: In function âAVStream* add_audio_stream(AVFormatContext_, int)â:
bmdcapture.cpp:200: error: âavformat_new_streamâ was not declared in this scope
bmdcapture.cpp:207: error: invalid conversion from âintâ to âCodecIDâ
bmdcapture.cpp:211: error: invalid conversion from âintâ to âSampleFormatâ
bmdcapture.cpp:226: error: âavcodec_open2â was not declared in this scope
bmdcapture.cpp: At global scope:
bmdcapture.cpp:234: error: use of enum âAVCodecIDâ without previous declaration
bmdcapture.cpp: In function âAVStream_ add_video_stream(AVFormatContext_, int)â:
bmdcapture.cpp:240: error: âavformat_new_streamâ was not declared in this scope
bmdcapture.cpp:247: error: invalid conversion from âintâ to âCodecIDâ
bmdcapture.cpp:264: error: âAV_CODEC_ID_V210â was not declared in this scope
bmdcapture.cpp:279: error: âavcodec_open2â was not declared in this scope
bmdcapture.cpp: In function âint main(int, char__)â:
bmdcapture.cpp:666: error: âAV_SAMPLE_FMT_S16â was not declared in this scope
bmdcapture.cpp:669: error: âAV_SAMPLE_FMT_S32â was not declared in this scope
bmdcapture.cpp:687: error: âPIX_FMT_YUV422P10â was not declared in this scope
bmdcapture.cpp:846: error: âAV_CODEC_ID_RAWVIDEOâ was not declared in this scope
bmdcapture.cpp:846: error: âAV_CODEC_ID_V210â was not declared in this scope
bmdcapture.cpp:847: error: âAV_SAMPLE_FMT_S16â was not declared in this scope
bmdcapture.cpp:847: error: âAV_CODEC_ID_PCM_S16LEâ was not declared in this scope
bmdcapture.cpp:847: error: âAV_CODEC_ID_PCM_S32LEâ was not declared in this scope
bmdcapture.cpp:853: error: âAVIO_FLAG_WRITEâ was not declared in this scope
bmdcapture.cpp:853: error: âavio_openâ was not declared in this scope
bmdcapture.cpp:879: error: âavformat_write_headerâ was not declared in this scope
bmdcapture.cpp:926: error: âavio_closeâ was not declared in this scope
make: *_* [bmdcapture] Error 1
thanks for your's helping
The driver supports ancillary data and there is a pull request about it.
The pull request does the parsing inside bmdtools and tries to output a subtitle
stream and a new codec id
.
I'd go with a simpler approach and use a data
stream and signal its contents as is done for MXF, this way would be possible easily preserve the data across processing and possibly play it back w/out needing additional code to assemble it.
make SDK_PATH=/usr/include
g++ -o bmdcapture bmdcapture.cpp modes.cpp /usr/include/DeckLinkAPIDispatch.cpp pkg-config --cflags libavcodec libavformat libswscale libavutil
-D__STDC_CONSTANT_MACROS -Wno-multichar -I /usr/include -fno-rtti -g pkg-config --libs libavcodec libavformat libswscale libavutil
-lm -ldl -lpthread
bmdcapture.cpp: In function 'int main(int, char*)':
bmdcapture.cpp:730:64: error: 'av_dict_parse_string' was not declared in this scope
if (av_dict_parse_string(&opts, optarg, "=", ":", 0) < 0) {
^
Makefile:55: recipe for target 'bmdcapture' failed
make: ** [bmdcapture] Error 1
Error with AVCODEC_MAX_AUDIO_FRAME_SIZE wich is not declared in libav.
g++ -o bmdcapture bmdcapture.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat libswscale
g++ -o bmdplay bmdplay.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat libswscale
bmdplay.cpp:64: error: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ was not declared in this scope
bmdplay.cpp:65: error: ‘audio_buffer’ was not declared in this scope
bmdplay.cpp: In member function ‘void Player::WriteNextAudioSamples()’:
bmdplay.cpp:775: error: ‘audio_buffer’ was not declared in this scope
bmdplay.cpp:777: error: ‘avcodec_decode_audio3’ was not declared in this scope
I have a Decklink 4K Extreme, I use it capture 4K videos and at the same time encode it by ffmpeg, I founed this process can't reach 25 fps. My ffmpeg call libx264 to encode 4K videos, it will reach 85fps on my computer. So I wonder why i Capture by bmdtool and encode by ffmpeg only 13fps.
My command is :
bmdcapture -m 25 -F nut -f pipe:1 | ffmpeg -i - -vcodec libx264 -profile:v high422 -r 25 -f mpegts udp://239.1.1.1:1234
Thanks for your advice
xueshui
Overview
When used with pixel format (-p
) yuv8
or not supplied avconv
sees the incoming raw video as rgb555le
. This is causing me color issues when generating videos or images from our feed.
I have managed to get around this by using yuv10
- avconv
then sees the stream as yuv422p10le
.
I am using the latest bmdtools from the repository with the latest firmware, SDK and drivers from Blackmagic. On Ubuntu 14.04.
Hardware used
0: /dev/blackmagic/io0 [DeckLink Mini Recorder] 0x45 OK
Command used
/usr/bin/bmdcapture -C 0 -m 11 -V 4 -p yuv8 -f pipe:1 -n 1 -F nut -o strict=experimental:syncpoints=none | /usr/local/bin/avconv -vsync passthrough -y -i - -f image2 - > test.jpg
avconv Output
When using yuv8
:
Input #0, nut, from 'pipe:':
Metadata:
encoder : Lavf55.12.0
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, rgb555le, 1280x720, 59.94 tbn
Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
When using yuv10
:
Input #0, nut, from 'pipe:':
Metadata:
encoder : Lavf55.12.0
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: v210, yuv422p10le, 1280x720, 59.94 tbn
Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Nice work with bmdtools. Not as a bug tracker but feature request:
Signal detection works quite nicely with basic decklink card and SDI signaling. It would be nice addition to color bars to load image from file and even update it if file is changed. One could create info screens without any graphics generator from SDI when signal is lost or just shutdown between some events.
I was very happy to see decklink-ffmpeg add support for 10 bit video capture. Could support for 24 bit audio be added as well?
not be compiled on macintosh 10.8
bmdcapture.cpp:539:39: error: cannot initialize a parameter of type
'CFStringRef ' (aka 'const __CFString *') with an rvalue of type
'BMDProbeString ' (aka 'const char *')
result = displayMode->GetName(&str);
^~~~
../../include/DeckLinkAPIModes.h:166:53: note: passing argument to parameter
'name' here
virtual HRESULT GetName (/* out / CFStringRef *name) = 0;
^
bmdcapture.cpp:605:41: error: cannot initialize a parameter of type
'CFStringRef *' (aka 'const __CFString *') with an rvalue of type
'BMDProbeString ' (aka 'const char *')
result = deckLink->GetModelName(&str);
^~~~
../../include/DeckLinkAPIDiscovery.h:56:58: note: passing argument to parameter
'modelName' here
virtual HRESULT GetModelName (/* out / CFStringRef *modelName) = 0;
^
bmdcapture.cpp:691:29: warning: '&&' within '||' [-Wlogical-op-parentheses]
if (g_maxFrames > 0 && frameCount >= g_maxFrames ||
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
bmdcapture.cpp:691:29: note: place parentheses around the '&&' expression to
silence this warning
if (g_maxFrames > 0 && frameCount >= g_maxFrames ||
^
( )
bmdcapture.cpp:932:29: warning: comparison of unsigned expression < 0 is always
false [-Wtautological-compare]
if (selectedDisplayMode < 0) {
~~~~~~~~~~~~~~~~~~~ ^ ~
7 warnings and 2 errors generated.
make: ** [bmdcapture] Error 1
Cloning from the latest commit: 9692cc6
DesktopVideo (SDK) version: 10.3.1
Decklink Recorder firmware: Latest
~/bmdtools$ BlackmagicFirmwareUpdater status
0: /dev/blackmagic/dv0 [DeckLink Mini Recorder] 0x11 OK
If I Ctrl+C and then restart the process, it just won't work unless I reload the firmware module.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6419895-forced-to-rmmod-modprobe-after-using-bmdcapture?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Two weeks ago i succeses compiled bmdcapture with SDK 9.1, last commit decklink-ffmpeg - 8a65e71 .
At now when i try compile bmdcapture commit 94b44c4 i see this error:
g++ -o bmdcapture bmdcapture.cpp /usr/include/DeckLinkAPIDispatch.cpp -Wno-multichar -I /usr/include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat
bmdcapture.cpp: In function ‘AVStream* add_audio_stream(AVFormatContext_, CodecID)’:
bmdcapture.cpp:208:38: error: ‘avformat_new_stream’ was not declared in this scope
bmdcapture.cpp:237:37: error: ‘avcodec_open2’ was not declared in this scope
bmdcapture.cpp: In function ‘AVStream_ add_video_stream(AVFormatContext_, CodecID)’:
bmdcapture.cpp:252:38: error: ‘avformat_new_stream’ was not declared in this scope
bmdcapture.cpp:292:37: error: ‘avcodec_open2’ was not declared in this scope
bmdcapture.cpp: In function ‘int main(int, char__)’:
bmdcapture.cpp:716:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetAudioInputFormat’
bmdcapture.cpp:719:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetAudioInputFormat’
bmdcapture.cpp:733:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetVideoInputFormat’
bmdcapture.cpp:736:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetVideoInputFormat’
bmdcapture.cpp:739:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetVideoInputFormat’
bmdcapture.cpp:742:22: error: ‘class IDeckLinkConfiguration’ has no member named ‘SetVideoInputFormat’
bmdcapture.cpp:811:46: error: ‘AVIO_FLAG_WRITE’ was not declared in this scope
bmdcapture.cpp:811:61: error: ‘avio_open’ was not declared in this scope
bmdcapture.cpp:836:35: error: ‘avformat_write_header’ was not declared in this scope
bmdcapture.cpp:888:30: error: ‘avio_close’ was not declared in this scope
make: *_* [bmdcapture] Error 1
Live streaming through Nginx to avconv to bmdplay to Quad SDI card.
Was getting 2x a latency value (5-6s). Once through avconv and once through bmdplay. I was able to almost eliminate the latency through avconv with explicitly setting framerate (since I know it) and also setting the max time that avformat_find_stream_info looks for stream information.
-r 30 -probesize 750000 -analyzeduration 750000
full command:
avconv -r 30 -max_delay 1000 -probesize 750000 -analyzeduration 750000 -fflags nobuffer -i rtmp://localhost:1935/AV2015Local/stream2 -f nut -strict experimental -c:v copy -c:a pcm_s16le - | /home/vidcontrol/Builds/'Blackmagic DeckLink SDK 10.4.1'/Linux/Samples/bmdtools-master/bmdplay -m 10 -C 1 -f pipe:0
I am looking for something similar in bmdplay. Even better, since my format is fixed (I control the encoding and the RTMP streaming), I would like to be able to provide all of these hints up front so that I can reduce start up latency through bmdplay.
In fact, there is a note in the libav code about doing just this
from libav/libavformat/avformat.h @ ln 1445
we do not waste time getting stuff the user does not need.
avconv using avformat looks for these supplied by user
nb_audio_sample_rate
nb_audio_channels
nb_frame_rates
nb_frame_sizes
nb_frame_pix_fmts
then picks a codec (decoder) which will have it's own set of parameters and then uses avformat_find_stream_info to fill in the blanks.
In bmdplay I think it would be possible to set these after here:
378 avformat_find_stream_info(ic, NULL);
ic->max_delay = 1000;
ic->framerate = 30;
ic->flags |= AVFMT_FLAG_NOBUFFER;
ic->probesize = 750000;
ic->max_analyze_duration = 750000;
ic->fps_probe_size = ?????;
ic->strict_std_compliance = true;
Of course the right way to do this is through the command line args.
Am I on the right track?
Hello All,
10th of June, BMD announced an additional card for DeckLink 4K Extreme 12G which supplies 4x3G SDI input. Link: https://www.blackmagicdesign.com/press/release/20150610-01
Does bmdtools supports live raw AV 4K 60fps capture over DeckLink 4K Extreme 12G ?
Thank you,
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/23360101-decklink-4k-extreme-12g-quad-sdi?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Hi,
i am trying to compile bmdtools but i got this error.
g++ -o bmdcapture bmdcapture.cpp modes.cpp ../Linux/include/DeckLinkAPIDispatch.cpp pkg-config --cflags libavcodec libavformat libswscale libavutil
-D__STDC_CONSTANT_MACROS -Wno-multichar -I ../Linux/include -fno-rtti -g pkg-config --libs libavcodec libavformat libswscale libavutil
-lm -ldl -lpthread
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing libavcodec.pc' to the PKG_CONFIG_PATH environment variable No package 'libavcodec' found Package libavformat was not found in the pkg-config search path. Perhaps you should add the directory containing
libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing libswscale.pc' to the PKG_CONFIG_PATH environment variable No package 'libswscale' found Package libavutil was not found in the pkg-config search path. Perhaps you should add the directory containing
libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing libavcodec.pc' to the PKG_CONFIG_PATH environment variable No package 'libavcodec' found Package libavformat was not found in the pkg-config search path. Perhaps you should add the directory containing
libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing libswscale.pc' to the PKG_CONFIG_PATH environment variable No package 'libswscale' found Package libavutil was not found in the pkg-config search path. Perhaps you should add the directory containing
libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
bmdcapture.cpp:34:34: erreur fatale: libavformat/avformat.h : Aucun fichier ou dossier de ce type
compilation terminée.
make: *** [bmdcapture] Erreur 1
libav is install. I am running Ubuntu 12.04
Any ideas?
Thanks
I had to compile gstreamer and ffmbc from source in order to get this to work correctly. I tried for a long time to get avconv and ffmpeg working, but they would drop capture after 5-10 mins of recording no matter what I did.
HDMI from a Canon R400 1080i/5997 camcorder with:
bmdcapture -m 11 -C 0 -A 2 -V 3 -F nut -f pipe:1 | ffmbc -y -i - -b 145M -vcodec dnxhd -acodec pcm_s16le -threads 4 -an movie.mov
Hi,
I'm using Intensity Pro with bmdcapture to get raw images from hdmi input.
When i'm usingthe command in README file to get raw video
cmd : bmdcapture -C 0 -m 9 -V 3 -F rawvideo -f output_file.raw
Output:
[rawvideo @ 0x1d6cd20] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[rawvideo @ 0x1d6cd20] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
And the system hang and don't display and do anything even SIGTERM/SIGKILL don't work .
Please help.
The result from make command shown below.
g++ -o bmdcapture bmdcapture.cpp ../../include/DeckLinkAPIDispatch.cpp -Wno-multichar -I ../../include -fno-rtti -D__STDC_CONSTANT_MACROS -g -lm -ldl -lpthread pkg-config --libs libavformat libswscale
bmdcapture.cpp:201: error: use of enum ‘AVCodecID’ without previous declaration
bmdcapture.cpp: In function ‘AVStream* add_audio_stream(AVFormatContext_, int)’:
bmdcapture.cpp:215: error: invalid conversion from ‘int’ to ‘CodecID’
bmdcapture.cpp: At global scope:
bmdcapture.cpp:245: error: use of enum ‘AVCodecID’ without previous declaration
bmdcapture.cpp: In function ‘AVStream_ add_video_stream(AVFormatContext_, int)’:
bmdcapture.cpp:259: error: invalid conversion from ‘int’ to ‘CodecID’
bmdcapture.cpp: In function ‘int main(int, char__)’:
bmdcapture.cpp:819: error: ‘AV_CODEC_ID_RAWVIDEO’ was not declared in this scope
bmdcapture.cpp:820: error: ‘AV_CODEC_ID_PCM_S16LE’ was not declared in this scope
make: *_* [bmdcapture] Error 1
system: debian squeeze amd64
lib:
libavformat-dev 0.8.3-6
libswscale-dev 0.8.3-6
any suggestion ?
Thank you in advance.
I have been trying the last few hours to capture off of a Blackmagic Intensity Pro using bmdcapture.
I am linking against libav-9.3 and Decklink SDK 9.7
I am able to capture with MediaExpress just fine off of HDMI. However when I run this command:
./bmdcapture -m 13 -A 2 -V 3 -C 0 -n 10 -F nut -f test.nut
and in response get:
Frame received (#1) - No input signal detected - Frames dropped 1 - Total dropped 1
Frame received (#2) - No input signal detected - Frames dropped 2 - Total dropped 2
Frame received (#3) - No input signal detected - Frames dropped 3 - Total dropped 3
...
In looking at old issues and PRs, I noticed much older versions of DeckLink sdk being mentioned is 7.3 and 7.9 and wondering if that could be the source of the issue?
During the recording of files on unstable analog sources, bmdcapture will insert a pattern if there is no video (since 5a844f9). In 8 bit it is a color bar pattern and in 10 bit it is uyvy422 data rendered in v210 so a green/purple partial frame pattern. When working with unstable analog sources there are times when no frame data is received in the middle of a recording and the pattern is used. I propose that the pattern be selectable with color bars as default but including an option for black. I think an inserted occasional black frame would be less distracting to the current way bmdcapture handles unstable signals. I'm attaching two examples of the current state.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/21006611-provide-option-to-select-pattern-on-no-video?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).So right now when the input gets dropped, it immediately switches to color bars. I know in the Mac and Windows software there is any option to change this to either black or the last frame of video. I'm not sure if the Linux SDK has something similar that could be tapped into to bring this about.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5403699-change-behavior-on-input-change?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).bmd accepts plain non-planar pcm either 16 or 32 bits per sample, channel interleaved.
In order to make it support it properly it needs to decode and encode back to the correct pcm representation.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942862-support-non-pcm-audio-in-bmdplay?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).This way should be possible to guess the video input.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4059640-implement-videoinputformatchanged-support?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).I am trying to use bmdcapture to pipe to an instance of ffmpeg segmented streaming for 24/7 recording but I keep running into the same issue, running out of memory. The server it is running on has 6GB of ram but after about 2 and a half days the ram fills up completely and bmdcapture dies then the ram is cleared. I have confirmed that piping bmdcapture to /dev/null still fills up the ram.
Are there any suggestions?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942865-memory-usage-issue?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).I would like to see a -version flag. Right now it is hard to determine what version is on what machine.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8886747-feature-request-version-flag?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).Hi!
The Decklink mini recorder don't have outputs and because of that the modes list fail to load with the IID_IDeckLinkOutput interface. Must be used the IID_IDeckLinkInput interface to this card work.
Something like this fix the code:
// Query the DeckLink for its configuration interface
// Test input modes
result = deckLink->QueryInterface(IID_IDeckLinkInput,
(void **)&deckLinkOutput);
if (result != S_OK) {
fprintf(stderr,"Could not obtain the IDeckLinkInput interface - result = %08x\n",result);
// Input modes test failed lets try the output modes test
result = deckLink->QueryInterface(IID_IDeckLinkOutput,
(void **)&deckLinkOutput);
if (result != S_OK) {
fprintf(stderr,"Could not obtain the IDeckLinkOutput interface - result = %08x\n",
result);
goto bail;
} else {
fprintf(stderr,"This card have video output(s) but not have video input(s). You can not use this card with the bmdcapture software.\n");
goto bail;
}
}
Hi,
When trying to capture from DeckLink Quad from all 4 channels at once (4 bmdcapture processes) They all except one stop after couple of minutes.
I get "Stopping Capture" message from the bmdcapture.
I'm using Ubuntu 12.04.4 LTS with 10.3.1 SDK and latest version of bmdcapture.
Is this a known issue ? Is there any way to know what is stopping the capture ?
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7977413-stopping-capture?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).I'm currently working with a statically linked binary of ffmpeg and I'm attempting to make bmdtools and I'm getting hit with an odd linker issue on ubuntu 14.04 LTS. Are there any known issues with compiling against a static build or am I just not correctly pointing to the dependency locations?
/root/sandbox/bmdtools # export PKG_CONFIG_PATH="/root/sandbox/ffmpeg-build/bin/lib/pkgconfig"
/root/sandbox/bmdtools # PATH="$PATH:/root/sandbox/ffmpeg-build/lib/"
/root/sandbox/bmdtools # make SDK_PATH="/root/sandbox/inputs/DeckLink_SDK/Linux/include/"
g++ -o bmdcapture bmdcapture.cpp modes.cpp /root/sandbox/inputs/DeckLink_SDK/Linux/include//DeckLinkAPIDispatch.cpp `pkg-config --cflags libavcodec libavformat libswscale libavutil` -D__STDC_CONSTANT_MACROS -Wno-multichar -I /root/sandbox/inputs/DeckLink_SDK/Linux/include/ -fno-rtti -g `pkg-config --libs libavcodec libavformat libswscale libavutil` -lm -ldl -lpthread
bmdcapture.cpp: In function ‘int main(int, char**)’:
bmdcapture.cpp:746:42: warning: too many arguments for format [-Wformat-extra-args]
"Please disable either\n");
^
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lvpx
/usr/bin/ld: cannot find -lfdk-aac
collect2: error: ld returned 1 exit status
make: *** [bmdcapture] Error 1
I'm using an up to date branch
root@encoder1:/root/sandbox/bmdtools# git log -n 1
commit 43116a8c38ec2ffb3358b19c7a10af3f16e8d34a
Author: Luca Barbato <[email protected]>
Date: Mon Nov 24 15:29:32 2014 +0100
bmdcapture: Add a wallclock option
Useful to measure the pipeline delay.
... and n2.4.2 ffmpeg.
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
I have successfully installed this in the past on CentOS 6.4 without any issue the only difference being that the packages in question were built and installed as per the dictates on the internet.
Hello,
It would be nice to have the possibility with bmdcapture to choose which input to consider when the card has multi-input (duo or quad)
btw, thks for this ++ work
b
Once the support for large channel layout lands add proper channel mapping.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942861-add-avresample-support-in-bmdplay?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).The package is getting large enough to warrant it.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942857-add-an-autotools-build-system?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).We're capturing video from phones using Blackmagic Intensity Pro cards and we've noticed that when capturing from a Samsung Galaxy Nexus, bmdcapture's memory usage will grow slowly (after 2 minutes of recording, it gets to about 1GB of resident memory usage).
In comparison, an iPhone 5 will sit at around 120MB of resident memory usage (it does seem to grow, but very slowly and we're talking maybe 1MB a minute).
Is there something with the Galaxy Nexus' HDMI output that would be causing this? They're both outputing at 720p 60 fps.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/942864-memory-leak-when-capturing-from-certain-sources?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).The Decklink driver is using core foundation internally and CFString in the interface while the Linux version uses char* to deliver the same information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.