Closed jsheunis closed 1 year ago
What changed: just the "Use datalad" section, which now refers to the GUI as well as the CLI, and also shows a gooey gif and allows user to toggle between cli view and gooey view. The view automatically toggles every 20 seconds.
Video:
One challenge that still needs to be addressed is getting a small gif size. The current size is 5mb, which is way too high for a quick page load. I used ffmpeg to generate images from a .mov
file, and then to create a gif from these images, also scaling the size down to what still looked like decent quality (see code below), but this still results in a large file. I am not sure how this can be compressed more without making the quality bad. An alternative is making the video/gif shorter. Any thoughts?
ffmpeg -f image2 -framerate 30 -i gooey/out%02d.jpg -loop 0 -vf scale=1600:-1 gooey/gooey_30fps_scaled1600.gif
Is it possible to make "Graphical User Interface" a link that would toggle the demo animation immediately? ATM I think most people will have scrolled past that section before the 20s mark hits.
Cool idea. can do the same for the "command line interface"
Cool idea. can do the same for the "command line interface"
Eventually we can also add "python interface". So, +1 :)
@jsheunis any plans to complete this goodness?
@yarikoptic I think it's ready to merge apart from the large gif file size. @aqw do you have ideas about what else I can try here?
One challenge that still needs to be addressed is getting a small gif size. The current size is 5mb, which is way too high for a quick page load. I used ffmpeg to generate images from a .mov file, and then to create a gif from these images, also scaling the size down to what still looked like decent quality (see code below), but this still results in a large file. I am not sure how this can be compressed more without making the quality bad. An alternative is making the video/gif shorter. Any thoughts?
ffmpeg -f image2 -framerate 30 -i gooey/out%02d.jpg -loop 0 -vf scale=1600:-1 gooey/gooey_30fps_scaled1600.gif
@yarikoptic I think it's ready to merge apart from the large gif file size. @aqw do you have ideas about what else I can try here?
Uninformed side-comment: Would it work to host the gif elsewhere instead of committing it, and supplying the hosting url as a src
?
Uninformed side-comment: Would it work to host the gif elsewhere instead of committing it, and supplying the hosting url as a
src
?
That's possible, but doesn't decrease the size of the asset delivered. And if it's not a place we're hosting, then it's known as hotlinking, which is frowned upon. :-)
Sad, but thanks for the explanation - TIL :)
@yarikoptic I think it's ready to merge apart from the large gif file size. @aqw do you have ideas about what else I can try here?
One challenge that still needs to be addressed is getting a small gif size. The current size is 5mb, which is way too high for a quick page load. I used ffmpeg to generate images from a .mov file, and then to create a gif from these images, also scaling the size down to what still looked like decent quality (see code below), but this still results in a large file. I am not sure how this can be compressed more without making the quality bad. An alternative is making the video/gif shorter. Any thoughts?
ffmpeg -f image2 -framerate 30 -i gooey/out%02d.jpg -loop 0 -vf scale=1600:-1 gooey/gooey_30fps_scaled1600.gif
There's a few options:
I have a command in my history when we were working on the studyforrest website. No idea what this monstrosity means anymore, but perhaps it's a useful starting point. :-)
ffmpeg -i freesurfer_parcellations.mp4 -vf "fps=1,scale=1600:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=48:reserve_transparent=0[p];[s1][p]paletteuse" -loop 0 output.gif
Obviously, adjust framerate and scale, etc to your needs.
Thanks @aqw will try these options
Ended up with the following:
ffmpeg -i gooey.mov -vcodec h264 -acodec aac -vf "setpts=0.4*PTS,scale=1600:-1" gooey_converted_pts04_scale1600.mp4
got it down to 1.6 MB from ~6MB.
Ok, merging this. If we realise in future that we want to change the gooey video, let's do that in a new issue+PR.
This PR: