Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@Bioblaze
Bioblaze / piobsinstaller.sh
Created June 26, 2020 05:31 — forked from shivasiddharth/piobsinstaller.sh
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
@Bioblaze
Bioblaze / compile-ffmpeg.sh
Created June 26, 2020 05:29 — forked from wildrun0/compile-ffmpeg.sh
Compiling ffmpeg for Raspberry Pi 4
#!/bin/bash
# Note that there's no libdrm because this lib cause errors
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install \
autoconf \
automake \
build-essential \
@Bioblaze
Bioblaze / update-ffmpeg-rpi.sh
Created June 26, 2020 05:29 — forked from enzanki-ars/update-ffmpeg-rpi.sh
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# Compile and install/update (or install via Apt) FFmpeg Codecs
# Compile and install/update FFmpeg suite
# Compile with hardware acceleration
# Modified from https://retroresolution.com/compiling-ffmpeg-from-source-code-all-in-one-script/
echo "Begining Installation of FFmpeg Suite"
#Update APT Repository
echo "Updating the APT repository information"
@Bioblaze
Bioblaze / hdmi-capture.sh
Created June 26, 2020 05:27 — forked from ericpruitt/hdmi-capture.sh
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##*/}"
@Bioblaze
Bioblaze / geninterruption.bash
Created June 26, 2020 05:27 — forked from chezsick/geninterruption.bash
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
@Bioblaze
Bioblaze / ffmpeg-wrapper
Created June 26, 2020 05:27 — forked from inksong/ffmpeg-wrapper
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
@Bioblaze
Bioblaze / FFmpeg-tricks.md
Created June 26, 2020 05:27 — forked from isaactzab/FFmpeg-tricks.md
FFmpeg on ubuntu

FFmpeg Tricks

Repeat/loop Input Video

The -loop option is specific to the image file demuxer and gif muxer, so it can't be used for typical video files, but you can use the concat demuxer.

Concat demuxer

Make a text file. Contents of an example text file to repeat 4 times.

$ cat list.txt
file 'input.mp4'
@Bioblaze
Bioblaze / compile_ffmpeg.md
Created June 26, 2020 05:27 — forked from teocci/compile_ffmpeg.md
Compile FFmpeg on Ubuntu 16.04

Compile FFmpeg on Ubuntu

This basic guide supports Ubuntu Xenial Xerus 16.04 and will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide][1].

Note: Copy and paste the whole code box for each step.

Preparation

#! /bin/bash -x
VBR="2500k"
FPS="30"
QUAL="medium"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
SOURCE="rtsp://xxx.xxx.xxx:554/Streaming/Channels/1"
KEY="xxxxxxxxxxxxxxxx.xxx-xxx-qms4-emuc"
#ffmpeg \
raspberry pi livestream to YouTubeLive
/boot/run.sh
/boot/youtube.sh
/etc/rc.local
additional line to /etc/fstab