سؤال

I did search and all I got is Windows Media Encoder Series 9 and I am not sure if DirectX can also do it, but I can't find any way to learn it. I even tried this tutorial but I can' t run the application, it gives me a bug (I did install Windows Media Encoder Series 9 and the SDK).

My application is now running JPEG files in a PictureBox with a timer, but the size of one minute is about 20 MB and that is not good. I need to save the whole day every day!

I found this software, it uses Windows Media Encoder and the video of one minute is about 1 MB which is great, now I know it's possible to record the desktop to a video file but how can I do it? I need a step by step explanation or videos to teach me.

هل كانت مفيدة؟

المحلول

The tool ffmpeg is perfect for doing this job. Their documentation has a example of the exact process you are trying to do.

For creating a video from many images:

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

The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.

When importing an image sequence, -i also supports expanding shell-like wildcard patterns (globbing) internally, by selecting the image2-specific -pattern_type glob option.

For example, for creating a video from filenames matching the glob pattern foo-*.jpeg:

ffmpeg -f image2 -pattern_type glob -i 'foo-*.jpeg' -r 12 -s WxH foo.avi

Just run this daily and it will convert your folder full of images in to a .avi file and you can delete the images when you are done.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top