echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
Example final command
ffmpeg -i "http://host/folder/file.m3u8" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4
If you just want play the stream and watch it once, I agree it is! But then you might as well use mpv or VLC to play the stream. I figure people finding this gist want to download the stream and keep the media around for later viewing too.