Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
# (tested on Ubuntu 18.04 Desktop)
# Stream your own desktop to RTMP
ffmpeg -f x11grab -s 1920x1200 -framerate 15 -i :0.0 -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -threads 0 -f flv "rtmp://127.0.0.1/live/mystreamkey"
# Broadcasting Examples
ffmpeg -f dshow -i video="Virtual-Camera" -preset ultrafast -vcodec libx264 -tune zerolatency -b 900k -f mpegts udp://127.0.0.1:1234
ffmpeg -f dshow -i video="screen-capture-recorder":audio="Stereo Mix (IDT High Definition" \
@gargolito
gargolito / vid2gif.sh
Last active June 28, 2020 13:15
video to gif with good quality gif and compression
vid2gif() {
file=$(realpath $1)
name=$(basename ${file/.*})
ffmpeg -y -i "${file}" -vf fps=${3:-24},scale=${2:-480}:-1:flags=lanczos,palettegen "${name}.png"
ffmpeg -y -i "${file}" -i "${name}.png" -filter_complex "fps=${3:-24},scale=${2:-480}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${name}".gif
rm "${name}.png"
}
@supershadoe
supershadoe / ytmp.sh
Created June 25, 2020 11:46
A script to play a youtube video or its audio alone in mpv.
#!/bin/sh
# vim:sw=4:ts=4:et
################################################################################
# #
# A shell script which searches youtube for a video or audio #
# and plays it in mpv. #
# Created by Supershadoe #
# #
################################################################################