Skip to content

Instantly share code, notes, and snippets.

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@sfahadshahzad
sfahadshahzad / encoding-video.md
Created January 23, 2019 11:57 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@sfahadshahzad
sfahadshahzad / ffmpeg-to-vmix.png
Created August 31, 2019 13:15 — forked from mhanney/ffmpeg-to-vmix.png
Stream webcam and audio source from PC to remote IP address using mpegts encapsulation and encoded with h264 and aac
ffmpeg-to-vmix.png
I was able to find a VERY QUICK AND DIRTY way to use the media-autobuild suite to compile my own 64-bit static FFmpeg for Windows with the NDI library.
Download it and extract to a place on your computer, and keep note of the path. I put it in "D:\ndi\media-autobuild_suite-master", so for the sake of these instructions when you see "<autobuild>", you need to substitute whatever path you've put it in.
During the initial setup process, request to use the static build and add whatever else you'd like to have in your ffmpeg, then pause what you're doing when the on-screen prompts tell you the ffmpeg_options file has been written, then go into <autobuild>\build\ffmpeg_options.txt and add somewhere a line with
Code:
--enable-libndi_newtek
@sfahadshahzad
sfahadshahzad / install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Created August 31, 2019 17:02 — forked from afriza/install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Compiling and installing `ffmpeg` with Decklink SDK on Ubuntu 18.04 Server
@sfahadshahzad
sfahadshahzad / kivy_decklink.py
Created February 22, 2022 01:47 — forked from cbenhagen/kivy_decklink.py
Example of using input from a Blackmagic Decklink or Ultrastudio card in kivy with the use of OpenCV and GStreamer.
@sfahadshahzad
sfahadshahzad / hevc-test-pattern.bat
Created July 30, 2022 19:11 — forked from m1tk4/hevc-test-pattern.bat
HEVC Test Pattern to UDP Multicast
@echo off
:: Set duration in seconds
set duration=10
:: Temporary loop TS file to create
set loopfile=loop.mkv
:: Target mpegts URL (ESCAPE &s with ^!!! and add double quotes)
:: see https://www.ffmpeg.org/ffmpeg-protocols.html#udp for full syntax
set "target=udp://239.0.0.1:1234?ttl=13^&pkt_size=1316"
@sfahadshahzad
sfahadshahzad / hls_to_sdi.sh
Created September 17, 2022 22:06 — forked from max-verem/hls_to_sdi.sh
hls to sdi
#!/bin/bash
ffmpeg \
-i "http://live.m2.tv:80/hls/stream.m3u8" \
-vf "scale=720:576,fps=fps=25,setdar=dar=16/9,format=pix_fmts=uyvy422" \
-af "aresample=48000" -ac 2 \
-f decklink -y "DeckLink Mini Monitor" \
-acodec copy -vcodec copy \
-f mpegts \
-y "udp://239.1.100.2:10480?localaddr=10.1.5.57&pkt_size=1316&fifo_size=1000000" \
@sfahadshahzad
sfahadshahzad / config
Last active May 19, 2023 12:41 — forked from trickkiste/config
obe_sd
#!/bin/bash
NAME=obe_sd
screen -d -m -S $NAME obecli
sleep 2
screen -p 0 -S $NAME -X stuff $'set input decklink\012'
screen -p 0 -S $NAME -X stuff $'set input opts card-idx=3\012'
screen -p 0 -S $NAME -X stuff $'set input opts video-format=pal\012'
screen -p 0 -S $NAME -X stuff $'probe input\012'