How to save HLS stream to local disk in source code by ffmpeg?

10,745

Try this from videohelp please.

ffmpeg -i http://hls.twit.tv:1935/flosoft/smil:twitStream.smil/playlist.m3u8 -t 30 -c copy output1.mkv
Share:
10,745
Zachary
Author by

Zachary

Updated on June 04, 2022

Comments

  • Zachary
    Zachary almost 2 years

    The HSL stream is divided into multiple ts files, now I want to save these files and the m3u8 file to local disk in source code by calling ffmpeg APIs.

    Does ffmpeg support this function? If so how to implement the function? Otherwise, can anyone give me some suggestions about how to achieve this goal?

    • rainabba
      rainabba over 7 years
      You haven't said anything about the platform/code/language you plan to use so this can't begin to be answered as the question is now stated.
    • Zachary
      Zachary over 7 years
      @rainabba, I suspect if you know what is ffmpeg.
    • Zachary
      Zachary over 7 years
      And, do not comment the question you ARE NOT FAMILIAR WITH, whats a joke.
  • Zachary
    Zachary over 9 years
    I want to do it in source code, not by ffmpeg command line. but thanks.
  • Zachary
    Zachary over 7 years
    Thanks for your answer! I have not been worked with ffmpeg two years :)
  • Parbat
    Parbat over 7 years
    I know that I gave very late response but I hope it will help someone :)