Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Compilation of x264 with newest libswscale and libavformat

    4 décembre 2016, par pcroland

    Yesterday I wanted to compile x264 myself because the latest binary on videolan is compiled without libswscale: link

    If I just use

    ./configure --enable-static --enable-shared
    

    then the binary will compile libswscale 3.1.101 and libavformat 56.40.101 from the libswscale-dev and libavformat-dev packages. If I clone FFmpeg's git and use

    ./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg"
    

    the binary will have the latest libswscale and libavformat, but it wont work:

    pc@pcroland:~/bin$ ./x264 --version
    x264 0.148.2744 b97ae06
    (libswscale 4.3.101)
    (libavformat 57.58.101)
    built on Dec  4 2016, gcc: 5.4.0 20160609
    x264 configuration: --bit-depth=8 --chroma-format=all
    libx264 configuration: --bit-depth=8 --chroma-format=all
    x264 license: GPL version 2 or later
    libswscale/libavformat license: GPL version 2 or later
    pc@pcroland:~/bin$ ./x264 --input-res 1920x1080 --fps 24000/1001 --vf resize:720,404,method=spline --output /home/pc/test.264 /home/pc/asd.264
    [h264 @ 0x1bc3ec0] Format h264 detected only with low score of 1, misdetection possible!
    [h264 @ 0x1bc3ec0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    lavf [error]: could not find input stream info
    avs [error]: failed to load avisynth
    raw [info]: 1920x1080p 0:0 @ 24000/1001 fps (cfr)
    resize [info]: resizing to 720x404
    x264 [info]: using SAR=404/405
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    x264 [info]: profile High, level 3.0
    Bus error (core dumped)
    pc@pcroland:~/bin$
    

    How to reproduce the error:

    cd; git clone https://github.com/FFmpeg/FFmpeg; git clone http://git.videolan.org/git/x264.git; cd x264; ./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg" --bindir="$HOME/bin"; sudo make; sudo make install
    

    System: Ubuntu 16.04

  • Android - concatenate two videos

    4 décembre 2016, par Marc Plano-Lesay

    I'm trying to concatenate two videos on Android. I'm already using ffmpeg for other needs, but I'm using halfninja's one, which is only 0.9. The 0.9 one doesn't allow the following ways to do it:

    // filter_complex isn't recognized
    vk.run(new String[] {
            "ffmpeg",
            "-i",
            inputFile1,
            "-i",
            inputFile2,
            "-filter_complex",
            "'[0:1] [0:0] [1:1] [1:0] concat=n=2:v=1:a=1 [v] [a]'",
            "-map",
            "'[v]'",
            "-map",
            "'[a]'",
            outputFile
    });
    
    // Or, after converting the two videos to ts, trying to merge them: concat:file1.ts|file2.ts: No such file or directory
    vk.run(new String[] {
            "ffmpeg",
            "-i",
            "'concat:" + ts1 + "|" + ts2 + "'",
            "-vcodec",
            "copy",
            "-acodec",
            "copy",
            "-absf",
            "aac_adtstoasc",
            output
    });

    The third thing I tried is to use the concat demuxer explained here, which isn't recognized with ffmpeg 0.9 either.

    Is there any way to concatenate two videos on Android with ffmpeg 0.9 (or another library)?

  • Browsers based Live video chat with no flash [on hold]

    4 décembre 2016, par cheinan

    On server side I need to convert the uploded incoming webRTC streming into sequence of binary image data with ffmpeg for example or other tool

    Dose anyone have an idea how to do this?

  • How to translate bgr data to CVPixelBufferRef ?or how to play just bgr data in iOS

    4 décembre 2016, par warlock

    I have got some RGB data used live555 & FFmpeg, but how can I play it as a video?

    I Google a lot and found that avplayer maybe help. Others I searched link me to UIImage translate to rgb...or your search returned no matches.

    This is one I searched, but it is "Create ", not "Play ".

    possible to create a video file from RGB frames using AV Foundation

    I try to use AVsampleBufferDisplayLayer, but I don't know how to translate.

    Anyone can help?

  • ffmpeg x264 encoding cpu usage

    4 décembre 2016, par Amin Fazlali

    I want to convert a mkv formatted video to mp4, using the ffmpeg application. and for that I ran below command in terminal:

    ffmpeg -y -i c38a4990774b3c23.mkv -c:v libx264 -c:a aac -r 25 -strict -2 -map_metadata -1 -movflags faststart -vf "crop=1920:800:0:4, scale=iw*min(426/iw\,240/ih):ih*min(426/iw\,240/ih), pad=426:240:(426-iw*min(426/iw\,240/ih))/2:(240-ih*min(426/iw\,240/ih))/2, setsar=sar=1" output.mp4

    I have compiled ffmpeg with --enable-pthread configuration

    when I run this command on my personal PC with a 3.2GHz quad core cpu, it uses 60% of overall cpu process and encode video with 150fps; but when I run this command on a production server with 8 2.4GHz dual core cpu (16 core) it only uses up to 20% of overall cpu process and encode video with 97fps.

    I have also tried ramdisk but I got no performance improvement.