Python Forum

Full Version: Can Python be used to create scrolling credits (as follows)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to decide whether to learn Python, because I have a specific requirement. I need to write a program that will create a video that contains "scrolling credits". The reason why I can't use any of the existing software that I own (eg, Keynote, Motion) is that they don't let me specify how long I want the credits to last. Maybe since Python is a general purpose programming language I can do this, with the right module. Basically, here's what I want to say: "Take the following X lines of text and scroll it upwards on the screen and make the whole credits last Y seconds." I would prefer that the video be displayed by the Python app itself, although I may settle for a video file if it doesn't take very long to make the file.

I must re-iterate that I don't know the actual text or the duration in advance. These values will come from an external file or will be passed to the Python app from the calling shell script. Either way.

I looked closely at a module for Python called PlotDevice and I think I've been able to eliminate that due to its inability to its inability to let me programatically decide which part of the canvas to display to the user. PlotDevice requires that I show the whole canvas when in full screen mode. But I need credits to be scrolling, and it can't do that. I'm currently looking at a module called Pillow but it seems to suffer from the same problem as PlotDevice. But I may be incorrect about Pillow.
see: https://stackoverflow.com/a/36174335
and also google 'scrolling credits for video python'
That's an interesting answer, and possibly the right answer, but it will take me a long time to figure out how to install it, let alone use it. That's because I have no more than 10 minutes of experience with python and brew combined. And because pygame has a long list of modules you have to install before you can use pygame. The pygame FAQ doesn't include installation instructions and so I'm not even sure I'll overcome all these obstacles. I have a lot to learn.

But I think your answer is pretty good and I'm slightly embarrassed that I didn't google those words myself. I had no idea someone was trying to solve this problem before.
FYI: installing pygame is simple, takes a few seconds:
From command line: pip install pygame