gifify icon indicating copy to clipboard operation
gifify copied to clipboard

progress bars

Open dimitrieh opened this issue 8 years ago • 15 comments

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

dimitrieh avatar Aug 19 '16 13:08 dimitrieh

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.

vvo avatar Aug 22 '16 13:08 vvo

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

kevinsimper avatar Sep 08 '16 08:09 kevinsimper

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"

vvo avatar Sep 08 '16 08:09 vvo

@vvo or is it?

jmbeach avatar Dec 11 '16 15:12 jmbeach

@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 :)

vvo avatar Dec 14 '16 16:12 vvo

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

jmbeach avatar Dec 14 '16 17:12 jmbeach

NP :dancer:

vvo avatar Dec 14 '16 17:12 vvo

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.

AntiMoron avatar Nov 14 '17 07:11 AntiMoron

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.

waldyrious avatar Jan 18 '18 19:01 waldyrious

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

vvo avatar Jan 19 '18 08:01 vvo

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?

waldyrious avatar Jan 19 '18 09:01 waldyrious

As to updating the behaviour and usage, first you could update the usage here: https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L14

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?

vvo avatar Jan 19 '18 16:01 vvo

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

waldyrious avatar Jan 19 '18 17:01 waldyrious

Oh yeah, sorry I misread that.

As far as putting a "loading message" I would give a try here: https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L72

Which is the place where we already checked parameters etc.

Give it a try locally:

git clone [email protected]: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!

vvo avatar Jan 19 '18 20:01 vvo

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.

waldyrious avatar Jan 21 '18 23:01 waldyrious