Reputation: 23
My server generates h264 frames(I and P) and I want to send them to client over http. What is a proper logic or algorithm for that?
Upvotes: 0
Views: 813
Reputation: 924
This is a very broad question, but there are a few key parts required. First, you will not want to server each frame independently, but rather you will want to batch the frames to give yourself a few seconds of buffer. The batches of frames will then need to go through an encoder which will generate files at multiple bit rates (since you will not know the end users connection speed). Then, you will need to establish a connection with the client and determine the current speed (you will need to continually monitor speed to determine the appropriate bit rate to send). Once the connection is established, you can begin sending the chunked data to the client for reassembly and display.
Your best bet would be to implement one of the more fully developed and standardized implementations of this concept (MPEG_DASH, HLS, etc).
Upvotes: 1