4
\$\begingroup\$

I've been dwelling with a question lately,

I can generate screenshots with my library, but i found that i would like to be able to record video from a game.

Since video is just(well-simply enough, yeah) a collection of images, i guess i could easily write "screenshots" into a single file.

I know that makes sense, but the end result won't be understood by any video application around. That's where the question pumps in,

What is the simplest file format that i can write to, that a video editing application will be able to understand and convert to a format of choice later?

As a bonus: What if i want to add the sound too? What do you think?

Thanks for the help.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Google "ffmpeg images to video", I believe that's what you're looking for. There's nothing wrong with using images to create the end video, like you said that's pretty much what a video is. I'd personally say go with MPEG-4 for these reasons:

MPEG-4 is the best option. The mpeg4 stream can be stored in either in the .avi or .mp4 (quicktime) container file: it can support high levels of lossy compression to keep file sizes small and also supports arbitrary frame rates. It is also translates much more easily to other platforms than wmv1 or wmv2.

Good reference here.

Hope it helps. I did the same type of project a little while ago, and it worked like a charm.

\$\endgroup\$
3
  • \$\begingroup\$ Really sounds good, and if i take the extra step, maybe i can use it too to play the video within the application! (Perhaps even with audio playback?) \$\endgroup\$
    – Grimshaw
    Feb 22, 2012 at 2:38
  • 1
    \$\begingroup\$ Be advised: you must pay for a player if you want MPEG-4 to be played by your game. Yes, even FFMpeg. Otherwise MPEG-LA could sue you. \$\endgroup\$ Feb 22, 2012 at 2:38
  • \$\begingroup\$ Good advice, but how would they REALLY know what format the video is in that's packed into YOUR application? \$\endgroup\$
    – While-E
    Feb 22, 2012 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .