L
L
lordning9992019-07-15 22:54:29
fmpeg
lordning999, 2019-07-15 22:54:29

FFmpeg M3U8 Playlist to Mp4?

Hello everyone, tell me there is an m3u8 playlist, it contains videos in various qualities and sizes.
Example:
432x240
852x480
1280x720
1920x1080
And so on.
I need to download all these videos from this playlist via ffmpeg.
Code example

ffmpeg -i ../playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4

But when you run this command, only 1 mp4 file is saved, and I need to save with each quality like this
240.mp4
480.mp4
720.mp4
1080.mp4
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2019-07-15
@Moskus

In ffmpeg/HLS terms, each permission is a program.
First, run ffmpegwith a parameter -i тут_ваша_ссылкаfor your .m3u8, identify the number and "program" numbers, and then use a combination of parameters like -i тут_ваша_ссылка -map 0:p:1 -copy, where the number after p:is the "program" number.
Other parameters - to taste, of course.
https://trac.ffmpeg.org/wiki/Map

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question