Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Writing Tee Pseudo muxer of FFMPEG by C++ code

    23 août 2017, par Mohammad Taha

    Is there anyone who knows how to use Tee pseudo muxer of ffmpeg by c++ code. Kindly guide in doing this. I am working on getting multiple outputs of muxed transport stream (ts) data. I am able to mux aac and h264 in ts. But i have to get muxed ts data in multiple output.

    So please guide me if anyone know how to do it with Tee pseudo muxer.

  • How to apply color filter command for video in 'FFMPEG' library

    23 août 2017, par Patel Hiren

    I am new to android application development.

    Please let me know which command is used for apply color filter on the video.

    Is there any FFMPEG command for change the video color by passing hexadecimal color code.

    Please help me for the same.

    Thanks in advance.

  • Error recording an RTSP stream without transcoding

    23 août 2017, par Matt

    I'm trying to use FFmpeg to record RTSP streams from several security cameras. I have been successfully transcoding each stream for months now, but since this requires considerable CPU power, I'd like to simply copy each stream to disk in it's original H.264 format.

    Whenever I try this, I receive and error similar to this (the "current" value varies):

    Non-monotonous DTS in output stream 0:0; previous: 0, current: -62743;

    I've stripped most of the options I was using, although I really do want to keep -xerror so that FFmpeg quits when it encounters an error:

    ffmpeg.exe -xerror -i rtsp://admin:admin@192.168.1.135 -an -vcodec copy test.mp4
    

    And I still get this:

        ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers  
        built with gcc 7.1.0 (GCC)   
        configuration: --enable-gpl
        --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --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-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-zlib   
        libavutil      55. 58.100 / 55. 58.100   
        libavcodec     57. 89.100 / 57. 89.100   
        libavformat    57. 71.100 / 57. 71.100   
        libavdevice    57.  6.100 / 57.  6.100   
        libavfilter     6. 82.100 / 6. 82.100   
        libswscale      4.  6.100 / 4.  6.100  
        libswresample   2.  7.100 / 2.  7.100   
        libpostproc    54.  5.100 / 54.  5.100
        [udp @ 0000000002533b60] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) 
        [udp @ 0000000000ec97a0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required) 
        Input #0, rtsp, from 'rtsp://admin:admin@192.168.1.135':   Metadata:
            title           : RTSP Session/2.0   Duration: N/A, start: 0.837144, bitrate: N/A
            Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 7 fps, 25 tbr, 90k tbn, 14 tbc Output
        #0, mp4, to 'test.mp4':   Metadata:
            title           : RTSP Session/2.0
        y    encoder         : Lavf57.71.100
            Stream #0:0: Video: h264 (High) ([33][0][0][0] / 0x0021), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 7 fps, 25 tbr, 90k tbn, 90k tbc 
        Stream mapping:   Stream #0:0 -> #0:0 (copy) 
        Press [q] to stop, [?] for help 
    
        [mp4 @ 00000000036b8340] Non-monotonous DTS in output stream 0:0; previous: 0, current: -62743; aborting.
    
        Conversion failed!
    

    Can anyone explain what the problem is and/or suggest the appropriate flags to handle this?

  • FFmpeg output buffer/delay reduction

    23 août 2017, par Anton B

    I would like to get frames as they become available from FFmpeg. I tried different codecs and options both for video and audio conversion but here is a simple example:

    ffmpeg -i rtmp://input -vn -c:a libmp3lame -f mp3 -reservoir 0 http://127.0.0.1:7885

    and there is also an http server on the localhost that gets the data and outputs timings between successive chunks. It seems it gets it in batches (which happens when transcode_step -> reap_filters -> do_video_out/do_audio_out in ffmpeg.c is called) and there are 0.5-1.5 second pauses in between. Different options like -maxrate, -bufsize, -g, -muxdelay, -tune zerolatency didn't seem to do any difference.
    EDIT
    It seems that setting -re (Read input at native frame rate) removes the issue, but is says it 'Should not be used with actual grab devices or live input streams (where it can cause packet loss).'.

  • ffmpeg working on command line only, not with php

    23 août 2017, par Harish Kumar

    I am using FFmpeg https://github.com/olaferlandsen/ffmpeg-php-class. But when i am running code it is not working. Please help me to solve this issue if anyone know. Below is the code

    $FFmpeg = new FFmpeg( "/etc/bin/ffmpeg" );
    $FFmpeg->input( '/opt/lampp/htdocs/ffmpeg/1.wav' )->output( '/opt/lampp/htdocs/ffmpeg/ss.mp3' );
    $FFmpeg->ready();