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

progress bars #64

Open
dimitrieh opened this issue Aug 19, 2016 · 15 comments
Open

progress bars #64

dimitrieh opened this issue Aug 19, 2016 · 15 comments

Comments

@dimitrieh
Copy link

Is it or can it be possible to get a progress bar when converting a video to gif?

@vvo
Copy link
Owner

vvo commented Aug 22, 2016

It may be possible but I doubt it would be accurate. Maybe just a simple spinner could help? I agree converting to gif can sometime take a lot of time.

I am happy taking any PR adding something like indicating when gifify is working.

@kevinsimper
Copy link

I think a start would just be to output something to see that it is not stuck :P

@vvo
Copy link
Owner

vvo commented Sep 8, 2016

I think a start would just be to output something to see that it is not stuck :P

We could but right now the fact that your command line does not returns to the prompt means "It's working"

@jmbeach
Copy link

jmbeach commented Dec 11, 2016

@vvo or is it?

@vvo
Copy link
Owner

vvo commented Dec 14, 2016

@vvo or is it?

I did not get what you meant. I am open to any PR adding a funny emoji spinner anything you want :)

@jmbeach
Copy link

jmbeach commented Dec 14, 2016

Sorry, I was just kidding. gifify <whatever> && say done works just fine for me.

@vvo
Copy link
Owner

vvo commented Dec 14, 2016

NP 💃

@AntiMoron
Copy link

I need it because I don't know whether it's dead looping or just dead lock somewhere. Let me know what's its progress dose help.

@waldyrious
Copy link
Contributor

I think a start would just be to output something to see that it is not stuck :P

We could but right now the fact that your command line does not returns to the prompt means "It's working"

IMHO an explicit message like "converting, please wait..." would tell the user that this is normal and expected behavior, rather than a possible hang up, as others have said.

An animated spinner, and even an actual progress bar, would be nicer for sure, but I'd say that simply printing a message like the above would go around 80% of the way (if not more) to solve the core issue here.

@vvo
Copy link
Owner

vvo commented Jan 19, 2018

Open to PRS, should take 2 minutes to add this message

@waldyrious
Copy link
Contributor

Open to PRS, should take 2 minutes to add this message

For someone who's not familiar with this code (or this sort of code), would you mind giving a pointer or two? According to https://github.com/vvo/gifify/blob/master/bin/gifify#L42, the right place to add such a message would be at encode(), but what's the method that should be used to print such a message?

@vvo
Copy link
Owner

vvo commented Jan 19, 2018

As to updating the behaviour and usage, first you could update the usage here:

var options =

Then I would add a new flag that would mean 'stdout' (not just "-", might be tricky to handle or remember).

Any examples of unix programs having -o and - or any other flag like that? Maybe curl?

@waldyrious
Copy link
Contributor

I think you your comment was meant for #100, right?

@vvo
Copy link
Owner

vvo commented Jan 19, 2018

Oh yeah, sorry I misread that.

As far as putting a "loading message" I would give a try here:

Which is the place where we already checked parameters etc.

Give it a try locally:

git clone git@github.com:vvo/gifify.git
cd gifify
npm link
# now "gifify" is the binary of the local gifify directory, handy to test!
# do the changes in https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L72
# try to run gifify and see if it works

Then submit a PR, let me know!

@waldyrious
Copy link
Contributor

Thanks for the detailed steps. I was still unsure what function to call to write to stdout, but hopefully #101 does the right thing. It certainly seemed to work locally as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants