Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Is there an option in ffmpeg to make a 50 fps video to 25 fps with double duration

    13 juin 2016, par somya bhargava

    Have a 5 sec video with 50 fps Want to convert it to a 25 fps video with 10 seconds and everything slowed down even the audio Is it possible using ffmpeg

  • Add two watermark on ffmpeg video

    13 juin 2016, par Garry

    How can i add two watermark on a ffmpeg video at different different location. Can someone suggest me how can add two watermarks on the same video?

    Following is my command:-

          cmd = " -i "+VideoPathonSdCard+" -i "+ImagePath+" -metadata:s:v rotate=0 -filter_complex vflip,transpose=0,overlay=(W-w)/2:(H-h)/2,drawtext=fontsize="+TextSize+":fontfile=/system/fonts/DroidSans.ttf:fontcolor="+hexColor+":text="+ Constants.enStr(Text.trim())+":x="+x+":y="+y+"+40 -y -preset ultrafast -strict -2 "+VideoAfterEdit_Path;
    
  • Images to video in Prezi format

    13 juin 2016, par sammy34

    I have five *.jpeg image files: m01.jpeg to m05.jpeg.

    I'd like to make a video of a sequence of these five images and upload it to Prezi to use in a presentation.

    FFMPEG seems to be the tool for the job here. I am generating a video using the following command:

    ffmpeg -r 2 -i m%02d.jpeg -pix_fmt yuvj420p myvideo.mp4
    

    This generates a video that I can play fine locally. Unfortunately, when I try to upload the video to Prezi, I always get the following error...

    "Technical details: id: 2110 the reason is: Event [Event type="stateChange" bubbles=false cancelable=false eventPhase=2]"
    

    ...which isn't particularly informative.

    If I upload a sample MP4 from the web to Prezi, it works fine.

    My question: Does anybody know what I need to give FFMPEG as parameters here so that it will generate a Prezi-compatible video from these images?

    EDIT: As requested, here's the complete console output for FFMPEG. Unfortunately there are no glaring warnings or errors that I can see.

    sam@x220sm:~/tmp$ ffmpeg -r 2 -i m%02d.jpeg -pix_fmt yuvj420p myvideo.mp4
    ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
      configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
      libavutil      54. 31.100 / 54. 31.100
      libavcodec     56. 60.100 / 56. 60.100
      libavformat    56. 40.101 / 56. 40.101
      libavdevice    56.  4.100 / 56.  4.100
      libavfilter     5. 40.101 /  5. 40.101
      libavresample   2.  1.  0 /  2.  1.  0
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  2.101 /  1.  2.101
      libpostproc    53.  3.100 / 53.  3.100
    [mjpeg @ 0xd8e620] Changeing bps to 8
    Input #0, image2, from 'm%02d.jpeg':
      Duration: 00:00:00.20, start: 0.000000, bitrate: N/A
        Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 800x600 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc
    [libx264 @ 0xd910c0] using SAR=1/1
    [libx264 @ 0xd910c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0xd910c0] profile High, level 3.1
    [libx264 @ 0xd910c0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'myvideo.mp4':
      Metadata:
        encoder         : Lavf56.40.101
        Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p(pc), 800x600 [SAR 1:1 DAR 4:3], q=-1--1, 2 fps, 16384 tbn, 2 tbc
        Metadata:
          encoder         : Lavc56.60.100 libx264
    Stream mapping:
      Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=    5 fps=0.0 q=-1.0 Lsize=    1170kB time=00:00:01.50 bitrate=6390.8kbits/s    
    video:1169kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.073660%
    [libx264 @ 0xd910c0] frame I:1     Avg QP:25.54  size:289842
    [libx264 @ 0xd910c0] frame P:4     Avg QP:20.54  size:226716
    [libx264 @ 0xd910c0] mb I  I16..4:  0.0%  0.2% 99.8%
    [libx264 @ 0xd910c0] mb P  I16..4: 16.8% 23.8% 59.4%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip: 0.0%
    [libx264 @ 0xd910c0] 8x8 transform intra:19.1% inter:0.0%
    [libx264 @ 0xd910c0] coded y,uvDC,uvAC intra: 84.5% 85.6% 79.2% inter: 50.0% 100.0% 100.0%
    [libx264 @ 0xd910c0] i16 v,h,dc,p: 95%  1%  4%  0%
    [libx264 @ 0xd910c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6%  8% 38%  7%  7%  6% 11%  9%  9%
    [libx264 @ 0xd910c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8%  9% 23%  9%  9%  8% 14%  9% 11%
    [libx264 @ 0xd910c0] i8c dc,h,v,p: 72% 10%  5% 13%
    [libx264 @ 0xd910c0] Weighted P-Frames: Y:50.0% UV:50.0%
    [libx264 @ 0xd910c0] ref P L0: 50.0% 50.0%
    [libx264 @ 0xd910c0] kb/s:3829.46
    
  • Build ffmpeg in ijkplayer

    13 juin 2016, par Saty

    I am trying to do a build of ffmpeg inside ijkplayer and following this link to do a manual install https://github.com/Bilibili/ijkplayer. I downloaded the ndk and setup the path and setup the path for sdks and then compiling ffmpeg.

    previously, it shows to use ndk9 or later and found out from an post to change to do-compile-ffmpeg.sh from compile-ffmpeg.sh. I changed the file according to ndk-11 now its showing me the below line to specify the architechture. Where to mention that architecture.

    ./do-compile-ffmpeg.sh
     ====================
     [*] check env 
     ====================
     build on Darwin x86_64
     ANDROID_SDK=/username/Library/Android/sdk
     ANDROID_NDK=/Users/username/Documents/android-ndk-r11c
     You must specific an architecture 'arm, armv7a, x86, ...'.
    
  • Have a one liner, ffmpeg script to process and audio file would love to run it on AWS Lambda

    13 juin 2016, par Edward Potter

    Ok, wow, got Lambda to work processing my ImageMagick script. Would love to have that work with ffmpeg. It's a one liner, just don't see an easy way to do that. I can now upload anything to a S3 bucket.

    Mounting S3 on EC2 seems possible, do the processing local, then move it to S3, but the Lambda option seems far more interesting. Wondering if any insights (or references, suggestions) on how to implement that. Thanks.

    The script:

    ffmpeg -i $i -b:a 48k -ar 16000 -f mp3 "$i"