Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to compile ffmpeg with x11grab ? xlib missing

    12 décembre 2015, par Shuman

    I am compiling ffmpeg on centos 7.1 x64. The error message I got is

    #### FFmpeg static build, by STVS SA ####
    *** Building FFmpeg ***
    ERROR: Xlib not found
    

    config.log

    gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -static --static -std=c99 -fomit-frame-pointer -pthread -I/home/shuman/github/ffmpeg-static/target/include/opus -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -I/home/shuman/github/ffmpeg-static/target/include -c -o /tmp/ffconf.eYdD6TBQ.o /tmp/ffconf.UnBT7bp1.c
    gcc -L/home/shuman/github/ffmpeg-static/target/lib -lm -L/home/shuman/github/ffmpeg-static/target/lib -lm -static -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.6gKhjd90 /tmp/ffconf.eYdD6TBQ.o -lxcb -lxvidcore -L/home/shuman/github/ffmpeg-static/target/lib -lx264 -lpthread -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -L/home/shuman/github/ffmpeg-static/target/lib -lvpx -lm -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -L/home/shuman/github/ffmpeg-static/target/lib -lrtmp -lz -lssl -lcrypto -L/home/shuman/github/ffmpeg-static/target/lib -lopus -lmp3lame -lfaac -lm -lbz2 -lz -pthread -ldl -lXext
    /usr/bin/ld: cannot find -lxcb
    collect2: error: ld returned 1 exit status
    ERROR: Xlib not found
    

    but I have yum installed libxcb, what could be the reason for this?

    edit:

    $ rpm -qa | grep libxcb
    libxcb-devel-1.11-4.el7.x86_64
    libxcb-1.11-4.el7.i686
    libxcb-1.11-4.el7.x86_64
    compat-libxcb-1.9-1.el7.x86_64
    
    $ locate xcb.h
    /home/shuman/Downloads/buildroot/package/x11r7/libxcb/libxcb.hash
    /usr/include/X11/Xlib-xcb.h
    /usr/include/cairo/cairo-xcb.h
    /usr/include/xcb/xcb.h
    
    $ locate xcb.so
    /home/shuman/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/libX11-xcb.so.1
    /home/shuman/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/plugins/platforms/libqxcb.so
    /usr/lib/libX11-xcb.so
    /usr/lib/libX11-xcb.so.1
    /usr/lib/libX11-xcb.so.1.0.0
    /usr/lib/libxcb.so.1
    /usr/lib/libxcb.so.1.1.0
    /usr/lib64/libX11-xcb.so
    /usr/lib64/libX11-xcb.so.1
    /usr/lib64/libX11-xcb.so.1.0.0
    /usr/lib64/libxcb.so
    /usr/lib64/libxcb.so.1
    /usr/lib64/libxcb.so.1.1.0
    

    edit: it turns out that it's because I'm not using the correct configure commandline, after following this guide, it works now

    CFLAGS="-I$TARGET_DIR/include" LDFLAGS="-L$TARGET_DIR/lib" ./configure --prefix=${OUTPUT_DIR:-$TARGET_DIR} --extra-cflags="-I$TARGET_DIR/include" --extra-ldflags="-L$TARGET_DIR/lib"  --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-librtmp
    

    in which, $TARGET_DIR is where all the dependency libs installed, this is part of my static ffmpeg build script ( with librtmp and libx265 and x11grab)

  • ffmpeg image scroll based on size and zoom particular position

    12 décembre 2015, par Lali

    Is it possible to create a video using FFMPEG where it should look like as if we are scrolling the page and zoomin particular location. I don't have correct example but you can check this video http://avideos.5min.com//9/5193009/519300834_2.mp4 where the first google page scroll effect and along with that i need zoomin option as well.

    If i use the below code it just zoomin but i need scroll and zoomin (vise versa as well)

    ffmpeg -r 45 -i 1.png -vf "zoompan=z='min(zoom+0.0015,1.5)':d=335" -shortest  -pix_fmt yuv420p video1.mp4
    
  • Can OpenCV handle the error when ffmpeg fails ?

    12 décembre 2015, par wking

    I am using CV::VideoCapture to capture frames from an IP camera. It works most of time, however, sometimes it reports the error:

    [mjpeg @ 0x233aea0] overread 8
    

    And when this error occurred, my program just stuck there. This might explain why. But how can I solve it in C++ code? Can OpenCV handle this error without terminate the program?

    p.s. I found that if I didn't call CV::VideoCapture::read() immediately, but wait for a while, like 60 seconds, after CV::VideoCapture::open(), this error occurred everytime! Is it a bug of OpenCV?

  • Does ffmpeg not support icod ? Where should I start to dig the issue ?

    12 décembre 2015, par hdf

    I try to decode some video files using ffmpeg, but get errors caused by icod codec.
    Here's the file's ffprobe info:

    user:~$ ffprobe input.mov
    ffprobe version 1.2.3 Copyright (c) 2007-2013 the FFmpeg developers
      built on Jan 15 2014 23:08:14 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
      configuration: --enable-zlib --enable-libmp3lame --enable-libx264 --enable-gpl --enable-nonfree --enable-pic
    

    ...

        Stream #0:0(eng): Video: none (icod / 0x646F6369), 1280x720, 52569 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 5994 tbn, 5994 tbc
        Metadata:
          creation_time   : 2014-01-27 05:09:24
          handler_name    : Apple Alias Data Handler
          timecode        : 21:03:24:08
        Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
        Metadata:
          creation_time   : 2014-01-27 05:09:24
          handler_name    : Apple Alias Data Handler
        Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
        Metadata:
          creation_time   : 2014-01-27 05:09:24
          handler_name    : Apple Alias Data Handler
          timecode        : 21:03:24:08
    Unsupported codec with id 0 for input stream 0
    Unsupported codec with id 0 for input stream 2
    
  • what is The fastest way to scale down a H264 video in 2:1 ?

    12 décembre 2015, par 李天宇

    when I use ffmpeg to scale a H264 video. It seems that the video is decoded to the raw graph then scaled then encoded again. But if the speed is very critical,is there a faster way if I specify a “good" ratio like 2:1, as if I want to pick up one pixel in every four?

    I know a bit how h264 works, 8*8/4*4 pixels are coded as a group,so it's not easy to pick up 1/4 pixels in its range. But is there a way to merge 4 group into one quickly?