SDL -> avi

Hi

I create a sequence of images on the screen using SDL. I would like to record
this as an avi film or DVD. Has anyone an idea how to do this?

Thanks

Hi

I create a sequence of images on the screen using SDL. I would like to record
this as an avi film or DVD. Has anyone an idea how to do this?

Since DVD is a physical media and avi is a transport for video and audio
the question is a bit strange. However, I’m guessing that you want to make
a video of a series of still images.

ffmpeg probably does what you require. However, you probably don’t want a
lossy codec for the video unless it’s 3D. For 2D images qtrle (or possibly
msrle) is a fairly good codec for computer graphics. Also, you probalby
want to speficy the frame rate. ffmpeg alows you to specify these things
in addition to ouput file format and a plethora of other options.

-Frode

Frode Tenneb? <frodet nvg.ntnu.no> writes:

Hi

I create a sequence of images on the screen using SDL. I would like to record
this as an avi film or DVD. Has anyone an idea how to do this?

Since DVD is a physical media and avi is a transport for video and audio
the question is a bit strange. However, I’m guessing that you want to make
a video of a series of still images.

ffmpeg probably does what you require. However, you probably don’t want a
lossy codec for the video unless it’s 3D. For 2D images qtrle (or possibly
msrle) is a fairly good codec for computer graphics. Also, you probalby
want to speficy the frame rate. ffmpeg alows you to specify these things
in addition to ouput file format and a plethora of other options.

-Frode

Thanks Frode,

well my images are created by a program that uses SDL. The resulting screen
images may not preexist, so I would need first to capture all the images
generated and then merge them into a film. Another issue is that the time
sequence is not always regular. Finally, as far as I understand, DVD is not only
a physical media, but also a way of encoding video. My final goal is to produce
such a video on DVD,that will be projected with a professional video projector.
I need the best quality.

Well I tried to use mencoder which uses the ffmpeg library to encode directly a
video from still images, but that option seems buggy.

Any other idea?

Fred

Fred

You might look at Fraps (www.fraps.com) for the video capture, if
you’re on a Windows platform. Also, regarding the DVD conversion, I
believe the codec used on most DVD’s is DivX. DVD stands for Digital
Video Disc, and unless the people who wrote the spec don’t know what
"Disc" means, then DVD refers solely to the actual media that your
video will be stored on. The DivX website (www.divx.com) might give
you more (or more accurate) information.

HTH,

-JustinOn Apr 7, 2005 8:00 AM, Fred wrote:

so I would need first to capture all the images
generated and then merge them into a film. Another issue is that the time
sequence is not always regular. Finally, as far as I understand, DVD is not only
a physical media, but also a way of encoding video. My final goal is to produce
such a video on DVD,that will be projected with a professional video projector.
I need the best quality.

Fred

Correction. DVD uses the MPEG-2 standard of encoding and if I remember
correctly, does not stand for anything. It has been called Digital
Versitial[sp?] Disc and Video Disc. DivX uses MPEG-4 for it’s encoding.

Justin Coleman wrote:>On Apr 7, 2005 8:00 AM, Fred wrote:

so I would need first to capture all the images
generated and then merge them into a film. Another issue is that the time
sequence is not always regular. Finally, as far as I understand, DVD is not only
a physical media, but also a way of encoding video. My final goal is to produce
such a video on DVD,that will be projected with a professional video projector.
I need the best quality.

Fred

You might look at Fraps (www.fraps.com) for the video capture, if
you’re on a Windows platform. Also, regarding the DVD conversion, I
believe the codec used on most DVD’s is DivX. DVD stands for Digital
Video Disc, and unless the people who wrote the spec don’t know what
"Disc" means, then DVD refers solely to the actual media that your
video will be stored on. The DivX website (www.divx.com) might give
you more (or more accurate) information.

HTH,

-Justin


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 05-Apr-05

That’s what I thought. Any idea of the size limitations in pixels for
DVD standard.

I am under Linux. I can include a screen capture for each image
generated and recombine them into a video using whatever suitable
program, but this loses the time aspects.

Richard “The PC Doc” Hancock wrote:> Correction. DVD uses the MPEG-2 standard of encoding and if I

remember correctly, does not stand for anything. It has been called
Digital Versitial[sp?] Disc and Video Disc. DivX uses MPEG-4 for it’s
encoding.

Justin Coleman wrote:

On Apr 7, 2005 8:00 AM, Fred wrote:

