Install the NVIDIA driver for CUDA and other GPU-related tools:
- Version: nvidia-driver-535
sudo apt update
sudo apt-get install nvidia-driver-535
sudo reboot
#!/bin/sh | |
apt update -y | |
apt-get upgrade -y | |
dpkg-reconfigure tzdata | |
apt install build-essential checkinstall | |
apt install ubuntu-restricted-extras | |
apt install software-properties-common | |
apt upgrade -o APT::Get::Show-Upgraded=true | |
apt-show-versions | grep upgradeable |
Install gstreamer + plugins on one system: | |
gst-launch-1.0 -v mpegtsmux name=mux alignment=1 ! udpsink host=238.0.0.1 port=1234 videotestsrc ! video/x-raw,width=1280,height=720,format=I420 ! x264enc speed-preset=ultrafast bitrate=3000 key-int-max=60 ! video/x-h264,profile=high ! mux. | |
Download and install mediamtx to "receive" the stream sent from gstreamer. | |
https://github.com/bluenviron/mediamtx | |
mediamtx will be used to re-broadcast the stream over webrtc. This can be done on as many systems as seems reasonable for demonstrating multicast. | |
mediamtx.yml config file (note, this file needs to be edited to have the right IPs): | |
-------------------------------------------------- |
from kivy.app import App | |
from kivy.uix.widget import Widget | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.image import Image | |
from kivy.clock import Clock | |
from kivy.graphics.texture import Texture | |
import cv2 | |
import numpy as np |
# iptvscan | |
# Script for scanning and saving IPTV playlist. | |
# Python v.3 required for using. https://www.python.org/downloads/ | |
# Author: joddude <[email protected]> | |
# Disclaimer: | |
# This script is free and provided "as is" without any warranty. | |
# You can use it at your own risk. | |
# The author assumes no responsibility for any moral or material damage caused |
# To extract the sound from a video and save it as MP3: | |
ffmpeg -i <video.mp4> -vn <sound>.mp3 | |
# To convert frames from a video or GIF into individual numbered images: | |
ffmpeg -i <video.mpg|video.gif> <frame_%d.png> | |
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: | |
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif> | |
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: |
FFMPEG based delay loop running in RAM for Blackmagic Decklink video cards. It's useful if you need a "profanity protection" buffer, but could also be used as a poormans instant replay.
The idea behind this is to use exploit ffmpeg's concat filter as an intermediate buffer. The length of the delay line is set by the -t parameter before anullsrc in the example below ((or d after smptehdbars).
In my case I wanted PAL interlaced input and output. If you want to use different framerate change the format using the aproppriate -format_code parameter.
These are some ffmpeg command lines used when developing VHS dubbing controller.
#!/bin/bash
# Stream a PAL 50i capture, cropped and de-interlaced using ffmpeg
FFmpeg build for NVIDIA & Intel hardware on Ubuntu 18.04LTS+:
Build platform: Ubuntu 18.04LTS
Goals: Generate an FFmpeg build that can utilize NVENC hardware acceleration on NVIDIA-based systems on Ubuntu 18.04LTS+.
First steps:
Purge all NVIDIA drivers first:
#!/bin/bash | |
ffmpeg -re -analyzeduration 100M -probesize 100M -stream_loop -1 -i <input_file.ts> \ | |
-vf setdar=16/9 -f decklink -pix_fmt uyvy422 -format_code pal "DeckLink Mini Monitor" |