Created
June 12, 2017 16:25
-
-
Save narate/421785a3dc0bde4e6300d7dc310f5d86 to your computer and use it in GitHub Desktop.
Facebook live downloader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "Usage : $0 url [output]" | |
exit | |
fi | |
VID=$(basename $1) | |
if [ $# -ge 2 ] | |
then | |
OUTPUT=$2 | |
else | |
TITLE=$(youtube-dl -e $1) | |
if [ $? -ne 0 ] | |
then | |
exit | |
fi | |
OUTPUT=$TITLE-$VID-$(date +%Y%m%d%H%M%S).mp4 | |
fi | |
echo Saving file to "\"$OUTPUT\"" | |
ffmpeg -hide_banner -v quiet -stats -i "https://www.facebook.com/video/playback/playlist.m3u8?v=$VID" -c copy "$OUTPUT" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment