Skip to content

Instantly share code, notes, and snippets.

@philcrump
Last active December 15, 2015 00:39
Show Gist options
  • Save philcrump/5174347 to your computer and use it in GitHub Desktop.
Save philcrump/5174347 to your computer and use it in GitHub Desktop.
BATC.tv streaming with ffmpeg
#!/bin/bash
# video: ~300kbps flv 720x560 10fps
# audio: 32kbps aac mono 11.025KHz
while true; do
ffmpeg -f video4linux2 -i /dev/video1 -itsoffset 1.0 -f alsa -i pulse -acodec libfdk_aac -ac 1 -b:a 32k -ar 11025 -f flv -s 720x560 -r 10 -b:v 256k "rtmp://fms.batc.tv/live/xxxxxxx/xxxxxxx flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
sleep 1;
done
# video: ~150kbps h.264 640x480 10fps
# audio: 32kbps aac mono 11.025KHz
#while true; do
# ffmpeg -f video4linux2 -i /dev/video1 -itsoffset 1.0 -f alsa -i pulse -acodec libfdk_aac -ac 1 -ab 32k -ar 11025 -f flv -vcodec libx264 -s 640x480 -crf 30 -preset veryfast -r 10 -b:v 128k -y "rtmp://fms.batc.tv/live/xxxxxxx/xxxxxxx flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)";
# sleep 1;
#done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment