
Please let me know if this share help your program work. How to Convert MP4 to HLS ffmpeg-i filename.mp4 -codec: copy -bsf:v h264mp4toannexb -startnumber 0 -hlstime 10. That’s OK? Here is my working download script by ffmpeg, bypass the policy by http headers option’s referer: ffmpeg -user-agent "Mozilla/5.0 (Windows NT 10.0 Win64 圆4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/.80 Safari/537.36" -headers "origin: " -headers "referer: " -i -c copy your-playlist.mp4īonus tips: download by youtube-dl script youtube-dl -add-header Accept-Encoding:"identity q=1, * q=0" -add-header Range:"bytes=6488064-" -add-header Referer:"" -add-header User-Agent:"Mozilla/5.0 (Windows NT 10.0 Win64 圆4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/.80 Safari/537.36" -output your-playlist.mp4 Install FFMPEG on Ubuntu apt install ffmpeg.

cat fileIntermediate1.ts fileIntermediate2.ts > output.ts. After finishing the conversions, you can then simply cat them together using the Linux terminal or use the concat command in FFmpeg.

ffmpeg -i file1.mp4 -c copy -bsf:v h264mp4toannexb -f mpegts fileIntermediate1.ts. We’ll need to add something legal into header. Here is a one-liner to convert mp4 files to ts.

Some application, website has protected their stream by cross-domain policy.
