Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Buffer overrun Blackmagic Intensity 4K as input to FFmpeg

    24 mai 2016, par colossus47

    I am trying to take direct video output from a 4k Sony Handycam, via HDMI directly into a Blackmagic Intensity Pro 4K. I can verify that the camera, Hdmi and blackmagic card are working as I can capture and view video using the provided "Media Express" program. When use ffmpeg I do get video output but I also get a buffer overrun.

    Here is the command:

    time ffmpeg -f decklink -i "Intensity Pro 4K@20" -c:v nvenc -b:v 100M -vf yadif=0:-1:0" -pix_fmt yuv420p -crf 29.97 -strict -2 output.mp4
    

    And I get the following output:

    ffmpeg version N-76538-gb83c849 Copyright (c) 2000-2015 the FFmpeg 
    
    developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
    configuration: --enable-nonfree --enable-nvenc --enable-nvresize --extra-cflags=-I../cudautils --extra-ldflags=-L../cudautils --enable-gpl --enable-libx264 --enable-libx265 --enable-decklink --extra-cflags=-I/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include --extra-ldflags=-L/home/tristan/Downloads/BlackmagicDeckLinkSDK10.6.5/Linux/include
    libavutil      55.  5.100 / 55.  5.100
    libavcodec     57. 15.100 / 57. 15.100
    libavformat    57. 14.100 / 57. 14.100
    libavdevice    57.  0.100 / 57.  0.100
    libavfilter     6. 15.100 /  6. 15.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    [decklink @ 0x1ccd6e0] Found Decklink mode 3840 x 2160 with rate 29.97
    [decklink @ 0x1ccd6e0] Stream #1: not enough frames to estimate rate; consider increasing probesize
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, decklink, from 'Intensity Pro 4K@20':
    Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 3840x2160, -5 kb/s, 29.97 tbr, 1000k tbn, 29.97 tbc
    Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (output.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
    File 'output.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'output.mp4':
    Metadata:
    encoder         : Lavf57.14.100
    Stream #0:0: Video: h264 (nvenc) ([33][0][0][0] / 0x0021), yuv420p, 3840x2160, q=-1--1, 100000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
    Metadata:
    encoder         : Lavc57.15.100 nvenc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
    encoder         : Lavc57.15.100 aac
    Stream mapping:
    Stream #0:1 -> #0:0 (rawvideo (native) -> h264 (nvenc))
    Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.15 bitrate=70411.7kbits/s   
    Last message repeated 1 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.54 bitrate=73110.9kbits/s   
    Last message repeated 20 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:03.92 bitrate=76270.2kbits/s   
    Last message repeated 15 times
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!:04.28 bitrate=78367.6kbits/s   
    Last message repeated 61 times
    frame=  140 fps= 22 q=-0.0 Lsize=   57266kB time=00:00:04.67 bitrate=100425.2kbits/s   
    video:57187kB audio:72kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.009844%
    [decklink @ 0x1ccd6e0] Decklink input buffer overrun!
    Last message repeated 7 times
    [aac @ 0x1cd7020] Qavg: 215.556
    
    real   0m8.808s
    user   0m5.785s
    sys   0m1.749s
    

    Some sort of insight into this, be that just some commands that may fix it the issue, or otherwise.

  • Xcode iOS import FFMPEG-ios binary

    24 mai 2016, par AlecGamble

    So I have an Xcode project which I built for my mac recently as a .cpp file. It utilises OpenCV and FFMPEG to apply a filter effect to a video by splitting it into frames using FFMPEG then applying some OpenCV matrix manipulation to it and then using FFMPEG to recompile it into a video format. I wanted to port this effect to an iOS project I'm working on however previously I was just using system to directly pipe the commands for FFMPEG rather than importing the libraries (which I know is probably terrible practice and I want to move away from, it was just convenient at the time).

    So in my new project I have downloaded the ffmpeg ios binaries from:

    https://downloads.sourceforge.net/project/ffmpeg-ios/ffmpeg-ios-master.tar.bz2

    and linked all of the .a files with the project.

    enter image description here

    I was wondering if this is the correct approach and where to go from here?

    previously I was just using:

    system(
         "ffmpeg "
         "-i /Users/.../video/filename"
         "-r 30 "
         "/Users/.../pictures/img_%03d.png"
         );
    

    Does anybody know how I could achieve the same effect now?

    Thanks.

  • G729 Streaming with ffmpeg

    24 mai 2016, par MaramWadi

    I am working in live streaming project where my server stream audio as rtp packets and my client receive the streaming using ffmpeg and ffplay, the ffplay that I use is :

    ffplay rtp:\myTargetMachine:9050

    this work fine with audio with codec G711

    but if I had G729 audio this command does not work cause ffplay can not recognize the G729 codec so I start to receive the packets using ffmpeg change he codec to G711 mulaw and stream it to another port then receive it using ffplay , like the following

    ffmpeg -f G729 -i rtp:\myTargetMachine:9050 -acodec pcm_mulaw -f rtp rtp:\myTargetMachine:9060

    ffplay rtp:\myTargetMachine:9060

    but this give me a noisy sound and I tried to listen to the stream from wireshark and it seems ok.

    anybody have an idea why I got a noise instead of actual sound, or how we can listen to G729 streaming in client side using ffmpeg or another tool other than wireshark

  • .So file for FFMPEG from NDK

    24 mai 2016, par Nikhil Lamba

    I am not able to make .So file for FFMPEG from NDK . I Just Download a zip file from GitHub https://github.com/appunite/AndroidFFmpeg Then i used CYGWIN for using NDK commends for making .so file from jni folder in ffmpeg library then on Cygwin i am giving path of ffmpeg up to jni folder then $ ndk build after some process error message came

      C:\Users\ADMIN\Downloads\AndroidFFmpeg-master\AndroidFFmpeg-master\FFmpegLibrary
     \jni>ndk-build
     Android NDK: ERROR:C:/Users/ADMIN/Downloads/AndroidFFmpeg-master/AndroidFFmpeg-m
      aster/FFmpegLibrary//jni/Android.mk:ffmpeg-prebuilt: LOCAL_SRC_FILES points to a
      missing file
      Android NDK: Check that C:/Users/ADMIN/Downloads/AndroidFFmpeg-master/AndroidFFm
      peg-master/FFmpegLibrary//jni/ffmpeg-build/armeabi-v7a/libffmpeg.so exists  or t
      hat its path is correct
      D:/NDK/androidndk/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting
     .  Stop.
    

    Any type of help is Appricated.

  • Get mb information out of a frame

    24 mai 2016, par user354227

    Is there any way to get macroblock information out of a frame with ffmpeg library, such as macroblock size (it's a 16x16 or 8x8 or 4x4 mb), the amount of macroblocks of a frame and perhaps even the DCT coefficients or quantization parameters of a macroblock? I'm new to ffmpeg. I want to write a c program to extract those information on macroblocks. Any suggestions would be appreciated.