kalturadl/dlm3u8.sh
2025-04-25 02:26:56 -07:00

6 lines
257 B
Bash

#!/usr/bin/env bash
if [ "$#" -ne 2 ] ; then
echo "USAGE: $0 <m3u8_url> <output.mkv>"; exit
fi
base=$(echo "$1" | rev | cut -d'/' -f2- | rev)
curl -s "$1" | grep -v "^#" | sed -e "s>^>$base/>" | xargs curl -s | ffmpeg -i pipe:0 -c:v copy -c:a copy "$2"