Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • using FFmpeg for android without any C/C++ or make knowledge

    3 octobre 2014, par Lik Sif

    I would like to use FFmpeg library on my android app. I have no C/C++/Make knowledge and all the threads I've been reading about it talk about stuff I completely don't understand.

    Is there any pre-compiled library which I can add to my project, then add a simple 'import' statement on my java class and then call it?

    Thanks

  • OpenCV VideoCapture not read any video File in Windows 7 32bit

    3 octobre 2014, par The_Maxtor

    i try to read .avi or .mpeg video file using VideoCapture class of OpenCV2.4.8 in C++ using QtCreator and CMake 2.8.12.1. Before built OpenCV, i download FFMPEG static version and put them into Program Files directory, i add their path into enviroments variable PATH, then i download K Lite Codec Pack Full, install it and only then i built OpenCV with CMAKE and mingw provide by Qt. After installation i add to PATH the right path of built OpenCV. The stream from webcam works fine, but the stream from a video file doesn't work. I tried on Windows 7 32bit and Windows 8 64bit. Here is the code

    #include imgproc/imgproc.hpp>
    #include highgui/highgui.hpp>
    #include core/core.hpp>
    #include "opencv2/opencv.hpp"
    cv::Mat img;
    cv::VideoCapture cap("Prova.avi");
    std::cerr << cap.isOpened() << std::endl;
    while(cap.read(img)){
        cv::imshow("Opencv", img);
        cv::waitKey(33);
    }
    

    The same code works on Ubuntu 12.04 with the same version of OpenCV and with the ffmpeg build by myself. What is wrong?

  • Encoding a readable movie by QuickTime using FFMPEG

    3 octobre 2014, par itamarb

    I'm trying to encode an image sequence using the following command:

    ffmpeg.exe -i %d.png -f mp4 -vcodec h264 test.mp4
    

    However, QuickTime failed to open this file or sometimes play a black movie, while this movie plays great in VLC player. Any suggestions how to make it play well in QuickTime?

    Here is the output:

    ffmpeg.exe -i %d.png -f mp4 -vcodec libx264 13.mp4
    ffmpeg version N-49044-g89afa63 Copyright (c) 2000-2013 the FFmpeg developers
      built on Jan 19 2013 20:36:06 with gcc 4.7.2 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
    sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
    nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
    nable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en
    able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable
    -libxavs --enable-libxvid --enable-zlib --enable-filter=frei0r
      libavutil      52. 15.100 / 52. 15.100
      libavcodec     54. 89.100 / 54. 89.100
      libavformat    54. 61.101 / 54. 61.101
      libavdevice    54.  3.102 / 54.  3.102
      libavfilter     3. 32.101 /  3. 32.101
      libswscale      2.  2.100 /  2.  2.100
      libswresample   0. 17.102 /  0. 17.102
      libpostproc    52.  2.100 / 52.  2.100
    [image2 @ 0221b940] max_analyze_duration 5000000 reached at 5000000 microseconds
    
    Input #0, image2, from '%d.png':
      Duration: 00:01:19.36, start: 0.000000, bitrate: N/A
        Stream #0:0: Video: png, rgb24, 639x480, 25 fps, 25 tbr, 25 tbn, 25 tbc
    [libx264 @ 0221edc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE
    4.2 AVX
    [libx264 @ 0221edc0] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit
    [libx264 @ 0221edc0] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Cop
    yleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deb
    lock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
    e_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chro
    ma_qp_offset=4 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 in
    terlaced=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=25 scenecu
    t=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 '13.mp4':
      Metadata:
        encoder         : Lavf54.61.101
        Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv444p, 639x480, q=-1--1
    , 12800 tbn, 25 tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (png -> libx264)
    Press [q] to stop, [?] for help
    frame=   76 fps=0.0 q=28.0 size=       3kB time=00:00:00.96 bitrate=  22.3kbits/
    frame=  156 fps=155 q=28.0 size=       7kB time=00:00:04.16 bitrate=  14.7kbits/
    frame=  219 fps=145 q=28.0 size=      12kB time=00:00:06.68 bitrate=  14.1kbits/
    frame=  283 fps=141 q=28.0 size=      16kB time=00:00:09.24 bitrate=  14.2kbits/
    frame=  352 fps=140 q=28.0 size=      25kB time=00:00:12.00 bitrate=  17.4kbits/
    
  • FFmpeg and libavcode : return frames in decode order (not display order)

    3 octobre 2014, par Krishna

    I wanted to know if it is possible to for libavcodec to return frames in decode order instead of display order? Is there any flag that will enable this?

    I am using av_read_frame() and avcodec_decode_video2() to read a video frame-by-frame.

    Thank you!

  • I use ffmpeg dinamically to edit a local hosted video to be streamed on iPhone over 3G [on hold]

    3 octobre 2014, par Luchian Chivoiu

    I use ffmpeg dinamically to edit a local hosted video to be streamed on iPhone over 3G .

    I use this line : "ffmpeg -i C:\file1.mp4 -s 640x480 -r 30000/1001 -b:a 56k -bt 40k -b:v 50k -maxrate 10M -bufsize 10M -coder 0 -bf 0 -refs 1 -ar 48000 -ab 52k C:\file2.mp4" and it doesn't work to open on iPhone the transformed file called "file2.mp4". I use Web Api and C# to call the ffmpeg locally and the resulted file opens on the browser but still doesn't want to stream to an iPhone over 3G only if it's over WiFi.

    Here Apple explains the process but I still didn't get it work .

    https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/CreatingVideoforSafarioniPhone.html

    One example that can't be played on IPhone is this one : http://www.starlety.com/Videos/8ada5277-424a-e411-b2e5-00ff91d7f3dd.mp4