Hi,
are there any examples on how to play an MPEG video on SDL?
I once wrote an example on how to play an MJPEG (based on libmjpegutils).
What lib would i use best (video and sound) to just play an MPEG
on Linux?
Thanks for any hints,
Torsten.
Hi,
are there any examples on how to play an MPEG video on SDL?
I once wrote an example on how to play an MJPEG (based on libmjpegutils).
What lib would i use best (video and sound) to just play an MPEG
on Linux?
Thanks for any hints,
Torsten.
Try SMPEG:
http://www.lokigames.com/development/smpeg.php3
http://icculus.org/smpeg/
ChrisOn 1/22/06, Torsten Mohr wrote:
What lib would i use best (video and sound) to just play an MPEG
on Linux?
–
E-Mail: Chris Nystrom
Blog: http://newio.blogspot.com/
AIM: nystromchris
Hi Torsten -
Could I get a copy of that example you wrote on how to play an MJPEG movie?
I’d appreciate it.
-Andrew
Torsten Mohr wrote:> Hi,
are there any examples on how to play an MPEG video on SDL?
I once wrote an example on how to play an MJPEG (based on libmjpegutils).
What lib would i use best (video and sound) to just play an MPEG
on Linux?
Thanks for any hints,
Torsten.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
I write a little wrapper around SMPEG:
/******************************************************************************On 1/22/06, Andrew Lee wrote:
Hi Torsten -
Could I get a copy of that example you wrote on how to play an MJPEG movie?
*/
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
#include <smpeg/smpeg.h>
#include “sdl_lib.h”
#include “movie_lib.h”
static int done = 0;
int main(int argc, char *argv[])
{
sdl_init();
sdl_setup_video(640, 480);
movie_load("1.mpg", TRUE);
movie_scale_XY(320, 240);
movie_set_display();
movie_play();
while (!done && (movie_playing())) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_KEYDOWN:
if (event.key.keysym.sym == SDLK_ESCAPE)
done = 1;
break;
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
SDL_Delay(200);
}
movie_delete();
SDL_Quit();
return 0;
}
–
If you want to check out my wrapper:
ftp://ftp.newio.org/pub/d0-libs/movie_lib.0.08_046D_102405.tar.gz
Chris
–
E-Mail: Chris Nystrom
Blog: http://newio.blogspot.com/
AIM: nystromchris
Hi Chris,
great, thanks for that one. I’ve just downloaded your wrapper.
Best regards,
Torsten.> On 1/22/06, Andrew Lee wrote:
Hi Torsten -
Could I get a copy of that example you wrote on how to play an MJPEG
movie?I write a little wrapper around SMPEG:
/**************************************************************************
- movie_demo.c
- Copyright © 2005 Chris Nystrom
- This program is public domain.
- This program is distributed in the hope that it will be useful,
- but without any warranty whatsoever.
- Contact Author at:
- Chris Nystrom
- 11013 Prairie Dove Circle
- Austin, Texas 78758
- E-Mail: cnystrom at gmail.com
- Blog: http://conversazione.blogspot.com
- AIM: nystromchris
- Soli Deo Gloria
*/
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
#include <smpeg/smpeg.h>
#include “sdl_lib.h”
#include “movie_lib.h”static int done = 0;
int main(int argc, char *argv[])
{
sdl_init();
sdl_setup_video(640, 480);movie_load("1.mpg", TRUE); movie_scale_XY(320, 240); movie_set_display(); movie_play(); while (!done && (movie_playing())) { SDL_Event event; while (SDL_PollEvent(&event)) { switch (event.type) { case SDL_KEYDOWN: if (event.key.keysym.sym == SDLK_ESCAPE) done = 1; break; case SDL_QUIT: done = 1; break; default: break; } } SDL_Delay(200); } movie_delete(); SDL_Quit(); return 0;
}
–
If you want to check out my wrapper:
ftp://ftp.newio.org/pub/d0-libs/movie_lib.0.08_046D_102405.tar.gz
Chris
–
E-Mail: Chris Nystrom
Blog: http://newio.blogspot.com/
AIM: nystromchris
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl