Skip to content

Instantly share code, notes, and snippets.

@afriza
afriza / install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Last active May 3, 2024 18:37
Compiling and installing `ffmpeg` with Decklink SDK on Ubuntu 18.04 Server. Check out forks of this gist for more up-to-date info.
@garoto
garoto / ffmpeg-hevc-encode-nvenc.md
Created July 10, 2017 17:15
This gist shows you how to encode specifically to HEVC with ffmpeg's NVENC on supported hardware, with a two-pass profile and optional CUVID-based hardware-accelerated decoding.

Encoding high-quality HEVC content with FFmpeg - based NVENC encoder on supported hardware:

If you've built ffmpeg as instructed here on Linux and the ffmpeg binary is in your path, you can do fast HEVC encodes as shown below, using NVIDIA's NPP's libraries to vastly speed up the process.

Now, to do a simple NVENC encode in 1080p, (that will even work for Maxwell Gen 2 (GM200x) series), start with:

ffmpeg  -i <inputfile>  \
-filter:v hwupload_cuda,scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos,hwdownload \

-c:v hevc_nvenc -profile main -preset slow -rc vbr_hq \

@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@Piasy
Piasy / install_ffmpeg.sh
Last active April 14, 2024 05:40
brew install ffmpeg with all options
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
@stoyanovgeorge
stoyanovgeorge / change_vlan_ip_mask.bat
Last active April 13, 2024 20:11
A batch script for Windows 10 which can change the IP address, the network mask, the gateway, the DNS and the VLAN ID of an interface. You need to execute the script with admin rights.
@echo off
:: Configuration Variables
set "ifName=Ethernet 2"
set ipAddress=10.88.167.35
set subnetMask=255.255.255.240
set vlanID=702
:: set defaultGateway=x.x.x.x
:: set primaryDNS=x.x.x.x
:: set alternateDNS=x.x.x.x
@reinzor
reinzor / stream_example.md
Last active April 1, 2024 13:36
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

@hz37
hz37 / ffmpeg.txt
Last active January 20, 2024 17:49
ffmpeg examples Hens Zimmerman
# MacOS shell script om alle wav bestanden in een dir te checken op EBU loudness in LUFS. Don't forget to chmod +x
#!/bin/bash
for f in *.wav
do
echo "$f"
ffmpeg -i "$f" -af ebur128=framelog=verbose -f null - 2>&1 | awk '/I:/{print $2}'
done
@44213
44213 / ffmpeg-commands.sh
Created September 17, 2021 19:51 — forked from rowe-morehouse/ffmpeg-commands.sh
ffmpeg commands.
# 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: