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

Thoughts on re-routing tqdm progress bar for external use? #412

Closed
tburrows13 opened this issue Feb 15, 2017 · 6 comments
Closed

Thoughts on re-routing tqdm progress bar for external use? #412

tburrows13 opened this issue Feb 15, 2017 · 6 comments
Labels
enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. feature-request Request for a new feature or additional functionality.

Comments

@tburrows13
Copy link
Collaborator

Do we have any thoughts on adjusting the tqdm iterator in write_videofile to re-route progress bar elsewhere e.g. tkinter widget?

So it can by other threads/processes in the same program...

See here, here, here and here for interest

@tburrows13 tburrows13 added enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. feature-request Request for a new feature or additional functionality. labels Feb 15, 2017
@ghost
Copy link

ghost commented Feb 15, 2017

see no reason why we shouldn't.

@Zulko
Copy link
Owner

Zulko commented Feb 16, 2017

I think the best way to do it would be to add a "progress_callback" parameter to "write_videofile". This parameter would be a function which will be run that would be run inside the main loops of "write_audiofile" and "write_videofile".

progress_callback("audioclip", current_frame, current_frame_number, total_frames_number)
progress_callback("videoclip", current_frame, current_frame_number, total_frames_number)

This would enable to do a lot of things such as sending the progress back to a web client, and even get a preview of what is being written down, as it is being written down.

@keikoro
Copy link
Collaborator

keikoro commented Feb 18, 2017

Another related issue #278

@tburrows13
Copy link
Collaborator Author

tburrows13 commented Mar 1, 2017

#278 just talks about disabling the progress bar in write_videofile and we have a update for that in PR #380 (and #300 for write_images_sequence)

@tburrows13
Copy link
Collaborator Author

Implemented in v1.0. See #1020

@deepesh-01
Copy link

I think the best way to do it would be to add a "progress_callback" parameter to "write_videofile". This parameter would be a function which will be run that would be run inside the main loops of "write_audiofile" and "write_videofile".

progress_callback("audioclip", current_frame, current_frame_number, total_frames_number)
progress_callback("videoclip", current_frame, current_frame_number, total_frames_number)

This would enable to do a lot of things such as sending the progress back to a web client, and even get a preview of what is being written down, as it is being written down.

Hi @Zulko,

I am new to moviepy and using it to in my backend django project to process videos but I need to show the progress of writefile in my clinet and I see that we can add progress_callback but can you please elaborate it a bit. I am not able to find anything on how to implement this thing.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. feature-request Request for a new feature or additional functionality.
Projects
No open projects
Development

No branches or pull requests

4 participants