Skip to content

Instantly share code, notes, and snippets.

ffmpeg 4.4 with NDI

This patch adds libndi_newtek to last ffmpeg version, and fix timecode related issues that produces wrong PTS/DTS timestamps that seems to happen with newer NDI SDKs.

changes

  • Updated libndi methods by newer versions (v2/v3)
  • Calculating PTS/DTS from timestamp instead of timecode, that is optionally sent by the sender.
diff --git a/daemon/interface.cpp b/daemon/interface.cpp
index fa23019..90dd8e8 100644
--- a/daemon/interface.cpp
+++ b/daemon/interface.cpp
@@ -102,7 +102,7 @@ int get_interface_index(const std::string& interface_name) {
struct ifreq ifr;
ifr.ifr_addr.sa_family = AF_INET;
strncpy(ifr.ifr_name, interface_name.c_str(), IFNAMSIZ - 1);
- if (ioctl(fd, SIOCGIFADDR, &ifr) < 0) {
+ if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
@calanor
calanor / README.md
Created April 21, 2021 10:50 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Raspbian Stretch

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites