BlackMagic Declink Card Installation

Go To: https://www.blackmagicdesign.com/support/family/capture-and-playback

Choose the Card from Dropdown List – on Top Right

Note: When the DecLink card is changed to another model, the driver remains the same but need to execute the BlackmagicFirmwareUpdater commands (status/update) for the Linux OS to identify it.

$cd Blackmagic_Desktop_Video_Linux_10.9a7/amd64/deb/
$dpkg -i desktopvideo_*.deb
$apt-get install libgl1-mesa-glx
$apt-get -f install 
$BlackmagicFirmwareUpdater status
$BlackmagicFirmwareUpdater update /dev/blackmagic/io0
$BlackmagicFirmwareUpdater update /dev/blackmagic/io4
$init 6
  • Prequisites:
$apt-get install libavformat-dev libswscale-dev libavresample-dev 
$apt-get install pkgconf cmake yasm libtool libx264-dev
  • Install x264:
git clone https://github.com/qupai/x264.git
# cd x264
# ./configure
# make
# make install
  • x265
# git clone git://github.com/videolan/x265
# cd x265/build
# cmake ../source
# make
# make install
  • fdk-aac
# git clone git://git.code.sf.net/p/opencore-amr/fdk-aac
# cd fdk-aac
# autoreconf -if
# ./configure
# make
# make install
  • opus
# git clone git://git.opus-codec.org/opus.git
# cd opus
# autoreconf -if
# ./configure
# make
# make install
  • libav
# git clone git://github.com/libav/libav
# cd libav
# ./configure --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libfdk-aac
# make -j 8 && make install
Download SDK from https://www.blackmagicdesign.com/support/family/capture-and-playback

Build & Install BMDCapture

# git clone git://github.com/lu-zero/bmdtools
# cd bmdtools
# make SDK_PATH=<path where you unpacked the decklink sdk>/<Target OS>/include

Note: The SDK currently supports Linux and MacOSX. Thus the <Target OS can be either Linux or Mac.

Install BMDCapture
$cp bmdcapture bmdplay /usr/local/bincd /root/Blackmagic_Desktop_Video_Linux_10.9a7/deb/amd64/
$dpkg -i mediaexpress_3.5.3a1_amd64.deb
$apt-get install libatk1.0-0
$apt-get -f install
$dpkg -i mediaexpress_3.5.3a1_amd64.deb
Sample Command to Initiate streaming via wowza:
bmdcapture -C 0 -m 2 -A 2 -c 2  -V 4  -F nut -f pipe:1  | avconv -loglevel warning -i - -async 1 -vsync passthrough -flags +global_header -c:v libx264 -pix_fmt yuv420p -preset:v superfast -tune zerolatency -threads 0  -b:v 700k -minrate 700k -maxrate 700k -bufsize 700k   -r 30 -c:a aac -ar 48000   -strict experimental  -profile:v baseline -f flv rtmp://wowza.abc.com/xyz/123

 

Reference Links

https://coolchevy.org.ua/2010/09/08/decklink-driver-of-blackmagicdesign-on-gentoo-linux/

https://www.blackmagicdesign.com/support

https://www.blackmagicdesign.com/support/download/9d53d0685c754e728c46d6dd57841fc0/Linux

https://www.sitola.cz/igrid/index.php/DeckLink_Setup_(Linux)

https://forum.blackmagicdesign.com/viewtopic.php?f=3&t=92

https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=40854

https://github.com/lu-zero/bmdtools/wiki (Steps are included here)

 

Nginx on Ubuntu

The following are some of the features of Nginx:

* It serves static and index files
* Reverse proxy with caching
* Supports SSL
* Simple load balancing with fault tolerance
* Both name-based and ip-based virtual server can be configured
* HTTP basic authentication
* Supports rewrite module
* Supports gzip, XSLT, SSI and image resizing filters
* All the main mail proxy server features are supported
* and lot more..

During ./configure, you might get the “./configure: error: the HTTP rewrite module requires the PCRE library.” error message about missing PCRE library that is required by nginx http rewrite module.

To solve the problem, either install “pcre” and “pcre-devel” packages on your Linux, or disable the rewrite module by doing “./configure –without-http_rewrite_module”
Prerequsite – #sudo apt-get install libpcre3 libpcre3-dev

Configure Repo:
Follow Instructions on for reference

#apt-get update
#apt-get install nginx

For Source Installation:
#cd /usr/local
Download – http://wiki.nginx.org/Install
#tar xvzf nginx-1.2.3.tar.gz

Building Nginx from Source : go to the unzipped Nginx dir –
./configure –with-http_ssl_module
Nginx will be installed under /usr/local/nginx as shown by the ./configure output.
Compile time options
Example: –with-http_ssl_module

#make
#sudo make install

Change the Default Nginx Listen Port
Nginx is configured to listen by default on port 80. If you are installing this on a machine for testing purpose, that already has an apache server running, you should change the nginx listen port.
Similar to apache’s httpd.conf file, nginx has nginx.conf file located under /usr/local/nginx/conf.
In the server section of nginx.conf, change the port 80 to 8081
#vim  /usr/local/nginx-1.2.3/conf/nginx.conf
change 80 to 80123

Start Nginx Server
#sudo /etc/init.d/nginx start

To stop the nginx server, do the following.
#cd /usr/local/nginx/sbin
./nginx -s stop

or

#sudo /etc/init.d/nginx stop

To view the current version of nginx, do the following:
# ./nginx -v
nginx: nginx version: nginx/1.0.5

To debug issues, view the error.log and access.log files located under /usr/local/nginx/logs
# ls /usr/local/nginx/logs/
access.log
error.log
nginx.pid

More on Nginx —
DocumentRoot equivalent of Apache in Nginx is /usr/local/nginx/html