Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mux function could support a way to output its progress #3

Open
4 tasks
rvbg opened this issue May 23, 2024 · 2 comments
Open
4 tasks

mux function could support a way to output its progress #3

rvbg opened this issue May 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rvbg
Copy link

rvbg commented May 23, 2024

Is your enhancement request related to a problem? Please describe.
When muxing something with mkvmerge it outputs the current progress in percent.
The current implementation of mux does not seem to support that information, which would be great to have, especially when running async or when muxing large files.

Describe the solution you'd like
Having an event function in the main object, which returns the progress, which is called when new progress information arrives.

Example:

mkv = MKVFile('/path/to/file.mkv')
mkv.remove_track(0)
mkv.mux('/path/to/output.mkv', gui.set_current_progress)

or

mkv = MKVFile('/path/to/file.mkv')
mkv.remove_track(0)
mkv.connect_event_new_progress(gui.set_current_progress)
mkv.mux('/path/to/output.mkv')

Implementation steps

  • Look at the output of mkvmerge and find a way to grab that information
  • Interpret that data
  • Add an event function which is called on new progress and returns that data
  • Add a variable to hold the connected function and a setter function to connect an external function to that event function

Additional context
I implemented something similar a few years ago, which still works, but the code is more a proof of concept, than a good implementation. It can be found here.
That function is used in combination with a gui progress bar.

Let me know, if you want help implementing this and the enhancement request from yesterday.

@rvbg rvbg added the enhancement New feature or request label May 23, 2024
@GitBib
Copy link
Owner

GitBib commented May 24, 2024

This is going to take more time. We need to figure out the best way to do it.

@rvbg
Copy link
Author

rvbg commented Oct 30, 2024

Hi, I'm back to working on my project and will try to implement this. If I'm successful, I'll try to open a pull request.
But I've now come across another serious problem and will open a new issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants