ffmpeg -allowed_extensions ALL -protocol_whitelist "file,http,crypto,tcp,tls,https" -i "https://www.baidu.com/test.m3u8" -c copy test.mp4
#!/bin/bash
export targetDir="/Users/huibin/Downloads/VideoData/"
for fileName in $(ls /Users/huibin/Downloads/VideoData); do
if [[ ${fileName:0-5} == '.m3u8' ]]; then # 查找擴展名爲 .py的文件
echo $fileName
`/Users/huibin/ffmpeg/ffmpeg -allowed_extensions ALL -protocol_whitelist "file,http,crypto,tcp" -i /Users/huibin/Downloads/VideoData/$fileName -c copy $fileName.mp4`
fi
done