Open fisheggg opened 1 year ago
Sorry I can't edit the labels for now! If you see this and has the admin permission please add me to the project. Thanks in advance!
Also sorry if these stuff looks annoying, I'm kinda just using some muscle memories from a software company perspective. If that's not our goal here, please simply close these issues. Cheers!
Great suggestions again, fully agree on the progressbar suppression, and the combined commands as well! The latter would probably result in a significant speed boost as well.
These might be totally off from our aims, but in terms of better software engineering practice and collaboration with other python libraries, some misc enhancements could be discussed.
Combine ffmpeg commands
Correct me if I'm wrong, it seems that in each function of preprocesses, a separate ffmpeg command is created. If we don't want the intermediate products, this process will create redundant I/O operations since the files are read/write for multiple times.
We could consider separating the process definition and the computation, for example predefine a processing flow, and only calls ffmpeg when we need to actually compute the output. In this way we can optimize the ffmpeg command to combine multiple operations in one call.
Some audio libraries, such as
pysox
andmadmom
, uses this type of workflow. I suggest we could look intopysox
more, since it is also a python wrapper of a command line library calledSoX
. It has an in-memory workflow as well, as mentioned in #294 .pysox: https://github.com/rabitt/pysox madmom: https://github.com/CPJKU/madmom
Option to suppress progress bar
The progress bar is useful when we manually process files, but in batch processing, especially when running on a computer server with multiprocess, it might become an issue and make the log very hard to read. So I suggest having a switch to turn off the progress bar. For example:
To be continued...