TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Making GIFs From Video Files With Python

285 pointsby killahpriestover 11 years ago

18 comments

w1ntermuteover 11 years ago
Please use silent HTML5 videos instead of animated GIFs wherever possible. They are much more bandwidth- and CPU-efficient. This site allows you to automatically upload&#x2F;convert animated GIFs into that format: <a href="http://gfycat.com/" rel="nofollow">http:&#x2F;&#x2F;gfycat.com&#x2F;</a><p>The links allow you to see the animated GIFs as well, if viewer&#x27;s device doesn&#x27;t support HTML5.
评论 #7121322 未加载
评论 #7121900 未加载
评论 #7121277 未加载
评论 #7121962 未加载
评论 #7121222 未加载
评论 #7121758 未加载
killahpriestover 11 years ago
Originally from&#x2F;more discussion at <a href="http://www.reddit.com/r/programming/comments/1w2c58/a_few_animated_gifs_and_their_python_code_xpost/" rel="nofollow">http:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;1w2c58&#x2F;a_few_an...</a>
olssonmover 11 years ago
Nice! Also check out: &quot;Stupid programmer tricks and Star Wars .gif&quot;: <a href="http://rarlindseysmash.com/posts/stupid-programmer-tricks-and-star-wars-gifs" rel="nofollow">http:&#x2F;&#x2F;rarlindseysmash.com&#x2F;posts&#x2F;stupid-programmer-tricks-an...</a><p>Also Python, but uses VideoLan (VLC) to some extent to create really nifty Star Wars gifs.
theophrastusover 11 years ago
(on &#x27;jessie&#x27;):<p>apt-cache search &#x27;movie.&lt;asterisk&gt;python|python.&lt;asterisk&gt;movie&#x27;<p>... &lt;squatmo-germane&gt; ...<p>well, nutz.<p>(and how the hell do you type a real asterisk in this comment forum? tried escapes... tried html entities...)
评论 #7122221 未加载
donbronsonover 11 years ago
This is awesome and much easier than writing FFMPEG commands (which is what I do now). An enhancement could be adding voice to text.
drakaalover 11 years ago
Anyone done a benchmark of this vs AVISynth? I have software I wrote in AVISynth for doing 2d to 3d Stereoscopic upconversion based on motion and parallax. I have often wished I had it in something more &quot;real&quot; like Python.
评论 #7123632 未加载
pronoiacover 11 years ago
This is nifty! Though it&#x27;s tempting to draft a GUI for it.
jrockwayover 11 years ago
This is much nicer than my normal method of getting the frames with mplayer -vo png and then using ImageMagick to assemble the frames into an animated GIF.
idocoover 11 years ago
I just watched the whole &#x27;Pigs in a polka&#x27; video and it is so good! The API is also very cool :)
stephenitisover 11 years ago
@Schneems has a really good tutorial on this using ffmpeg. <a href="http://www.schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil/" rel="nofollow">http:&#x2F;&#x2F;www.schneems.com&#x2F;post&#x2F;41104255619&#x2F;use-gifs-in-your-pu...</a>
JoshTriplettover 11 years ago
mplayer can do this as well:<p><pre><code> mplayer videofile -vo gif89a:fps=15:output=video.gif </code></pre> You can use mplayer&#x27;s other options to set the start time, duration, and cropping.
gioiover 11 years ago
Thank you! I&#x27;ve never met MoviePy and it looks really good. I&#x27;m waiting for libopenshot to be released, what do you think about it?
na85over 11 years ago
Isn&#x27;t this overkill? You can get the exact same result with FFMPEG and a single shell command.<p>Seems like a solution in search of a problem.
评论 #7124206 未加载
lassseover 11 years ago
I use <a href="http://www.gifrocket.com/" rel="nofollow">http:&#x2F;&#x2F;www.gifrocket.com&#x2F;</a> for Mac.
radoslawcover 11 years ago
Nice, kept me occupied for an hour :) also I must say author did a great job with module and documentation.
Chromozonover 11 years ago
Very well made tutorial.
mattdeboardover 11 years ago
Very nice API.
lawsohardover 11 years ago
this is awesome