Search code examples
streamingvlcp2pwowza

How to convert real-time video streaming to chunk for P2P sharing


I am trying to implement a real-time video streaming broadcasting system,
and using P2P technology to save the bandwidth of streaming server.

I am using Wowza Streaming Engine to implement my streaming server.
So the streaming server will receive real-time streaming of my camera.
And I am using VLC library to receive a real-time rtsp streaming on my custom android app.

Now I have to do the second part:
""Convert the streaming to chunk for P2P sharing. (server -> client(P2P)).""

But I dont know how to generate the chunk from the streaming.
Can anyone give me some suggestion for how to do this or some open source exit?
And is this the correct way to do the p2p streaming system?


Solution

  • You can use ffmpeg to produce media segments. Eg:

    ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a libfaac -f segment -segment_list out.list out%03d.ts

    Source: ffmpeg official documentation