How to encode (e.g. H264) and divide video into segments, th

Just have a drink and chat
andersbranderud
Blank Cone
Blank Cone
Posts: 10
Joined: 26 Mar 2012 20:54

How to encode (e.g. H264) and divide video into segments, th

Postby andersbranderud » 27 Mar 2012 17:49

I want to transmit an encoded video file over a simple UDP-protocol that doesn't receive any acknowledgments from the receiver. The file should be encoded into small segments, so that the segments received and decoded by the receier, can be immediately played.
The major challenge of my problem is that which I outline in the title.

The data to be sent should be located in a big buffer of encoded video-data, to which I easily can apply FEC-code. For each playable (when decoded) segement of the video, I will apply FEC-code using a separate FEC-code session.

I am looking for some guidelines of an overview of how to step-by-step implement this.

Is this a good idea?:

Sender-side:
Take a video-file.
Use e.g. a H264-encoder from a video encoding library (e.g. FFMPEG) and encode the video into 1 sec- playable segments.
Apply FEC-code on each 1-sec-segment.
For each 1-sec-segment:
Send the data over UDP (include one byte containing a number outlining which FEC-encoding-session the data belongs to).

Receiver-side:
For each 1-sec-segment:
Receive all data containing to the same FEC-session. When enough packets are received, FEC-decode the data.
Use H264-decoder
Play the segment if no segment is playing and it is the next segment to be played; or put in its right position in the queue of segments to be played.
Anders Branderud
Master's student, Computer science
www.abitsolutions.org
www.proofexistencegod.com

str3tmonk
Blank Cone
Blank Cone
Posts: 40
Joined: 21 Jun 2009 04:43

Re: How to encode (e.g. H264) and divide video into segments

Postby str3tmonk » 07 Apr 2012 03:48

Seems like you're trying to reinvent HLS (Apple's HTTP Live Stream format). As far as I know, VLC does not support encoding HLS streams as of yet. Google "mediasegmenter" to see how to do it in another solution.

Hope this helps.


Return to “Coffee Corner”

Who is online

Users browsing this forum: No registered users and 11 guests