Skip to content

Instantly share code, notes, and snippets.

@qiaolevip
Created March 10, 2017 03:54
Show Gist options
  • Save qiaolevip/f847b06599a64bca6e9eda4dd613f844 to your computer and use it in GitHub Desktop.
Save qiaolevip/f847b06599a64bca6e9eda4dd613f844 to your computer and use it in GitHub Desktop.
Convert m3u8 to MP4 with FFMPEG
#!/usr/bin/env bash
# http://stackoverflow.com/a/32537953/1766716
# ffmpeg -i http://.../playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
url=$1
filenameext=$(basename "$url")
filename="${filenameext%.*}"
videofile=$filename.mp4
echo $filename
ffmpeg -i $url -c copy -bsf:a aac_adtstoasc $videofile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment