Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@valentineus
valentineus / shell.sh
Created June 1, 2020 10:16
Convert video file to audio file
ffmpeg -i filename.ogg -vn -c:a libopus -ar 16k -ac 1 -b:a 16k -vbr on -compression_level 10 new_filename.ogg
@rileyjshaw
rileyjshaw / ffmpeg-add-voiceover.sh
Created May 30, 2020 01:19
Quick one-liner to merge audio narration with a video
ffmpeg -i narration.mp3 -i original.mp4 -filter_complex "[0:a][1:a]amerge,pan=stereo|c0<c0+c2|c1<c1+c3[a]" -map 1:v -map "[a]" -c:v copy -c:a aac -shortest output.mp4
@tkarna
tkarna / make_animation.sh
Last active May 31, 2021 18:46
Script to generate an mp4 video file from still images
#!/bin/bash
# generate mp4 animation from still images with ffmpeg.
if [ $# != 2 ]; then
echo "Usage: $(basename "$0") \"image/file/pattern_*.png\" output.mp4"
exit -1
fi
pattern=$1
outputfile=$2
@shivasiddharth
shivasiddharth / piobsinstaller.sh
Last active January 24, 2023 04:46
Script for installing OBS on Raspberry Pi
#!/bin/bash
echo ""
echo "Checking memory size.........."
Totalmem=$(cat /proc/meminfo|grep MemTotal|grep -o '[0-9]*')
if (($Totalmem > 3500000)); then
echo ""
echo "You have got enough memory. No need for a swap partition.........."
echo ""
else
@garcon
garcon / audio-video-manipulation.md
Last active February 18, 2022 08:04
This is a collection of command line one-liners for manipulating with audio and video files
@dimon4ezzz
dimon4ezzz / mp4-to-mp3-extractor.sh
Created May 26, 2020 11:44
the script extracts mp4 files to compressed mp3 audio
#!/bin/bash
# all mp4 files in this directory
for file in ./*.mp4; do
# create new mp3 name
audio="${file%.mp4}.mp3"
# if .mp4 is file and .mp3 does not exists
if [ -f $file ] && [ ! -e $audio ]; then
# ffmpeg will convert mp4 to mp3 with the strongest compressing (-q:a 9)
# will show only panic logs
ffmpeg -hide_banner -loglevel panic -i $file -vn -codec:a libmp3lame -q:a 9 $audio
@noelli
noelli / 1 NGINX RTMP-Server Setup for local Streams.md
Last active January 10, 2025 19:21
Compile NGINX with RTMP and setup Multi-Streaming

Compile NGINX with RTMP and setup Multi-Streaming

These Scripts will install NGINX with the RTMP Module in the usual directories similar to installation with apt-get.

The RTMP-Server you get with this can then be used to do one ore more of the following:

  • deliver streams in a local network
  • deliver streams to websites similar to youtube
  • transcode rtmp streams to hls video
  • publish to multiple streaming providers
  • record livestreams to a harddrive
@Ghedeon
Ghedeon / README.md
Last active June 26, 2020 05:26
Screenshot & Recorder

1. Screenshot

Description (no more than one connected device):

  1. Sets device in demo mode: hides your notifications, fixed clock, full battery, wifi level)
  2. Takes a screenshot and saves it into captures directory. Also to your clipboard, so it's ready for Paste
  3. Exits demo mode

Usage:

  1. Download screenshot.sh
  2. chmod +x screenshot.sh
@TonyChangho
TonyChangho / ffmpeg.sh
Last active June 26, 2020 05:24
ffmpeg cheat sheet
# Encode a video in H.264 with a constant rate factor of 0 (visually non-lossy), run it through a filter for deinterlacing (Weston
# Three-Field), and do not re-encode the audio
ffmpeg -i input.mkv -c:v libx264 -crf 0 -filter:v w3fdif -c:a copy output_edit-x264-crf0-w3fdif.mkv
# H.264 video at an average bitrate of 25MB/s, and just copy the audio
# - `-an` disables audio on first pass
# - `-y` automatically overwrites an existing output file, but don't worry since it's /dev/null on the first pass
ffmpeg -y -i input.mkv -c:v libx264 -b:v 25000k -pass 1 -an -f mp4 /dev/null && \
ffmpeg -i input.mkv -c:v libx264 -b:v 25000k -pass 2 -c:a copy output_edit-x264-abr25000.mkv
@inksong
inksong / ffmpeg-wrapper
Created April 13, 2020 11:43
ink-ffmpeg-wrapper
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log