├── LICENSE ├── README.md └── run.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Johan Els 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DECEASED: raspberrypi-FFmpegNDI 2 | 3 | *NDI support in FFmpeg was removed in the FFMPEG source on the 20th of March 2019. 4 | 5 | https://github.com/FFmpeg/FFmpeg/commit/4b32f8b3ebfa011fcc5991bcaa97c3f5b61b49ad 6 | 7 | This is from a license dispute with Newtek ( https://trac.ffmpeg.org/ticket/7589 ) and NDI support has now been removed from FFmpeg. 8 | 9 | I will take these projects offline. 10 | 11 | Apologies for the inconvenience. 12 | 13 | Regards, 14 | 15 | Johan Els * 16 | 17 | Use Raspberry Pi as a NewTek NDI® monitor. Please ensure you register on the NewTek NDI® Software Developer Kit site using https://www.newtek.com/ndi/sdk/ before continuing. 18 | 19 | You will have to run this locally or over ssh on the Raspberry Pi to be able to accept the NewTek NDI® SDK license agreement. 20 | 21 | ## Raspbian Micro SD Image on Mac OS 22 | ```bash 23 | wget https://downloads.raspberrypi.org/raspbian_lite_latest 24 | unzip 25 | diskutil list 26 | diskutil eraseDisk FAT32 RASBIAN /dev/disk(n) 27 | sudo dd bs=1m if=[RASBIAN image file].img /of=/dev/(r)disk(n) conv=sync 28 | ``` 29 | 30 | ## Raspberry Pi SSH server 31 | ```bash 32 | sudo raspi-config 33 | ``` 34 | 35 | ## Graphics 36 | Click the Raspberry Menu | Preferences | Raspberry Pi Configuration | Performance Tab 37 | Change "GPU Memory" to 128 38 | Click OK | Click Yes to reboot 39 | 40 | 41 | ## Additional notes: 42 | ```bash 43 | # Raspberry Pi WiFi 44 | sudo iwlist wlan0 scan | grep ESSID 45 | sudo bash -c 'cat << EOF >> /etc/wpa_supplicant/wpa_supplicant.conf 46 | network={ 47 | ssid="SSID" 48 | psk="PASS" 49 | } 50 | EOF' 51 | 52 | # FFmpeg 53 | ffmpeg -f libndi_newtek -extra_ips "10.10.10.100" -find_sources 1 -i dummy 54 | ffmpeg -re -i /temp/input.mp4 -f libndi_newtek -pix_fmt uyvy422 Sample 55 | ffplay -f libndi_newtek -i "Sample" 56 | ``` 57 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Do updates and upgrades 4 | sudo apt-get -y update 5 | sudo apt-get -y dist-upgrade 6 | sudo apt-get -y upgrade 7 | 8 | # Add avahi for NDI discovery 9 | sudo apt-get install -y avahi-daemon avahi-utils 10 | sudo bash -c 'cat << EOF > /etc/avahi/avahi-daemon.conf 11 | [server] 12 | use-ipv4=yes 13 | enable-dbus=no 14 | ratelimit-interval-usec=1000000 15 | ratelimit-burst=1000 16 | 17 | [wide-area] 18 | enable-wide-area=yes 19 | 20 | [publish] 21 | publish-hinfo=no 22 | publish-workstation=no 23 | 24 | [reflector] 25 | 26 | [rlimits] 27 | EOF' 28 | 29 | # Install dependencies 30 | sudo apt-get install -y \ 31 | autoconf \ 32 | cmake \ 33 | expat \ 34 | git \ 35 | gperf \ 36 | libtool \ 37 | libsdl2-dev \ 38 | yasm \ 39 | zlib1g-dev 40 | 41 | # Make some space 42 | sudo apt-get purge -y python3 python3.5 43 | 44 | # Restart 45 | sudo shutdown -r now 46 | 47 | # NewTek NDI® SDK 48 | mkdir -p /tmp/ndi 49 | cd /tmp/ndi 50 | wget http://new.tk/NDISDKLINUX 51 | chmod 777 NDISDKLINUX 52 | ./NDISDKLINUX 53 | sudo mv "NDI SDK for Linux"/include/* /usr/local/include/ 54 | case $(cat /proc/device-tree/model) in 55 | "Raspberry Pi 1"*) 56 | echo "NewTek NDI® SDK Raspberry Pi 1" 57 | sudo mv "NDI SDK for Linux"/lib/armv6-rpi-linux-gnueabi/* /usr/local/lib/ 58 | ;; 59 | "Raspberry Pi 2"*) 60 | echo "NewTek NDI® SDK Raspberry Pi 2" 61 | sudo mv "NDI SDK for Linux"/lib/armv7-rpi2-linux-gnueabihf/* /usr/local/lib/ 62 | ;; 63 | "Raspberry Pi 3"*) 64 | echo "NewTek NDI® SDK Raspberry Pi 3" 65 | sudo mv "NDI SDK for Linux"/lib/armv8-rpi3-linux-gnueabihf/* /usr/local/lib/ 66 | ;; 67 | *) 68 | echo "I have no clue what we are running on..." 69 | ;; 70 | esac 71 | cd / 72 | rm -rf /tmp/ndi 73 | 74 | # ffmpeg https://ffmpeg.org/ 75 | ```bash 76 | mkdir -p /tmp/ffmpeg 77 | cd /tmp/ffmpeg 78 | curl -sLO https://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2 79 | tar -jx --strip-components=1 -f ./ffmpeg-4.1.tar.bz2 80 | rm ./ffmpeg-4.1.tar.bz2 81 | 82 | ./configure \ 83 | --disable-coreimage \ 84 | --disable-doc \ 85 | --disable-debug \ 86 | --disable-ffprobe \ 87 | --disable-htmlpages \ 88 | --disable-manpages \ 89 | --disable-podpages \ 90 | --disable-securetransport \ 91 | --disable-txtpages \ 92 | --enable-gpl \ 93 | --enable-libndi_newtek \ 94 | --enable-nonfree \ 95 | --extra-cflags="-I/usr/local/include" \ 96 | --extra-ldflags="-L/usr/local/lib" \ 97 | --prefix="/usr/local" 98 | make -j4 99 | make install 100 | make distclean 101 | --------------------------------------------------------------------------------