0

My python program generates a collection of binary files. I create pgm (portable bitmap files) using this binary data. I would like to create a video using each of the pgm files as a frame in my video.

I have had a look an mencoder but I dont think it supports pgm files

Can anyone offer any advice.

mikip
  • 1,677
  • 6
  • 25
  • 35

1 Answers1

1

If "PGM" is identical with "Portable GrayMap Files", cross-browser command line video processing tool ffmpeg can decode them: List of FFMPeg Codecs on Wikipedia

Check out the FFMPEG FAQ: 3.2 How do I encode single pictures into movies?

On how to use FFMpeg with Python, check this SO question. There is a wrapper for Python, but I can't find any statements on how good it is.

If in doubt, just call it from the command line.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088