jesseduffield / lazygit

simple terminal UI for git commands
MIT License
50.87k stars 1.79k forks source link

replace gifs with seek controllable videos #2864

Open goyalyashpal opened 1 year ago

goyalyashpal commented 1 year ago

Topic The gifs in the README.md arre superb, but gifs are not seekable on github. So, no way to pause, rewind etc.

Your thoughts Replace them with videos

jesseduffield commented 1 year ago

Hmm I'll need to see if terminalizer supports that (that's what I'm currently using).

videos don't auto-play, do they?

goyalyashpal commented 1 year ago

videos don't auto-play, do they?

umh, no, i don't think they do.

but u can leave the topmost gif intact - the one which accompanies the title of the readme

and the later ones - the ones in the far down - can be better served as vids? right?

jesseduffield commented 1 year ago

Yeah I like that idea

goyalyashpal commented 1 year ago

see if terminalizer supports that

u're on mac right?

if on windows, then sharex is pretty good...

jesseduffield commented 1 year ago

I'm on mac, but in general I want an automated way to generate these demo recordings i.e. something that you could put in a Dockerfile.

goyalyashpal commented 1 year ago

but in general I want an automated way to generate these demo recordings i.e. something that you could put in a Dockerfile.

ohw, wow.. fascinating. i didn't know such a thing even existed. awesome....

goyalyashpal commented 1 year ago

I want an automated way to generate these demo recordings

u can convert the gifs into mp4 using ffmpeg cli?

i can share the ffmpeg output settings used by sharex which give pretty decent results.

jesseduffield commented 1 year ago

So I've got a PR for this: https://github.com/jesseduffield/lazygit/pull/2866

But, github does not let you store mp4s in your repo and then link them from the readme. The only way to get an mp4 into your readme is to drag and drop. This is annoying because I want these demos to be easily re-recorded programmatically. I'm leaning towards sticking to gifs until github fixes this (purely out of laziness) but am open to persuasion that the extra effort is worth it for mp4s

stefanhaller commented 1 year ago

Have you considered versioning the files in git, e.g. in a movies subfolder? That would also allow previewing locally in a markdown editor.

goyalyashpal commented 1 year ago

gifs are not inherently problematic the problem lies in the fact that they don't have seek control in their player.

example of ability to play/pause & iirc seek gifs too: org.voidptr.swpieview sad this isn't available anywhere else.


another solution could have been to use the likes of text streams. these can be from various softwares like terminalizer (u're already using this), asciinema, showterm, or ttygif

but here again, problem lies in - if a player exist for these and for github. again, sad that text stream files are not standardized or have systemwide player support

asciinema sure does provide a player; it can even be used in hosted websites but is that available in github readmes - don't know.

jesseduffield commented 1 year ago

Have you considered versioning the files in git, e.g. in a movies subfolder? That would also allow previewing locally in a markdown editor.

That PR does version the files in a folder but in a dedicated assets branch so that it doesn't clog up the code branch. That works fine with gifs, but not with mp4s (when viewed in the browser)

@goyalyashpal yeah it's a shame so few options exist for playing vids in gihtub

stefanhaller commented 1 year ago

Ah, I should have read the code. 😄

What's the problem with putting them in the main branch though? I thought the concern was repo size, i.e. the time it takes for people to fetch. But we're all now already fetching the the files even though there just in the assets branch, so that wouldn't make a difference. So then it's just working copy size, but disk space is cheap, so why worry about that?

jesseduffield commented 1 year ago

Good question. The best argument I can make for it is that it's much easier to clean up history if we want to by rebasing the assets branch without needing to touch the main branch. So if we do end up with loads of gifs we can keep the overall size of the repo low by just deleting old ones. My worry is that I go crazy with gifs and add a hundred of them and then every now and then decide I want to change the colour scheme of them all and then regenerate them. That can add up pretty fast

goyalyashpal commented 1 year ago

My worry is that I go crazy with gifs and add a hundred of them and then every now and then decide I want to change the colour scheme of them all and then regenerate them. That can add up pretty fast

site hosting using static pages and using the likes of asciinema player seems to be the way ahead then.

require upfront time one time, yes, but provides flexibility & the required decoupling. also i would assume it should provide savings on space.

stefanhaller commented 1 year ago

One downside of the assets branch approach that I just realized is that the videos don't show up in forks. (I guess they would if you replaced the .. with absolute URIs pointing at your repo.)

I also noticed that some of the screenshots in other .md files are hosted on imgur, so that might be another option.

goyalyashpal commented 1 year ago

hosted on imgur, so that might be another option.

how bout hosting on youtube?

goyalyashpal commented 1 year ago

discourse has ability to pause gifs since [discourse v2.7 i.e. 2021-05 .

I am excited about all the new features, but my favorite by far is the ability to pause gifs. - @tobiaseigen at discourse-2-7