Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • overlay n previouse frame as red and n future frame as green, using ffmpeg

    27 mars 2017, par 12.yakir

    How can I use ffmpeg to overlay the current frame with the difference between the current frame and the frame from (say) 10 frames ago encoded as (say) red, and overlay that with the difference between the current frame and the frame from (say) 10 frames ahead encoded as (say) green...?

    It should output a single video, with the history, present, and future overlayed on-top of each other.

    After reading about ffmpeg filters, I suspect I'll need to use some magical combination of: split, itsoffset, blend, difference, filter_complex, overlay, and maybe tblend..?

    It would be awesome if I could also scale down the video first (before any eventual splitting) to make it go faster (the spatial resolution of the videos I need to work with is overly high).

    Impossible?

  • Is it possible to dynamically change video encoder parameters ?

    27 mars 2017, par Andi Domi

    I would like to know if I can dynamically change video encoder parameters for a given video? For example I would like to start encoding a raw video in H.264/H.265 for the first 10s in 30fps and then, while the encoder is still working, change the fps to 20 for the rest of it. Thanks in advance for your help.

  • Im getting error "deprecated pixel format used, make sure you did set range correctly using ffmpeg".. can someone check my code below ?

    27 mars 2017, par Mavs Mavs

    This is my code using ffmpeg i want to have video thumbnail but im not familiar in ffmpeg can someone know the error i got.

    [swscaler @ 0x7ff8da028c00] deprecated pixel format used, make sure you did set range correctly
    Output #0, mjpeg, to 'image.jpg':
    Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf56.36.100
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 320x240 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (default)
    Metadata:
      creation_time   : 2016-11-06 09:40:22
      handler_name    : ISO Media file produced by Google Inc.
      encoder         : Lavc56.41.100 mjpeg
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=4.8 Lsize=      16kB time=00:00:01.00 bitrate= 129.5kbits/s    
    video:16kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
    

    Also This is my code:

    $video_url ='https://URL/upload/4b8acab123563649f19e07450d810df6.mp4';
    
    
     $ffmpeg = '/opt/local/bin/ffmpeg';
     $image = 'image.jpg';
     $interval = 5;
     $size = '320x240';
     shell_exec($tmp = "$ffmpeg -i $video_url -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");  
    
  • ffmpeg & watermark issue on convert movie

    27 mars 2017, par Sebastian Schweinste

    after update of WinFF i get error:

    "C:\Program Files (x86)\WinFF\ffmpeg.exe" -t 0:00:25 -y -i "c:\Videos\temp\input.mpg" -f mp4  -r 14 -vcodec libx264 -coder 1 -flags +loop+cgop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method hex -subq 7 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 0 -qmax 69 -qdiff 4 -bf 3 -refs 3 -direct-pred 1 -trellis 1 -wpredp 2 -vf scale=240:180 -aspect 4:3 -maxrate 800k -bufsize 80k -b:v 400k -ar 44100 -b:a 80k -ac 2 -b 650k  -vf "movie="c:\Videos\watermarklogo.png" [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]" "c:\Videos\new\output.mpg"
    

    error: Filtergraph 'scale=240:180' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph. -vf/-af/-filter and -filter_complex cannot be used together for the same stream.

    i downt know how to fix

  • Ffmpeg to convert gif to webm with reverse function

    27 mars 2017, par user3306104

    I'm trying to convert a gif file to webm file using the below which works fine however I’m wondering is it also possible to reverse it as well using ffmpeg or would I need to reverse it using imagemagick first then cover it using ffmpeg

    ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
    

    Any help is appreciated