开发者

Way to generate video from a bunch of images?

Can anybody tell 开发者_JAVA技巧me the way of generating the video from the bunch of images(bitmap). May be open format of avi file or open-source library,

I used Splicer but it has some bugs in production using.

The BytesCount Image To Video SDK is best choice but it is commerce solution.

Do you now any alternative?


We have used ffmpeg and achieved professional results.

FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.

Also...

FFmpeg is free software licensed under the LGPL or GPL depending on your choice of configuration options. If you use FFmpeg or its constituent libraries, you must adhere to the terms of the license in question. You can find basic compliance information and get licensing help on our license and legal considerations page.

From the documentation:

For creating a video from many images:

ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi


This is a frequently asked question with DirectShow API. Windows SDK comes with Push Source Filters Sample which introduce video generation in native code. Having video generated, you can use the filter in DirectShow pipeline to visualize the sequence and/or write into files (compress video, attach audio etc).

The samples are not directly convertable into managed code domain, but you still have options there. Check these threads out regarding the related discussions:

  • C# version of the PushSource example
  • Push samples (bitmaps) in DirectShow graph
  • GSSF sample in http://DirectShowNet.SourceForge.Net


I haven't tried this myself, but the CodeProject article A Simple C# Wrapper for the AviFile Library seems to have what you need, specifically it does the following things:

  • Read images from the video stream.
  • Decompress a compressed video stream.
  • Compress an uncompressed video stream.
  • Change the compression of a video stream.
  • Export the video stream into a separate .avi file.
  • Export the audio stream into a .wav file.
  • Copy a couple of seconds from audio and video stream into a new .avi file.
  • Add sound from a .wav file to the video.
  • Create a new video stream from a list of bitmaps.
  • Add frames to an existing video stream, compressed or not.
  • Insert frames into a stream.
  • Copy or delete frames from a stream.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