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.
sudo apt-get install ficy ffmpeg ezstream
| #! /bin/bash | |
| VBR="1500k" | |
| FPS="30" | |
| QUAL="veryfast" | |
| YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" | |
| KEY="" | |
| VIDEO_SOURCE="/home/ubuntu/video3.mp4" |
| if [[ "$1" == *.mp4 ]] | |
| then | |
| /Users/me/bin/togif "$1" | |
| fi | |
| if [[ "$1" == *.png ]] | |
| then | |
| /Users/me/bin/topic "$1" | |
| fi |
| #!/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 |
| ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |
| 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 |
demo mode: hides your notifications, fixed clock, full battery, wifi level)captures directory. Also to your clipboard, so it's ready for Pastescreenshot.shchmod +x screenshot.sh| #!/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 |
| raspberry pi livestream to YouTubeLive | |
| /boot/run.sh | |
| /boot/youtube.sh | |
| /etc/rc.local | |
| additional line to /etc/fstab |
| #! /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 \ |