Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Video from set of images with fading

    29 mars 2017, par MarkusHH

    i need to generate a video (mp4) from a set of images in a folder. My command works fine but i want the frames to fade in/out, crossfade or something to make the vid "smoother".

    My command:

    exec("ffmpeg -framerate 30  -y -pattern_type glob -i 'images/*.jpg' -filter:v scale=1280:-1 -q:v 0 -vcodec mpeg4 -strict -2 -movflags faststart folder/video.mp4 2> ffmpeg_log.txt");
    

    Thanks for any assistance

  • ffmpeg - extract exact number of frames from video

    29 mars 2017, par Michael B

    I want to create a maximum of 30 images from a video (and tile them for a sprite sheet).

    I've tried using the 'select' with 'mod' but if the total number of frames does not fit neatly into the desired number of images (30) then I sometimes end up with more images, sometimes less.

    For example if my video is 72 frames long, my 'mod' would be 72 / 30, which is 2.4.

    I'm running this from a python script so i'm doing something like the following for the filter:

    select='not(mod(n\," + str(mod) + "))'
    

    I think the mod has to be an integer (?) so I could either round down and use 2 which gives me 36 images or round up which gives me 24 images

    Whats the best way to get exactly 30? - obviously the interval wouldn't be identical but thats fine.

    Maybe I could use a for loop to generate a list of the frames closest to the desired interval and then pass that in as the select filter?

    e.g. to get the frames I would do something like this:

    nframes = 72 # number of frames in video
    outImages = 30 # number of images I want
    mod = float(nframes) / outImages # 2.4
    
    frames = []
    
    idx = 1
    
    while i < nframes:
        print str(idx) + ": " + str(math.floor(i+0.5)) 
        frames.append(int(math.floor(i+0.5)))
        idx += 1
        i += mod
    

    Then am I able to pass that (the frames list) into the ffmpeg command? Or can I tell ffmpeg to do something similar?

  • ffmpeg- blend transition between images specified in a text file

    29 mars 2017, par hack

    how can i create a blend transition effect between specified images? I have the file paths to images in a text file. My requirement is that i should be able to do a blend transition between specific images (whose path are in text file) for a specific duration. I also have to annotate these images with text.For that i am using drawtext filter. The blend transition should be between annotated images.

    Thanks

  • How to add progress bar to FFMPEG android

    29 mars 2017, par sunil yadav

    I want add a progress bar during FFMPEG execution android.

    When i start FFMPEG command then progress bar start with percentage progress.

  • How we compressed videofile (all format) in android programmatically

    29 mars 2017, par prakash choudhary

    i am stuck with the funtionality for the compressed video before upload to the Amazon s3. i am looking functionality like the whatsup that compressed all the video of the gallery and camera after R&D i got FFmpeg library but that is increasing size of the app apk.Please there is any alternative t? Any idea about this problem