so I would need first to capture all the images
generated and then merge them into a film. Another issue is that the
time
sequence is not always regular. Finally, as far as I understand, DVD
is not only
a physical media, but also a way of encoding video. My final goal is
to produce
such a video on DVD,that will be projected with a professional video
projector.
I need the best quality.

Fred

You might look at Fraps (www.fraps.com) for the video capture, if
you’re on a Windows platform. Also, regarding the DVD conversion, I
believe the codec used on most DVD’s is DivX. DVD stands for Digital
Video Disc, and unless the people who wrote the spec don’t know what
"Disc" means, then DVD refers solely to the actual media that your
video will be stored on. The DivX website (www.divx.com) might give
you more (or more accurate) information.

HTH,

-Justin


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Justin Coleman wrote:

You might look at Fraps (www.fraps.com) for the video capture, if
you’re on a Windows platform. Also, regarding the DVD conversion, I
believe the codec used on most DVD’s is DivX. DVD stands for Digital
Video Disc, and unless the people who wrote the spec don’t know what
"Disc" means, then DVD refers solely to the actual media that your
video will be stored on. The DivX website (www.divx.com) might give
you more (or more accurate) information.

No, all video DVDs use MPEG-2 video.

  • Gerry

DVD movies are generally 720x480 (for NTSC), sometimes interlaced,
sometimes progressive (recommended). Note though that the pixels are
generally not square (so you’ll either have to generate your ouput
accordingly (recommended) or resize it after the fact). The image
aspect ratio can be 4x3 or 16x9 and the pixels will just be stretched to
a rectangular shape in one direction or another.On Thu, Apr 07, 2005 at 04:27:44PM +0200, Fred Perie wrote:

That’s what I thought. Any idea of the size limitations in pixels for
DVD standard.

I am under Linux. I can include a screen capture for each image
generated and recombine them into a video using whatever suitable
program, but this loses the time aspects.


Steaphan Greene
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050407/f53fcd6b/attachment.pgp

any clue to capture the film from my screen (I use RedHat 8)?

Otherwise I might as well port my program under windows, but I haven’t any C
compiler.

Try this trick used in some of my OpenGL demos.

Draw 1/30 of a sec to images
Save to a bmp
Draw next frame
Rinse and Repeat.

Take the set of images and combine them into a move file at 30 fps.
Since DVD is usually 720x480, make a screen of that size and just copy
over. It saves having to convert to windows.

HTH,
Richard

Fred wrote:>any clue to capture the film from my screen (I use RedHat 8)?

Otherwise I might as well port my program under windows, but I haven’t any C
compiler.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.4 - Release Date: 06-Apr-05

