What does pygame.Movie mean by `an MPEG file'?
Kilian A. Foth
foth at informatik.uni-hamburg.de
Thu Sep 29 02:54:14 EDT 2005
Christophe <chris.cavalaria at free.fr> wrote:
> Kilian A. Foth a écrit :
> > I just found this amazing video puzzle game written with the pygame
> > library, which promises to be infinite fun - but I can't get it to
> > decode any video file I own, except the game's own example .mpg. All I
> > have is lots and lots of useless .avi, .mp2, .wmv, and so on...
> >
> > Now, the pygame.Movie documentation says the Movie class can decode
> > `MPEG movie files'. I know little about multimedia, but I thought
> > divx/xvid video was a variant of MPEG4, and mp3 audio a variant of
> > MPEG1 Layer 3. So obviously, `MPEG movie files' means something more
> > specific than just `contains MPEG streams'. Does anyone know what
> > precisely it means? Even better, how should I instruct transcode or
> > similar programs to re-encode existing files so that Movie objhects
> > can be created from them?
> An mpeg file is a file with the .mpg or .mpeg extension. IIRC, it's a
> raw mpeg 1 or 2 stream dumped in a file. Not sure about the raw stream
> but I'm sure it can only be mpeg 1 or 2.
Alright, several tries later I now know the pygame accepts only MPEG
program stream containers, with MPEG1 video and MPEG2 audio. I found
that the command
mencoder -of mpeg -ovc lavc -oac lavc \
-lavcopts acodec=mp2:vcodec=mpeg1video:vbitrate=5000 -o new.mpg old.avi
successfully creates such files. I'm off to play video puzzle now!
--
No animal was harmed in the composition of this message.
More information about the Python-list
mailing list