Hi Brian, I had a similar problem to you (wrote an app thinking I'd be able to play video, only to later find problems). I did manage to get the movie module in pygame to play HD video. Here's the ffmpeg command I used to encode the video :- ffmpeg -r 24 -f image2 -i SD%%04d.png -r 24 -g 18 -s 1920x1080 -vcodec mpeg1video -b:v 6000k -minrate 6000K -maxrate 6000k -bufsize 3276800 -intra SD.mpg I think the trick is using a fixed bit rate. If while encoding ffmpeg reports a buffer underflow, then you'll need to increase the bit rate (always keep -b:v, -minrate and -maxrate the same). Another problem which you may or may not discover is that not all pygame versions include the movie module. And it's possible that the movie module will be dropped in future versions. Because of this I decided not to use the movie module and instead I open a pipe to ffmpeg to decode my videos. The disadvantage with this is that ffmpeg has to be available to your app. The advantage is that you can use any encoding method ffmpeg supports. If you need an example of opening a pipe to ffmpeg, just let me know. Cheers, Ted. On 14/02/2015 6:41 a.m., Brian Madden
wrote:
|