Recherche avancée

Médias (39)

Mot : - Tags -/audio

Sur d’autres sites (147)

  • lavfi/noise : switch to AVLFG noise generator

    17 février 2013, par Paul B Mahol

    lavfi/noise : switch to AVLFG noise generator

  • ImgFlip Gif Generator

    30 juillet 2013, par user1960364

    Reference : http://imgflip.com/gifgenerator

    So, I don't need the web UI and all the cusomizations. But I've been trying to figure out how to slice and convert a mp4 or mov to an animated gif automagically. I've looked at several ways of doing it with imagemagick/ffmpeg but none of them rendered results as good as imgflip. I always end up with some 24bit color-looking gif instead or some impractically large file.

    Any suggestions/ideas on how to do it as efficiently as imgflip ?

    Thanks :)

    — Edit —
    I found this on reddit :

    #!/bin/bash

    # Extracts each frame of the video as a single gif
    ffmpeg -i $1 out%04d.gif

    # Combines all the frames into one very nicely animated gif.
    convert -delay 4 out*.gif anim.gif

    # Optimizes the gif using imagemagick
    convert -layers Optimize anim.gif optimized_output.gif

    # Cleans up the leftovers
    rm out*
    rm anim.gif

    Using that, I created (and yes, I'm on windows) :

    ffmpeg -i v.mp4 -r 10 -q:v 1 tmp/out%04d.jpg
    convert -delay 10 tmp/out*.jpg jpg-d10.gif
    echo y | del tmp

    And got decent quality, even this creates an 8MB file for a small 6sec 480x480 clip at 10fps. And because it's a video and not vector or series of images with very few colors, extracting jpg images does better compression than -layers Optimize. However, for some reason, -qscale/-q:v on the frame extraction does not effect the final file size, just the quality.

  • ffmpeg - how to add multiple overlay gifs on top of video + command generator runs forever

    7 juin 2021, par عبدالله لبيب

    the user will choose multiple gifs, scale them, put them in the desired position on screen, then they will be overlayed on top of a video ..

    


    in simple case where user choose only one gif to overlay .. this line was working very well for me, but now it runs forever !! :

    


    '-i video.mp4 -ignore_loop 0 -i gif1.gif -b:v 1M '
'-filter_complex [1:v]scale=${width - 30}:${height - 30}[ovrl],'
'[0:v][ovrl]overlay=${x -30}:${y - 30}:shortest=1 output.mp4';


    


    I used shortest=1 to prevent it from running forever, but now even with shortest=1 it runs forever .. when I remove it and ignore_loop 0 the running forever problem stops, but gif works only once then stop !!

    


    how to make it work for 3 or more gifs and how to stop it from running forever when I want to make gif looping ?