Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@Bioblaze
Bioblaze / mp4-to-mp3-extractor.sh
Created June 26, 2020 05:26 — forked from dimon4ezzz/mp4-to-mp3-extractor.sh
the script extracts mp4 files to compressed mp3 audio
#!/bin/bash
# all mp4 files in this directory
for file in ./*.mp4; do
# create new mp3 name
audio="${file%.mp4}.mp3"
# if .mp4 is file and .mp3 does not exists
if [ -f $file ] && [ ! -e $audio ]; then
# ffmpeg will convert mp4 to mp3 with the strongest compressing (-q:a 9)
# will show only panic logs
ffmpeg -hide_banner -loglevel panic -i $file -vn -codec:a libmp3lame -q:a 9 $audio
@Bioblaze
Bioblaze / README.md
Created June 26, 2020 05:26 — forked from Ghedeon/README.md
Screenshot & Recorder

1. Screenshot

Description (no more than one connected device):

  1. Sets device in demo mode: hides your notifications, fixed clock, full battery, wifi level)
  2. Takes a screenshot and saves it into captures directory. Also to your clipboard, so it's ready for Paste
  3. Exits demo mode

Usage:

  1. Download screenshot.sh
  2. chmod +x screenshot.sh
@Bioblaze
Bioblaze / _README.md
Created June 26, 2020 05:26 — forked from kfatehi/_README.md
Rebroadcasting an icecast stream to another icecast server with inline transcoding

What?

A one-liner that pulls an AAC stream, pipes it into ffmpeg which transcodes it to mp3, then pipes it into ezstream with your settings (in the xml file) which streams it your radio.

Dependencies

sudo apt-get install ficy ffmpeg ezstream

@Bioblaze
Bioblaze / ffmpeg-add-voiceover.sh
Created June 26, 2020 05:25 — forked from rileyjshaw/ffmpeg-add-voiceover.sh
Quick one-liner to merge audio narration with a video
ffmpeg -i narration.mp3 -i original.mp4 -filter_complex "[0:a][1:a]amerge,pan=stereo|c0<c0+c2|c1<c1+c3[a]" -map 1:v -map "[a]" -c:v copy -c:a aac -shortest output.mp4
@Bioblaze
Bioblaze / generate-silence.sh
Created June 26, 2020 05:25 — forked from daz/generate-silence.sh
Generate a silent AAC audio with ffmpeg
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a
@Bioblaze
Bioblaze / make_animation.sh
Created June 26, 2020 05:25 — forked from tkarna/make_animation.sh
Script to generate an mp4 video file from still images
#!/bin/bash
# generate mp4 animaition from still images with ffmpeg.
if [ $# != 2 ]; then
echo "Usage: $(basename "$0") \"image/file/pattern_*.png\" output.mp4"
exit -1
fi
pattern=$1
outputfile=$2
@Bioblaze
Bioblaze / convert-media.sh
Created June 26, 2020 05:25 — forked from mderazon/convert-media.sh
convert images and videos screenshots to something that's nice to paste in github
if [[ "$1" == *.mp4 ]]
then
/Users/me/bin/togif "$1"
fi
if [[ "$1" == *.png ]]
then
/Users/me/bin/topic "$1"
fi
@Bioblaze
Bioblaze / broadcast.sh
Created June 26, 2020 05:25 — forked from BusterNeece/broadcast.sh
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"

Compile NGINX with RTMP and setup Multi-Streaming

These Scripts will install NGINX with the RTMP Module in the usual directories similar to installation with apt-get.

The RTMP-Server you get with this can then be used to do one ore more of the following:

  • deliver streams in a local network
  • deliver streams to websites similar to youtube
  • transcode rtmp streams to hls video
  • publish to multiple streaming providers
  • record livestreams to a harddrive
@Bioblaze
Bioblaze / ffmpeg.sh
Created June 26, 2020 05:24 — forked from TonyChangho/ffmpeg.sh
ffmpeg cheat sheet
# Encode a video in H.264 with a constant rate factor of 0 (visually non-lossy), run it through a filter for deinterlacing (Weston
# Three-Field), and do not re-encode the audio
ffmpeg -i input.mkv -c:v libx264 -crf 0 -filter:v w3fdif -c:a copy output_edit-x264-crf0-w3fdif.mkv
# H.264 video at an average bitrate of 25MB/s, and just copy the audio
# - `-an` disables audio on first pass
# - `-y` automatically overwrites an existing output file, but don't worry since it's /dev/null on the first pass
ffmpeg -y -i input.mkv -c:v libx264 -b:v 25000k -pass 1 -an -f mp4 /dev/null && \
ffmpeg -i input.mkv -c:v libx264 -b:v 25000k -pass 2 -c:a copy output_edit-x264-abr25000.mkv