Kickflip / kickflip-android-sdk

Kickflip Android SDK - Live Video Streaming to the Cloud
https://kickflip.io
Apache License 2.0
660 stars 214 forks source link

Generate HLS format and MP4 segments simultaneously. #32

Open gouravd opened 9 years ago

gouravd commented 9 years ago

Would it be possible to generate HLS format for live streaming and MP4 streaming for archival on phone simulaneously?

My use case is to generate HLS format for live streaming and using the MP4 on phone for offline viewing (in case use opts to)

gouravd commented 9 years ago

Any help?

OnlyInAmerica commented 9 years ago

HLS format video is perfectly fine for offline viewing. If that's all you need I'd research playing a local HLS manifest with Android's MediaPlayer or ExoPlayer.

If you absolutely need a .mp4:

  1. Write your own Muxer that internally writes each packet to 2 muxers.
  2. Convert the HLS stream into an MP4 on-demand when the user requests to "export" it. See this StackOverflow post related to re-encoding or muxing videos with FFmpeg.