Pygame movie.play-no sound
Posted: Fri Dec 21, 2012 6:22 am
Hello.
I get video but no sound when I play videos with the pygame play.movie command. If I use pygame to play an mp3 I do get sound.
My file is using the MPEG-1 Video Codec and the MP3 Audio Codec.
Can anyone point me to a file that they have successfully played? Is there something wrong in my code?
I am using Python 2.7.3rc2 and 2012-10-28-wheezy-rasbian
I get video but no sound when I play videos with the pygame play.movie command. If I use pygame to play an mp3 I do get sound.
My file is using the MPEG-1 Video Codec and the MP3 Audio Codec.
Can anyone point me to a file that they have successfully played? Is there something wrong in my code?
Code: Select all
import pygame
from time import sleep
pygame.init()
screen = pygame.display.set_mode((320,240))
movie=pygame.movie.Movie("o2.mpg")
pygame.mixer.quit()
if (movie.has_audio()):
print ("movie has audio")
movie.set_volume (1.0)
movie.play()