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 run this exact command on newer FFMPEG versions you'll probably get an error about something not being on the whitelist:
protocol https not on whitelist
Modify the command to use this instead
Tested with FFMPEG versions 5.0 and newer