Dear #Python experts, I want to create a graphical progress bar for a command line program that uses ffmpeg to extract audio from mp4 video files.

I suppose at some point I could develop a graphical interface to call the command line programs I use for this process, but that's way more complicated than the complicated thing I want to do now.

The video files are generally different sizes every time.

Can you recommend or point me to a good site that may be of value in this endeavor? I've not had much luck searching on my own.

#GUI #Programming #PythonBeginner

@pronounshe is the interesting part here the fact that it’s a GUI (i.e. that you don’t want to, or don’t want your users to, interact with the CLI) or the display of progress? what operating systems do you care about it running on?

@glyph Ah, fair. Apologies for the lack of clarity.

The OS is Linux using Python 3.12.3, Gnu bash 5.2.21(1)-release and Mate 1.26 desktop enviroment.

The goal is simply to display the progress of ffmpeg extracting audio graphically other than what the ffmpeg status line displays by itself when running ffmpeg -i ./[file1.mp4] ./[file2.mp3|flac|etc...]

@pronounshe if you can set up your python program to read the video files from stdin, you can just pipe it through `pv` to get a progress bar.

Alternatively, the tqdm library lets you draw a progress bar with python really easily: https://tqdm.github.io/

I don't know how you'll get feedback from ffmpeg about the progress though if that isn't already taken care of.

tqdm documentation

A Fast, Extensible Progress Meter

@runningoff Excellent. Thank you. These are starting points for finding info on how to implement my idea that I'd never come up with on my own.

@runningoff @glyph The real point of attempting to do this is, of course, to have "fun".

And create something interesting.