in windows get mingw/msys if you are familiar with linux (:

mingw is gcc for windows and msys is a bash shell for windows that has make,
autoconf etc> ----- Original Message -----

From: fred@mcube.fr (Fred Perie)
To:
Sent: Thursday, April 07, 2005 8:45 AM
Subject: [SDL] Re: SDL -> avi

any clue to capture the film from my screen (I use RedHat 8)?

Otherwise I might as well port my program under windows, but I haven’t any
C
compiler.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Richard “The PC Doc” Hancock wrote:

Correction. DVD uses the MPEG-2 standard of encoding and if I
remember correctly, does not stand for anything. It has been called
Digital Versitial[sp?] Disc and Video Disc. DivX uses MPEG-4 for it’s
encoding.

It does actually stand for “Digital Versatile Disc”, but people often
assume the V is for “video” just because the medium is so frequently
associated with movies, so it’s usually the first word that comes to mind.

Ryan

any clue to capture the film from my screen (I use RedHat 8)?

You could use “vncrec”, perhaps, as explained here:

http://linuxgazette.net/102/washko.html

Or use Xvidcap:

http://xvidcap.sourceforge.net/

Otherwise I might as well port my program under windows, but I haven’t any C
compiler.

Is there some reason you can’t use Cygwin or something similar?On Thu, Apr 07, 2005 at 03:45:21PM +0000, Fred wrote:


-bill!
bill at newbreedsoftware.com “I’m anticipating an all-out tactical
http://newbreedsoftware.com/ dog-fight, followed by a light dinner.”

It’s one of those acronyms that has changed definition a few times. It
did originally stand for Digital Video Disc, then when they wanted to
market it as a full replacement for CDs it became Digital Versitle Disc.
Then, more recently, it went the same way as most ever-changing computer
acronyms (like MMX, IBM, SGI, etc…) and now just stands for nothing.
It’s just DVD, apparently.On Thu, Apr 07, 2005 at 09:48:26AM -0700, Ryan Hanlon wrote:

Richard “The PC Doc” Hancock wrote:

Correction. DVD uses the MPEG-2 standard of encoding and if I
remember correctly, does not stand for anything. It has been called
Digital Versitial[sp?] Disc and Video Disc. DivX uses MPEG-4 for it’s
encoding.

It does actually stand for “Digital Versatile Disc”, but people often
assume the V is for “video” just because the medium is so frequently
associated with movies, so it’s usually the first word that comes to mind.


Steaphan Greene
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050407/02cae2b9/attachment.pgp

Bill Kendrick wrote:

any clue to capture the film from my screen (I use RedHat 8)?

You could use “vncrec”, perhaps, as explained here:

http://linuxgazette.net/102/washko.html

I will try it.

Or use Xvidcap:

http://xvidcap.sourceforge.net/

I tried it but failed to compile.

Otherwise I might as well port my program under windows, but I haven’t any C
compiler.

Is there some reason you can’t use Cygwin or something similar?

No, in fact I could use Cygwin, but I was somewhat cautious because of
performance aspects.

Thanks>On Thu, Apr 07, 2005 at 03:45:21PM +0000, Fred wrote:

http://www.dvddemystified.com/dvdfaq.html#1.1

The question 1.1.1, what do the letters DVD stand for.

Official answer is “nothing”, as of now. It used to stand for stuff.On Thu, Apr 07, 2005 at 09:48:26AM -0700, Ryan Hanlon wrote:

Richard “The PC Doc” Hancock wrote:

Correction. DVD uses the MPEG-2 standard of encoding and if I
remember correctly, does not stand for anything. It has been called
Digital Versitial[sp?] Disc and Video Disc. DivX uses MPEG-4 for it’s
encoding.

It does actually stand for “Digital Versatile Disc”, but people often
assume the V is for “video” just because the medium is so frequently
associated with movies, so it’s usually the first word that comes to mind.


Petri Latvala
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050407/bd99a7a5/attachment.pgp

Thanks Richard, I think this the best way to do it. I might need to slow
down my animation when recording, so that there is no interference with
the screen saver. I planned to use xwd, as I had no idea of which
command to use to save in another format.

Richard “The PC Doc” Hancock wrote:> Try this trick used in some of my OpenGL demos.

Draw 1/30 of a sec to images
Save to a bmp
Draw next frame
Rinse and Repeat.

Take the set of images and combine them into a move file at 30 fps.
Since DVD is usually 720x480, make a screen of that size and just copy
over. It saves having to convert to windows.

HTH,
Richard

Fred wrote:

any clue to capture the film from my screen (I use RedHat 8)?

Otherwise I might as well port my program under windows, but I
haven’t any C
compiler.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

That’s the beauty of it, you don’t actually have to slow it down. Just
do the timing calculations for 1/30 of a sec each frame. And if you are
just taking it from the surface it self, the screensave SHOULD NOT
interfere. But then again, the only way I have done it is a direct
glReadPixels.

Richard

Fred Perie wrote:> Thanks Richard, I think this the best way to do it. I might need to

slow down my animation when recording, so that there is no
interference with the screen saver. I planned to use xwd, as I had no
idea of which command to use to save in another format.

Richard “The PC Doc” Hancock wrote:

Try this trick used in some of my OpenGL demos.

Draw 1/30 of a sec to images
Save to a bmp
Draw next frame
Rinse and Repeat.

Take the set of images and combine them into a move file at 30 fps.
Since DVD is usually 720x480, make a screen of that size and just
copy over. It saves having to convert to windows.

HTH,
Richard

Fred wrote:

any clue to capture the film from my screen (I use RedHat 8)?

Otherwise I might as well port my program under windows, but I
haven’t any C
compiler.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.4 - Release Date: 06-Apr-05

Richard “The PC Doc” Hancock wrote:

That’s the beauty of it, you don’t actually have to slow it down.
Just do the timing calculations for 1/30 of a sec each frame. And if
you are just taking it from the surface it self, the screensave SHOULD
NOT interfere. But then again, the only way I have done it is a
direct glReadPixels.

Richard

Then I have to dig into SDL an openGL. Might not be so difficult, I
guess. The best would be such an option would be existing in pure SDL.

TH
anks

Fred

That sucks. I’ve used it in the past with success.
(see http://www.newbreedsoftware.com/tuxpaint/ )

I didn’t build form source, though, I just apt-get installed it on my
Debian box. :^/

-bill!On Thu, Apr 07, 2005 at 07:21:17PM +0200, Fred Perie wrote:

Or use Xvidcap:

http://xvidcap.sourceforge.net/

I tried it but failed to compile.