SMPEG, screen jungled under linux

Started by
3 comments, last by crazyjsbach 18 years, 5 months ago
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?
Advertisement
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.
here is the two image

http://img380.imageshack.us/img380/703/windows0kz.jpg

and

http://img352.imageshack.us/img352/1287/linux8nk.jpg
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 toSDL_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!
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.

This topic is closed to new replies.

Advertisement