#!/usr/bin/env bash | |
# We assume ffmpeg installed (recommened v 4+) | |
# Acts as RMTP server for application named live (expects stream) | |
# transcodes the media data into h264-aac, craetes HLS 4s chunks, | |
# and sends the data to ~/origin | |
# Create 1 rendition1 | |
# 854x480@30fps 1000Kbps (+ Overlay) |
#!/bin/bash | |
# play YUV444 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ | |
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \ | |
videoconvert ! \ | |
autovideosink | |
# play YUV422 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ |
#!/bin/bash | |
# Sample script to encode 6 bitrates with TC overlay. | |
# | |
FRAME_RATE=25 | |
FRAME_SEP=\: | |
FONT=/path/to/fonts/OpenSans-Bold.ttf | |
decklink_opts="-format_code Hi50 -channels 2 -f decklink -threads 0" | |
encoder="h264_nvenc" |
- Download Desktop Video (driver) & Desktop Video SDK from https://www.blackmagicdesign.com/support/family/capture-and-playback
- Install Desktop Video (driver)
tar -xf Blackmagic_Desktop_Video_Linux_*.tar cd Blackmagic_Desktop_Video_Linux_*/deb/x86_64/ sudo dpkg -i desktopvideo_*.deb sudo apt-get install -f BlackmagicFirmwareUpdater status # if prompted to update, perform an update:
Follow the ffmpeg compilation guide here: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
copy "lib" and "include" directories from NDI sdk to ffmpeg_sources/ndi
use this modified build command:
cd ~/ffmpeg_sources && wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && tar xjvf ffmpeg-snapshot.tar.bz2 && cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include -I$HOME/ffmpeg_sources/ndi/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -L$HOME/ffmpeg_sources/ndi/lib/x86_64-linux-gnu" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfreetype --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libndi_newtek --enable-nonfree && PATH="$HOME/bin:$PATH" make -j4 && make install && hash -r
(I omitted some libraries I do not need, --enable what suits you better)
#!/bin/bash | |
# | |
# Copyright (c) 2015 - 2018 imm studios, z.s. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
#!/bin/bash | |
stream="" | |
recording_dir=$HOME/recordings | |
while [[ ! $stream =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9] ]]; | |
do | |
echo "Please enter a valid multicast address and port in the format: IP.AD.DR.ESS:PORT after the script name!" | |
read -r stream | |
done |
class Ffmpegdecklink < Formula | |
desc "FFmpeg with --enable-decklink" | |
homepage "https://ffmpeg.org/" | |
url "https://ffmpeg.org/releases/ffmpeg-4.0.tar.xz" | |
sha256 "ed945daf40b124e77a685893cc025d086f638bc703183460aff49508edb3a43f" | |
head "https://github.com/FFmpeg/FFmpeg.git" | |
keg_only "anything that needs this will know where to look" | |
option "with-chromaprint", "Enable the Chromaprint audio fingerprinting library" | |
option "with-fdk-aac", "Enable the Fraunhofer FDK AAC library" |