Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
# example of using xargs to find files and sending files to a shell command with complicated file parsing
ls *mp4 | xargs -I{} sh -c 'base=$(basename $1 .mp4) ; ffmpeg -i "$1" -vcodec copy -an "${base}"_noaudio.mp4' -- {}
@Bioblaze
Bioblaze / imageaudio2mp4
Created June 26, 2020 05:23 — forked from sharapeco/imageaudio2mp4
画像と音声からMP4動画を作る
#!/bin/sh
### 画像と音声からMP4動画を作る
# なんでかわからんけどこれで順番に引数が入る
image=$1
shift
audio=$*
# shift
# dai_3_no_hikisuu=$*
@Bioblaze
Bioblaze / images_to_video.sh
Created June 26, 2020 05:23 — forked from m4nh/images_to_video.sh
#ffmpeg #video from #images
# Create from folder
ffmpeg -framerate 1 -pattern_type glob -i '/tmp/ciao/*.png' -c:v libx264 -r 30 -pix_fmt yuv420p /tmp/out.mp4
# Repeat video until CTRL+c (is very dense! )
ffmpeg -stream_loop -1 -i /tmp/out.mp4 -c copy /tmp/out_repeat.mp4
@Bioblaze
Bioblaze / gist:385c81949f4f217aed5a2c94ae6cbb61
Created June 26, 2020 05:23 — forked from alexjpaz/gist:de25c83d69e597e311602ffaa7d16f06
ffmpeg with audio with visualization on top of an image with text
#!/bin/bash
ffmpeg \
-y \
-i input.wav \
-i paz.png \
-filter_complex "\
[1:v]scale=-1:480:flags=neighbor,loop=size=2:loop=-1[fg];
[0:a]showcqt=s=1280x720:axis_h=0:sono_h=0:basefreq=27.5:endfreq=1000.0[v];
[fg]drawtext=text='Primitive Rule':fontcolor=white:fontsize=72:font=Bebas Neue:x=(w-text_w)/2:y=(h-text_h)/2[fg];
@Bioblaze
Bioblaze / audio-video-manipulation.md
Created June 26, 2020 05:23 — forked from garcon/audio-video-manipulation.md
This is a collection of command line one-liners for manipulating with audio and video files
@Bioblaze
Bioblaze / ffmpeg.sh
Created June 26, 2020 05:23 — forked from chrisstubbs93/ffmpeg.sh
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
@Bioblaze
Bioblaze / record.sh
Created June 26, 2020 05:23 — forked from BonsaiDen/record.sh
Record from Virtual Frame Buffer via ffmpeg
xvfb-run -s "-screen 0 1280x800x16" -e /dev/stdout -a /home/ivo/Desktop/foo.sh
./ffmpeg -r 30 -f x11grab -draw_mouse 0 -s 1280x800 -i :99 -c:v libvpx -quality realtime -cpu-used 0 -b:v 384k -qmin 10 -qmax 42 -maxrate 384k -bufsize 1000k -an screen.webm
# foo.sh
google-chrome --incognito --window-size=1280,800 --app=http://github.com
@Bioblaze
Bioblaze / nginx_vod.sh
Created June 26, 2020 05:23 — forked from Domin8-IPTV/nginx_vod.sh
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
@Bioblaze
Bioblaze / make247.sh
Created June 26, 2020 05:23 — forked from Domin8-IPTV/make247.sh
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
@Bioblaze
Bioblaze / stream.sh
Created June 26, 2020 05:23 — forked from Enweave/stream.sh
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 \