Sign in to follow this  
crazyjsbach

SMPEG, screen jungled under linux

Recommended Posts

crazyjsbach    122
i just use Drew Benton's sample to test play a mpg movie. When i use it on windows, every thing is ok, bu when i build and run the sample under linux, the screen jungled. Does anyone know why?

Share this post


Link to post
Share on other sites
Drew_Benton    1861
I don't use Linux, so sorry, there's not much I can help with here, but have you tried to use another mpeg file? I know that video was perhaps encoded, and then I used a shareware program to cut its length in half about 4 times, so it may not be a reading properly on Linux. If that doesn't help, can you describe/show a screenshot of what it looks like. Is the image distorted, not the right size, or what exactly? I'm trying to get a picture of what's going on.

Share this post


Link to post
Share on other sites
Drew_Benton    1861
Ahh, thanks, that's really weird! Here are a few preliminary suggestions:
- Download a different version of SMPEG and try using it (perhaps an older version)
- See if you could update your video drivers
- Try using: screen = SDL_SetVideoMode( 640, 480, 0, SDL_HWSURFACE ); If that does not work, try using another BPP, such as 16, or 24.
- In the function call:

// Create a temporary surface to render the movie to
SDL_Surface *tempSurface2 = SDL_CreateRGBSurface( SDL_SWSURFACE, moveInfo.width, moveInfo.height, 32, screen->format->Rmask, screen->format->Gmask, screen->format->Bmask, screen->format->Amask );



Try using another bits per pixel, rather than 32, use 16, 24, or see if you can obtain the current BPP for your screen surface.

- Finally try to use double buffering, SDL_DOUBLEUF in your SDL_SetVideoMode

Hopefully, one of those changing the 32s will fix it, see if it works!

Share this post


Link to post
Share on other sites
crazyjsbach    122
ok, i just find the reason. my x-window's bbp is 24, and i set it wrong on 32. Now the video is ok, but the audio is sound still awful. I'm try working on it. Thank you Drew
Benton, you really helps me a lot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this