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 | |
# 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.sh
chmod +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 \ |
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.
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.
Make a text file. Contents of an example text file to repeat 4 times.
$ cat list.txt
file 'input.mp4'