Skip to content

Instantly share code, notes, and snippets.

View thejasonfisher's full-sized avatar

Jason Fisher thejasonfisher

View GitHub Profile
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
@thejasonfisher
thejasonfisher / build_and_install_gstreamer.sh
Created August 2, 2023 18:49 — forked from J-Rojas/build_and_install_gstreamer.sh
Gstreamer build on Nvidia jetson platform
#!/bin/bash
cwd="$(realpath $( cd "$(dirname "$0")" ; pwd -P )/.. )"
cd $cwd
function usage() {
echo "usage: [PATH FOR BUILD FOLDER] [GSTREAMER VERSION] [INSTALLATION_PATH] [PATH TO NVIDIA LIBRARIES]"
}
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1
[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://../data/towncentre.mp4
num-sources=1
@thejasonfisher
thejasonfisher / deepstream 6.1_ubuntu20.04 installation.md
Created August 30, 2023 06:14 — forked from bharath5673/deepstream 6.1_ubuntu20.04 installation.md
NVIDIA DeepStream SDK 6.1 / 6.0.1 / 6.0 configuration for YOLO-v5 & YOLO-v7 models

Steps to install Deepstream-6.1 on Ubuntu_20.04-LTS, Run YOLO and YOLO.py


Alt Text

***Needed Ubuntu-20 and nvidia driver 510

Step 1: Install Cuda 11.6


wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-60
@thejasonfisher
thejasonfisher / Cheatsheet-CONTENT_STREAM_PRODUCTION.md
Created August 30, 2023 23:39 — forked from frank-dspeed/Cheatsheet-CONTENT_STREAM_PRODUCTION.md
Cheatsheet Conten Production Streaming Linux Virtual Desktop Webcam

Linux Video

ffmpeg - is the default standard for video operations of all kind

drawtext filter

If you just want to update some text on the screen the easiest method is to use the drawtext filter with the textfile and reload options.

ffmpeg -i input -vf "drawtext=textfile=songs.txt:reload=1" output songs.txt will be reloaded once per frame. Be sure to update it atomically, or it may be read partially, or even fail.

overlay filter

@thejasonfisher
thejasonfisher / gist:38b6ba5dd89bcbeb76a97ee2dea39057
Created September 14, 2023 17:50 — forked from bsenftner/gist:ba3d493fa36b0b201ffd995e8c2c60a2
libav modification of libavformat/utils.c providing support for unexpected stream termination in live RTSP or similar video streams.
// Inside the file libavformat/utils.c is the routine "int av_read_frame(AVFormatContext *s, AVPacket *pkt)", one of the key routines
// used to play video streams through FFMPEG's libav. This routine does not handle the situation when a live stream terminates
// unexpectedly, such as the unplugging of a network connection, power loss to a camera, or other reasons an established connection
// would unexpectedly stop delivering packets.
// Below is the beginning of av_read_frame() up to and a bit past the three added lines necessary to support calling of the installed
// avformat interrupt callback. The conventional libav behavior is to call the avformat interrupt callback while establishing a new
// connection with a live stream. It is not called while the stream is playing, therefore no opportunity is provided to the client
// software to recognise unexpected stream termination.
// The three lines are added to the code pasted below. They should be easy to identify:
@thejasonfisher
thejasonfisher / video_udp.py
Created September 14, 2023 19:21 — forked from patrickelectric/video_udp.py
Get video from gstreamer udp with python and visualize with OpenCV
#!/usr/bin/env python
import cv2
import gi
import numpy as np
gi.require_version('Gst', '1.0')
from gi.repository import Gst
@thejasonfisher
thejasonfisher / get_ip_address.py
Created September 14, 2023 19:39 — forked from EONRaider/get_ip_address.py
Get the IP address of a network interface in Python 3
#!/usr/bin/env python3
# https://gist.github.com/EONRaider/3b7a8ca433538dc52b09099c0ea92745
__author__ = 'EONRaider, keybase.io/eonraider'
import fcntl
import socket
import struct
try:
from netifaces import AF_INET, ifaddresses