ストリーミングで動画を配信してるサービスでたまに見かけるm3u8をmp4ファイルに変換した時のメモ
m3u8ファイルってどんなの?
こんなの
https://www.lifewire.com/m3u8-file-2621956
convert m3u8 to mp4
ffmpeg を使います
ffmpeg -protocol_whitelist "file,crypto,http,https,tcp,tls" -i "<ファイル名.m3u8 or URL>" -c copy -bsf:a aac_adtstoasc "<出力ファイル名.mp4>"
ディレクトリ内の全m3u8ファイルを変換する
for m3u8 in *.m3u8; ffmpeg -protocol_whitelist "file,crypto,http,https,tcp,tls" -i "$m3u8" -c copy -bsf:a aac_adtstoasc "${m3u8%%.*}.mp4"