Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@chezsick
chezsick / geninterruption.bash
Last active June 26, 2020 05:27
Create Your Own Interruption! ;;;;;;;;;;; args :::::::::: vid1 vid2 vid3 vid4 vid5 outvid [second_for_countdown] ;;;;;;;;;;;;;;;;;;;;;;;; Inspired By ::::::::::::::::::::: https://www.youtube.com/watch?v=V3qdak_VgqQ
intone=30
inttwo=43
intthree=67
intfour=101
intfive=115
tmp=$(mktemp -d)
ffmpeg -y -t $intone -i "$1" -vf framerate=40,scale=768x576 -vcodec libx264 -an $tmp/one.avi
ffmpeg -y -t $inttwo -i "$2" -vf framerate=40,scale=768x576 -vcodec libx264 -an $tmp/two.avi
@Domin8-IPTV
Domin8-IPTV / nginx_vod.sh
Created September 24, 2019 02:09
ON DEMAND USING NGINX + FFMPEG
#!/bin/bash
###############################
# Here You can Edit Your Data #
###############################
LOG_LOCATION=/tmp
##########################################
##############END EDIT DATA###############
##########################################
txtrst=$(tput sgr0) # Text reset
txtred=$(tput setab 1) # Red Background
@Enweave
Enweave / stream.sh
Created July 9, 2019 17:25
ffmpeg stream rtsp to youtube via rtmp
# your youtube name/key
KEY="1234-5678-9101-1121"
# your rtsp url
RTSP="rtsp://user:[email protected]:1234/cam/etc"
# youtube rtmp url
YTUBE="rtmp://a.rtmp.youtube.com/live2"
ffmpeg \
@Domin8-IPTV
Domin8-IPTV / make247.sh
Created May 23, 2019 17:11
ffmpeg concatenate all media files in the current directory with .mp4 extension
#!/bin/sh
# use ffmpeg to concatenate all the mp4 files in the media directory
# make file executable and run like this
# ./make247.sh /path/to/media/folder
#
IN_DIR="$1";
if [ "$IN_DIR" = '' ] ; then
IN_DIR="."
fi
for f in ${IN_DIR}/*.mp4; do echo "file '$f'" >> concat-list.txt; done
@troyane
troyane / mp42gif.sh
Last active May 22, 2024 17:20
See script and documentation here: https://github.com/troyane/StackOverflow-pro/tree/master/mp42gif Script to convert MP4 file to GIF (via ffmpeg). It creates intermediate custom color palette out of input video file and use it for resulting GIF for better picture quality. For more info see https://superuser.com/a/556031
#!/bin/bash
#
# Script to convert MP4 video to GIF with generation of custom color palette.
#
#=== Do not touch code below
# Inner variables
input_file=""
input_fps="20"
input_height="512"
@chrisstubbs93
chrisstubbs93 / ffmpeg.sh
Last active March 14, 2025 10:51
auto-restart FFMPEG when it stops sending frames to youtube
#!/bin/sh
sleep 5
ffmpeg -re -f mjpeg -r 10 -i "http://localhost/?action=stream" -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 1k -strict experimental -s 640x360 -vcodec h264 -pix_fmt yuv420p -g 20 -vb 500k -preset ultrafast -crf 31 -r 10 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx" 2> /home/pi/ffmpeg.log
raspberry pi livestream to YouTubeLive
/boot/run.sh
/boot/youtube.sh
/etc/rc.local
additional line to /etc/fstab
@ericpruitt
ericpruitt / hdmi-capture.sh
Last active July 17, 2021 20:50
HDMI capture script.
#!/bin/sh
set -e -u
# Base command used to invoke FFmpeg; run "ffmpeg" with as high a priority as
# possible, and minimize its logging output.
FFMPEG="nice -n 20 ffmpeg -loglevel error -hide_banner"
# These control the format of the audio and video.
DEFAULT_VIDEO_EXTENSION="mkv"
SELF="${0##*/}"
@enzanki-ars
enzanki-ars / update-ffmpeg-rpi.sh
Last active December 4, 2023 21:36
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# #########################################################
#
# WW WW AAA RRRRRR NN NN IIIII NN NN GGGG
# WW WW AAAAA RR RR NNN NN III NNN NN GG GG
# WW W WW AA AA RRRRRR NN N NN III NN N NN GG
# WW WWW WW AAAAAAA RR RR NN NNN III NN NNN GG GG
# WW WW AA AA RR RR NN NN IIIII NN NN GGGGGG
#
@daz
daz / generate-silence.sh
Created October 23, 2017 07:25
Generate a silent AAC audio with ffmpeg
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a