Encoding JPEG images in a video while keeping the video playable at all times -
i have application fetches jpeg images url , i'd encode each of these images in video, arrive.
the constraints follows:
- the video format should simple possible can implement in c or there should exist relatively non-bloated library this
- if power fails @ point (or forcefully close application), video should remain "viewable" , playable in normal video player without requiring other special handling regardless of how many (1 or n) jpeg images added it. in mind goes this: starting first image onwards, i'd video "complete" , append following images in order make longer video.
i read m-jpeg, i'm not able find examples , or documentation on how produce means of programming.
again, language c.
try writing simple header before each image,
--random-boundary-string content-type: image/jpeg content-length: nnnnn data... --random-boundary-string content-type: image/jpeg content-length: nnnnn data...
where nnnnn
size of jpeg image, , data...
full jpeg image. write file .mjpeg
extension. mplayer
can play resulting output, don't know how/if other players handle it. uses libavcodec handle fine. have use mplayer -fps n
play @ reasonable speed.
i have few projects this, , works great.
Comments
Post a Comment