Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@Bioblaze
Bioblaze / shell.sh
Created June 26, 2020 05:24 — forked from valentineus/shell.sh
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
@Bioblaze
Bioblaze / ffmpeg_frames.sh
Created June 26, 2020 05:24 — forked from loretoparisi/ffmpeg_frames.sh
Extract all frames from a movie using ffmpeg
# Output a single frame from the video into an image file:
ffmpeg -i input.mov -ss 00:00:14.435 -vframes 1 out.png
# Output one image every second, named out1.png, out2.png, out3.png, etc.
# The %01d dictates that the ordinal number of each output image will be formatted using 1 digits.
ffmpeg -i input.mov -vf fps=1 out%d.png
# Output one image every minute, named out001.jpg, out002.jpg, out003.jpg, etc.
# The %02d dictates that the ordinal number of each output image will be formatted using 2 digits.
ffmpeg -i input.mov -vf fps=1/60 out%02d.jpg
@Bioblaze
Bioblaze / youtube-gif.sh
Created June 26, 2020 05:24 — forked from hubgit/youtube-gif.sh
Convert a section of a YouTube video to an animated GIF
#!/bin/bash
# brew install x265
# brew install ffmpeg
# brew install youtube-dl
# brew install imagemagick
ID='U65_uY5N2WM' # YouTube video ID, i.e. https://www.youtube.com/watch?v={ID}
# fetch the video file with youtube-dl
@Bioblaze
Bioblaze / radiko.sh
Created June 26, 2020 05:24 — forked from soramugi/radiko.sh
radikoをlinuxで聞いたり録音したりするやつ
#!/bin/bash
# https://mtunn.wordpress.com/odroid-u2★セットアップ/radikoの録音・再生(archlinux)/
pid=$$
wkdir='/var/tmp'
playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf
playerfile="${wkdir}/player.swf"
keyfile="${wkdir}/authkey.png"
auth1_fms="${wkdir}/auth1_fms_${pid}"
auth2_fms="${wkdir}/auth2_fms_${pid}"
@Bioblaze
Bioblaze / mp4-cover-image-create.sh
Created June 26, 2020 05:23 — forked from codecreate-dev/mp4-cover-image-create.sh
Create image covers from mp4 vids in a for loop
for vid in *.mp4; do ffmpeg -i $vid -codec mjpeg -ss 4 -vframes 1 -q:v 1 ./covers/$vid.jpg; done
@Bioblaze
Bioblaze / stitch.sh
Created June 26, 2020 05:23 — forked from carylee/stitch.sh
Generate a virtual quartet video
#!/bin/bash
ffmpeg -y \
-ss 5 -i "elisabeth.mp4" \
-ss 0 -i "ryan.MOV" \
-ss 7.5 -i "cary.mp4" \
-ss 2.9 -i "jackie.MOV" \
-ss 9 -i "tess.MOV" \
-ss 9 -i "Water River Spirit Grace.m4a" \
-filter_complex " \
[0:v] setpts=PTS-STARTPTS, crop=608:720:in_w/2-out_w/2+100:100, scale=912:1080 [v0]; \
@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 \
@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 / 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 / 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