extract separated audio from m3u8 link

6,946

If you just want the audio, use

ffmpeg -i "live m3u8 link" -c copy -map a "output.ts"

If you want it segmented, use

ffmpeg -i "live m3u8 link" -c copy -map a -f segment -segment_time 10 "out%d.ts"

If you just want to save the original files, you need a download manager of some sort.

Share:
6,946

Related videos on Youtube

ywj7931
Author by

ywj7931

Updated on September 18, 2022

Comments

  • ywj7931
    ywj7931 over 1 year

    I am trying to extract separated audios from live streaming m3u8 file, But when I use

    ffmpeg -i "live m3u8 link" -c copy "output.ts"
    

    Every new video and audio data seem just append on output.ts, is that possible make them create a new segmented ts file every time?

  • ywj7931
    ywj7931 over 7 years
    Hello Mulvya, thank you very much for your sharing of the code, it does do the trick! But when you put 10 there does it mean to cut the file every 10 seconds? Is there a way to use the time specified in the m3u8 file?
  • ywj7931
    ywj7931 over 7 years
    For example, my m3u8 file reads like this:#EXT-X-TARGETDURATION:5 #EXTINF:3.309, 1057677964350941__BshzQkvI-MOpxaKgPtCTcw__-1047.ts #EXTINF:3.243, 1057677964350941__BshzQkvI-MOpxaKgPtCTcw__-1048.ts #EXTINF:3.042, 1057677964350941__BshzQkvI-MOpxaKgPtCTcw__-1049.ts #EXTINF:3.442, 1057677964350941__BshzQkvI-MOpxaKgPtCTcw__-1050.ts #EXTINF:4.546, 1057677964350941__BshzQkvI-MOpxaKgPtCTcw__-1051.ts Is there a way to segment using the targeted duration and those ts files name?
  • Mosh Feu
    Mosh Feu about 4 years
    How to save it to .mp3? Also, is it actually download only the audio? or it downloads all but extract the audio?