-
-
Save shakahl/ccd34dc4edd02b351fe5f46605209da4 to your computer and use it in GitHub Desktop.
m3u stream downloader
This file contains hidden or 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 | |
# $1 like https://xxx/vods3/_definst_/smil:box/cdnstore/modules/xxx.smil/chunklist_b400000.m3u8 | |
CURRENT_COURSE_DIR=xxx | |
current=${CURRENT_COURSE_DIR-current} | |
mkdir -p $current/0 | |
next=`ls $current/ | grep -oh '^[0-9]*$' | sed 's/_/ _/' | sort -rn | awk '{printf "%d", $1 + 1; exit}'` | |
mkdir -p $current/$next | |
echo writing $current/$next/video.mpg | |
#cvlc $1 --sout=file/ps:current/$next/video.mpg | |
echo $1 > $current/$next/$next.txt | |
ffmpeg -i $1 -c copy -bsf:a aac_adtstoasc $current/$next/$next.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment