Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • FFMPEG Output to DeckLink Duo 2

    28 mars 2017, par Harry

    Im trying to use FFMPEG to stream out to my Decklink duo 2 but im unable to do so.

    Heres the command that im trying:

    ffmpeg -f decklink -i "DeckLink Duo (1)@5"
    -pix_fmt uyvy422 -r 25000/1000 "DeckLink Duo (3)"
    

    I tried just sending color bars as an output but it still doesnt work

    Command:

    ffmpeg -f lavfi -i color=color=red -t 10000 "DeckLink Duo (3)"
    

    Both Result:

    ffmpeg version N-82794-g3ab1311 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads
     --enable-dxva2 --enable-libmfx --enable-nvenc 
    --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
    --enable-gnutls --enable-iconv --enable-libass 
    --enable-libbluray --enable-libbs2b --enable-libcaca 
    --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc 
    --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb 
    --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg 
    --enable-libopus --enable-librtmp --enable-libschroedinger 
    --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora 
    --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc 
    --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp 
    --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
     --enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 42.100 / 55. 42.100
      libavcodec     57. 67.100 / 57. 67.100
      libavformat    57. 58.102 / 57. 58.102
      libavdevice    57.  2.100 / 57.  2.100
      libavfilter     6. 68.100 /  6. 68.100
      libswscale      4.  3.101 /  4.  3.101
      libswresample   2.  4.100 /  2.  4.100
      libpostproc    54.  2.100 / 54.  2.100
    Input #0, lavfi, from 'color=color=red':
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
    
    [NULL @ 00000000025745a0] Unable to find a suitable output format for 'DeckLink Duo (3)'
    DeckLink Duo (3): Invalid argument
    

    Any Suggestions or help to solve this is much appreciated.

  • How to Play a Video file in javacv / javacpp

    28 mars 2017, par Floesmaan

    Does someone have some example code to play a simple video file with the current javaCPP/javaCV version and the FFmpegFrameGrabber?

    I tried this solution, but its apparently too old and does not work with the current javacv version because of an incompatible FrameGrabber interface (returns a "Frame"-Object instead of an "IplImage"-Object). If I change the code manually (using Frame instead of IplImage), it returns the error message:

    java.lang.VerifyError: Bad type on operand stack
    Exception Details:
      Location:
        org/bytedeco/javacv/FFmpegFrameGrabber.startUnsafe()V @1291: invokespecial
      Reason:
        Type 'org/bytedeco/javacpp/avutil$AVFrame' (current frame, stack[2]) is not assignable to 'org/bytedeco/javacpp/Pointer'
      Current Frame:
        bci: @1291
        flags: { }
        locals: { 'org/bytedeco/javacv/FFmpegFrameGrabber', integer, 'org/bytedeco/javacpp/avformat$AVInputFormat', 'org/bytedeco/javacpp/avutil$AVDictionary', integer, 'org/bytedeco/javacpp/avcodec$AVCodec', integer, integer, integer, integer }
        stack: { uninitialized 1283, uninitialized 1283, 'org/bytedeco/javacpp/avutil$AVFrame' }
      Bytecode:
        0x0000000: 2a01 b500 332a bb00 8659 01b7 0087 b500............
    

    FYI: I'm comparing different java libraries for playing video files and extract their pixel data (xuggler, vlcj, ...) and search for the best one. I really like to include javacv in my tests but it's not working :(

  • what is the meaning of "sw" in libswscale of ffmpeg ?

    28 mars 2017, par synyo xu

    In FFMpeg, we always say hello to libswscale and libswresample, but, what is the meaning of sw in libswscale and libswresample?

  • Is there a more efficient way to watermark and join videos in bulk through ffmpeg ?

    28 mars 2017, par Neo Herakles

    I have this batch file using ffmpeg to add a logo to my videos and then add an intro but it's taking anywhere from 10 hours to a day depending on how many I have to watermark, is there a more efficient way to achieve this? The videos sometimes have different resolutions so I can't remove the conversion to the 1280*720 size.

    for %%I in ("C:\Users\Administrator\Desktop\work\*.mp4") do ffmpeg.exe -y -i "%%I" -i white.png -filter_complex "[0:v]scale=iw:ih[v0];[1:v][v0]scale2ref=iw/6:ih/18[logo][0v];[0v][logo]overlay=W-w-3:H-h-1[v]" -map "[v]" -map 0:a -codec:v libx264 -preset ultrafast -crf 23 -codec:a copy "C:\Users\Administrator\Desktop\Complete-videos\%%~nI.mp4"
    
    for %%I in ("C:\Users\Administrator\Desktop\work\*.mp4") do ffmpeg -y -i %%I -c copy -vbsf h264_mp4toannexb -f mpegts -s 1280*720 %%I.ts && ffmpeg -y -i "concat:out1.ts|%%I.ts|out1.ts" -c:v libx264 -strict experimental -bsf:a aac_adtstoasc -ar 48000 -r 20 "C:\Users\Administrator\Desktop\Complete-videos\%%~nI.mp4"
    pause
    
  • Can not copy RTSP streamed video in android using FFMPEG [on hold]

    28 mars 2017, par user711457

    I am developing an android application. In my application I wanted to record live streamed video using ffmpeg library. I write one code for record live streamed video but it does't work. It shows some error. If any one know this please help me.

    This is the code I am used to record video

    try {
    
            fFmpeg.execute(new String[]{"ffmpeg -i rtsp://192.168.1.1:6667/streamhd -acodec copy -vcode c copy"+String.valueOf(getCacheDir())+"/MyVideo.mp4"}, new ExecuteBinaryResponseHandler() {
    
                @Override
                public void onSuccess(String message) {
                    Log.d("fffffff", "FFmpeg cmd success");
                }
    
                @Override
                public void onFailure(String message) {
                    Log.d("ffffffffffff", message.toString());
                }
            });
        }catch (FFmpegCommandAlreadyRunningException e) {
            // Handle if FFmpeg is already running
            e.printStackTrace();
            Log.w(null,e.toString());}
    

    when I execute this block I get the following error message.

    03-27 12:48:47.109 2042-2042/com.steelmanpro.wifivideoscope D/ffffffffffff: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                                                                          built with gcc 4.8 (GCC)
    
    
    configuration: --target-os=linux --cross-    prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    
                                                                          libavutil      55. 17.103 / 55. 17.103
                                                                          libavcodec     57. 24.102 / 57. 24.102
                                                                          libavformat    57. 25.100 / 57. 25.100
                                                                          libavdevice    57.  0.101 / 57.  0.101
                                                                          libavfilter     6. 31.100 /  6. 31.100
                                                                          libswscale      4.  0.100 /  4.  0.100
                                                                          libswresample   2.  0.101 /  2.  0.101
                                                                          libpostproc    54.  0.100 / 54.  0.100
                                                                        Output #0, mp4, to 'ffmpeg -i rtsp://192.168.1.1:6667/streamhd -acodec copy -vcode c copy/data/data/com.steelmanpro.wifivideoscope/cache/MyVideo.mp4':
                                                                        Output file #0 does not contain any stream