Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (30)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (4894)

  • how to stream h.264 video with mp3 audio using libavcodec ?

    29 août 2020, par dasg

    I read h.264 frames from webcamera and capture audio from microphone. I need to stream live video to ffserver. During debug I read video from ffserver using ffmpeg with following command :

    



    ffmpeg -i http://127.0.0.1:12345/robot.avi -vcodec copy -acodec copy out.avi


    



    My video in output file is slightly accelerated. If I add a audio stream it is accelerated several times. Sometimes there is no audio in the output file.

    



    Here is my code for encoding audio :

    



    #include "v_audio_encoder.h"&#xA;&#xA;extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;}&#xA;#include <cassert>&#xA;&#xA;struct VAudioEncoder::Private&#xA;{&#xA;    AVCodec *m_codec;&#xA;    AVCodecContext *m_context;&#xA;&#xA;    std::vector m_outBuffer;&#xA;};&#xA;&#xA;VAudioEncoder::VAudioEncoder( int sampleRate, int bitRate )&#xA;{&#xA;    d = new Private( );&#xA;    d->m_codec = avcodec_find_encoder( CODEC_ID_MP3 );&#xA;    assert( d->m_codec );&#xA;    d->m_context = avcodec_alloc_context3( d->m_codec );&#xA;&#xA;    // put sample parameters&#xA;    d->m_context->channels = 2;&#xA;    d->m_context->bit_rate = bitRate;&#xA;    d->m_context->sample_rate = sampleRate;&#xA;    d->m_context->sample_fmt = AV_SAMPLE_FMT_S16;&#xA;    strcpy( d->m_context->codec_name, "libmp3lame" );&#xA;&#xA;    // open it&#xA;    int res = avcodec_open2( d->m_context, d->m_codec, 0 );&#xA;    assert( res >= 0 );&#xA;&#xA;    d->m_outBuffer.resize( d->m_context->frame_size );&#xA;}&#xA;&#xA;VAudioEncoder::~VAudioEncoder( )&#xA;{&#xA;    avcodec_close( d->m_context );&#xA;    av_free( d->m_context );&#xA;    delete d;&#xA;}&#xA;&#xA;void VAudioEncoder::encode( const std::vector&amp; samples, std::vector&amp; outbuf )&#xA;{&#xA;    assert( (int)samples.size( ) == d->m_context->frame_size );&#xA;&#xA;    int outSize = avcodec_encode_audio( d->m_context, d->m_outBuffer.data( ),&#xA;                                        d->m_outBuffer.size( ), reinterpret_cast<const>( samples.data( ) ) );&#xA;    if( outSize ) {&#xA;        outbuf.resize( outSize );&#xA;        memcpy( outbuf.data( ), d->m_outBuffer.data( ), outSize );&#xA;    }&#xA;    else&#xA;        outbuf.clear( );&#xA;}&#xA;&#xA;int VAudioEncoder::getFrameSize( ) const&#xA;{&#xA;    return d->m_context->frame_size;&#xA;}&#xA;</const></cassert>

    &#xA;&#xA;

    Here is my code for streaming video :

    &#xA;&#xA;

    #include "v_out_video_stream.h"&#xA;&#xA;extern "C" {&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>opt.h>&#xA;#include <libavutil></libavutil>avstring.h>&#xA;#include <libavformat></libavformat>avio.h>&#xA;}&#xA;&#xA;#include <stdexcept>&#xA;#include <cassert>&#xA;&#xA;struct VStatticRegistrar&#xA;{&#xA;    VStatticRegistrar( )&#xA;    {&#xA;        av_register_all( );&#xA;        avformat_network_init( );&#xA;    }&#xA;};&#xA;&#xA;VStatticRegistrar __registrar;&#xA;&#xA;struct VOutVideoStream::Private&#xA;{&#xA;    AVFormatContext * m_context;&#xA;    int m_videoStreamIndex;&#xA;    int m_audioStreamIndex;&#xA;&#xA;    int m_videoBitrate;&#xA;    int m_width;&#xA;    int m_height;&#xA;    int m_fps;&#xA;    int m_bitrate;&#xA;&#xA;    bool m_waitKeyFrame;&#xA;};&#xA;&#xA;VOutVideoStream::VOutVideoStream( int width, int height, int fps, int bitrate )&#xA;{&#xA;    d = new Private( );&#xA;    d->m_width = width;&#xA;    d->m_height = height;&#xA;    d->m_fps = fps;&#xA;    d->m_context = 0;&#xA;    d->m_videoStreamIndex = -1;&#xA;    d->m_audioStreamIndex = -1;&#xA;    d->m_bitrate = bitrate;&#xA;    d->m_waitKeyFrame = true;&#xA;}&#xA;&#xA;bool VOutVideoStream::connectToServer( const std::string&amp; uri )&#xA;{&#xA;    assert( ! d->m_context );&#xA;&#xA;    // initalize the AV context&#xA;    d->m_context = avformat_alloc_context();&#xA;    if( !d->m_context )&#xA;        return false;&#xA;    // get the output format&#xA;    d->m_context->oformat = av_guess_format( "ffm", NULL, NULL );&#xA;    if( ! d->m_context->oformat )&#xA;        return false;&#xA;&#xA;    strcpy( d->m_context->filename, uri.c_str( ) );&#xA;&#xA;    // add an H.264 stream&#xA;    AVStream *stream = avformat_new_stream( d->m_context, NULL );&#xA;    if ( ! stream )&#xA;        return false;&#xA;    // initalize codec&#xA;    AVCodecContext* codec = stream->codec;&#xA;    if( d->m_context->oformat->flags &amp; AVFMT_GLOBALHEADER )&#xA;        codec->flags |= CODEC_FLAG_GLOBAL_HEADER;&#xA;    codec->codec_id = CODEC_ID_H264;&#xA;    codec->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;    strcpy( codec->codec_name, "libx264" );&#xA;//    codec->codec_tag = ( unsigned(&#x27;4&#x27;) &lt;&lt; 24 ) &#x2B; (unsigned(&#x27;6&#x27;) &lt;&lt; 16 ) &#x2B; ( unsigned(&#x27;2&#x27;) &lt;&lt; 8 ) &#x2B; &#x27;H&#x27;;&#xA;    codec->width = d->m_width;&#xA;    codec->height = d->m_height;&#xA;    codec->time_base.den = d->m_fps;&#xA;    codec->time_base.num = 1;&#xA;    codec->bit_rate = d->m_bitrate;&#xA;    d->m_videoStreamIndex = stream->index;&#xA;&#xA;    // add an MP3 stream&#xA;    stream = avformat_new_stream( d->m_context, NULL );&#xA;    if ( ! stream )&#xA;        return false;&#xA;    // initalize codec&#xA;    codec = stream->codec;&#xA;    if( d->m_context->oformat->flags &amp; AVFMT_GLOBALHEADER )&#xA;        codec->flags |= CODEC_FLAG_GLOBAL_HEADER;&#xA;    codec->codec_id = CODEC_ID_MP3;&#xA;    codec->codec_type = AVMEDIA_TYPE_AUDIO;&#xA;    strcpy( codec->codec_name, "libmp3lame" );&#xA;    codec->sample_fmt = AV_SAMPLE_FMT_S16;&#xA;    codec->channels = 2;&#xA;    codec->bit_rate = 64000;&#xA;    codec->sample_rate = 44100;&#xA;    d->m_audioStreamIndex = stream->index;&#xA;&#xA;    // try to open the stream&#xA;    if( avio_open( &amp;d->m_context->pb, d->m_context->filename, AVIO_FLAG_WRITE ) &lt; 0 )&#xA;         return false;&#xA;&#xA;    // write the header&#xA;    return avformat_write_header( d->m_context, NULL ) == 0;&#xA;}&#xA;&#xA;void VOutVideoStream::disconnect( )&#xA;{&#xA;    assert( d->m_context );&#xA;&#xA;    avio_close( d->m_context->pb );&#xA;    avformat_free_context( d->m_context );&#xA;    d->m_context = 0;&#xA;}&#xA;&#xA;VOutVideoStream::~VOutVideoStream( )&#xA;{&#xA;    if( d->m_context )&#xA;        disconnect( );&#xA;    delete d;&#xA;}&#xA;&#xA;int VOutVideoStream::getVopType( const std::vector&amp; image )&#xA;{&#xA;    if( image.size( ) &lt; 6 )&#xA;        return -1;&#xA;    unsigned char *b = (unsigned char*)image.data( );&#xA;&#xA;    // Verify NAL marker&#xA;    if( b[ 0 ] || b[ 1 ] || 0x01 != b[ 2 ] ) {&#xA;        &#x2B;&#x2B;b;&#xA;        if ( b[ 0 ] || b[ 1 ] || 0x01 != b[ 2 ] )&#xA;            return -1;&#xA;    }&#xA;&#xA;    b &#x2B;= 3;&#xA;&#xA;    // Verify VOP id&#xA;    if( 0xb6 == *b ) {&#xA;        &#x2B;&#x2B;b;&#xA;        return ( *b &amp; 0xc0 ) >> 6;&#xA;    }&#xA;&#xA;    switch( *b ) {&#xA;    case 0x65: return 0;&#xA;    case 0x61: return 1;&#xA;    case 0x01: return 2;&#xA;    }&#xA;&#xA;    return -1;&#xA;}&#xA;&#xA;bool VOutVideoStream::sendVideoFrame( std::vector&amp; image )&#xA;{&#xA;    // Init packet&#xA;    AVPacket pkt;&#xA;    av_init_packet( &amp;pkt );&#xA;    pkt.flags |= ( 0 >= getVopType( image ) ) ? AV_PKT_FLAG_KEY : 0;&#xA;&#xA;    // Wait for key frame&#xA;    if ( d->m_waitKeyFrame ) {&#xA;        if( pkt.flags &amp; AV_PKT_FLAG_KEY )&#xA;            d->m_waitKeyFrame = false;&#xA;        else&#xA;            return true;&#xA;    }&#xA;&#xA;    pkt.stream_index = d->m_videoStreamIndex;&#xA;    pkt.data = image.data( );&#xA;    pkt.size = image.size( );&#xA;    pkt.pts = pkt.dts = AV_NOPTS_VALUE;&#xA;&#xA;    return av_write_frame( d->m_context, &amp;pkt ) >= 0;&#xA;}&#xA;&#xA;bool VOutVideoStream::sendAudioFrame( std::vector&amp; audio )&#xA;{&#xA;    // Init packet&#xA;    AVPacket pkt;&#xA;    av_init_packet( &amp;pkt );&#xA;    pkt.stream_index = d->m_audioStreamIndex;&#xA;    pkt.data = audio.data( );&#xA;    pkt.size = audio.size( );&#xA;    pkt.pts = pkt.dts = AV_NOPTS_VALUE;&#xA;&#xA;    return av_write_frame( d->m_context, &amp;pkt ) >= 0;&#xA;}&#xA;</cassert></stdexcept>

    &#xA;&#xA;

    Here is how I use it :

    &#xA;&#xA;

    BOOST_AUTO_TEST_CASE(testSendingVideo)&#xA;{&#xA;    const int framesToGrab = 90000;&#xA;&#xA;    VOutVideoStream stream( VIDEO_WIDTH, VIDEO_HEIGHT, FPS, VIDEO_BITRATE );&#xA;    if( stream.connectToServer( URI ) ) {&#xA;        VAudioEncoder audioEncoder( AUDIO_SAMPLE_RATE, AUDIO_BIT_RATE );&#xA;        VAudioCapture microphone( MICROPHONE_NAME, AUDIO_SAMPLE_RATE, audioEncoder.getFrameSize( ) );&#xA;&#xA;        VLogitecCamera camera( VIDEO_WIDTH, VIDEO_HEIGHT );&#xA;        BOOST_REQUIRE( camera.open( CAMERA_PORT ) );&#xA;        BOOST_REQUIRE( camera.startCapturing( ) );&#xA;&#xA;        std::vector image, encodedAudio;&#xA;        std::vector voice;&#xA;        boost::system_time startTime;&#xA;        int delta;&#xA;        for( int i = 0; i &lt; framesToGrab; &#x2B;&#x2B;i ) {&#xA;            startTime = boost::posix_time::microsec_clock::universal_time( );&#xA;&#xA;            BOOST_REQUIRE( camera.read( image ) );&#xA;            BOOST_REQUIRE( microphone.read( voice ) );&#xA;            audioEncoder.encode( voice, encodedAudio );&#xA;&#xA;            BOOST_REQUIRE( stream.sendVideoFrame( image ) );&#xA;            BOOST_REQUIRE( stream.sendAudioFrame( encodedAudio ) );&#xA;&#xA;            delta = ( boost::posix_time::microsec_clock::universal_time( ) - startTime ).total_milliseconds( );&#xA;            if( delta &lt; 1000 / FPS )&#xA;                boost::thread::sleep( startTime &#x2B; boost::posix_time::milliseconds( 1000 / FPS - delta ) );&#xA;        }&#xA;&#xA;        BOOST_REQUIRE( camera.stopCapturing( ) );&#xA;        BOOST_REQUIRE( camera.close( ) );&#xA;    }&#xA;    else&#xA;        std::cout &lt;&lt; "failed to connect to server" &lt;&lt; std::endl;&#xA;}&#xA;

    &#xA;&#xA;

    I think my problem is in PTS and DTS. Can anyone help me ?

    &#xA;

  • ffmpeg command execution never stops

    19 août 2020, par Khawar Raza

    I am trying to concatenate 3 videos of different resolutions and overlaying 2 videos as transition effects(though the chroma key color removal is not yet implemented) between videos using below command :

    &#xA;

    ffmpeg &#xA;-i input1.mp4 &#xA;-i input2.mp4 &#xA;-i input3.mp4 &#xA;-i transition1.mp4 &#xA;-i transition2.mp4 &#xA;-filter_complex &#xA;"[0:v]pad=width=1080:height=1920:x=(1080-iw)*0.5:y=(1920-ih)*0.5:color=black[video0];&#xA;[1:v]pad=width=1080:height=1920:x=(1080-iw)*0.5:y=(1920-ih)*0.5:color=black[video1];&#xA;[2:v]pad=width=1080:height=1920:x=(1080-iw)*0.5:y=(1920-ih)*0.5:color=black[video2];&#xA;[video0][video1][video2]concat=n=3:v=1:a=0[outv];&#xA;[3:v]scale=w=1080:h=1920[t0];&#xA;[4:v]scale=w=1080:h=1920[t1];&#xA;[outv][t0]overlay=enable=&#x27;between(t,6.6045,9.6335)&#x27;[out0];&#xA;[out0][t1]overlay=enable=&#x27;between(t,12.5655,15.6165)&#x27;[out1];&#xA;[0:a][1:a][2:a]concat=n=3:v=0:a=1[audio]" &#xA;-c:v libx264 -pix_fmt yuv420p -map [out1] -map [audio] -preset ultrafast output.mp4&#xA;

    &#xA;

    I get success only with few videos. Most of the times the command execution never stops. It keeps on appending something to the output video file even for hours. Here is the output from console :

    &#xA;

    ffmpeg version v4.4-dev-416&#xA;     Copyright (c) 2000-2020 the FFmpeg developers&#xA;      built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)&#xA;      configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --extra-libs=&#x27;-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec&#xA;      libavutil      56. 55.100 / 56. 55.100&#xA;      libavcodec     58. 96.100 / 58. 96.100&#xA;      libavformat    58. 48.100 / 58. 48.100&#xA;      libavdevice    58. 11.101 / 58. 11.101&#xA;      libavfilter     7. 87.100 /  7. 87.100&#xA;      libswscale      5.  8.100 /  5.  8.100&#xA;      libswresample   3.  8.100 /  3.  8.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input1.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    mp42&#xA;        minor_version   : &#xA;    0&#xA;        compatible_brands: &#xA;isommp42&#xA;        creation_time   : &#xA;    2020-08-12T17:21:49.000000Z&#xA;        com.android.version: &#xA;    9&#xA;      Duration: &#xA;    00:00:08.12&#xA;    , start: &#xA;    0.000000&#xA;    , bitrate: &#xA;    17298 kb/s&#xA;        Stream #0:0&#xA;    (eng)&#xA;    : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16309 kb/s&#xA;    , SAR 1:1 DAR 16:9&#xA;    , &#xA;    28.70 fps, &#xA;    29.50 tbr, &#xA;    90k tbn, &#xA;    60 tbc&#xA;     (default)&#xA;        Metadata:&#xA;          rotate          : &#xA;    90&#xA;          creation_time   : &#xA;&#xA;          handler_name    : &#xA;    VideoHandle&#xA;        Side data:&#xA;          &#xA;    displaymatrix: rotation of -90.00 degrees&#xA;        Stream #0:1&#xA;    (eng)&#xA;    : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          creation_time   : &#xA;    2020-08-12T17:21:49.000000Z&#xA;          handler_name    : &#xA;    SoundHandle&#xA;Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input2.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    isom&#xA;        minor_version   : &#xA;    512&#xA;        compatible_brands: &#xA;    isomiso2avc1mp41&#xA;   encoder         : &#xA;    Lavf57.25.100&#xA;      Duration: &#xA;    00:00:05.97&#xA;    , start: &#xA;    0.000000&#xA;    , bitrate: &#xA;    770 kb/s&#xA;        Stream #1:0&#xA;    (und)&#xA;    : Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 128 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          handler_name    : &#xA;    SoundHandler&#xA;        Stream #1:1&#xA;    (und)&#xA;    : Video: h264 (avc1 / 0x31637661), yuv420p, 368x480, 608 kb/s&#xA;    , &#xA;    27.29 fps, &#xA;120 tbr, &#xA;    12k tbn, &#xA;    60 tbc&#xA;     (default)&#xA;        Metadata:&#xA;          handler_name    : &#xA;    VideoHandler&#xA;Input #2, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input3.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    isom&#xA;        minor_version   : &#xA;    512&#xA;    compatible_brands: &#xA;    isomiso2avc1mp41&#xA;        encoder         : &#xA;    Lavf55.19.104&#xA;      Duration: &#xA;    00:00:13.05&#xA;    , start: &#xA;    0.000000&#xA;    , bitrate: &#xA;    2453 kb/s&#xA;        Chapter #2:0: &#xA;    start 0.000000, &#xA;    end 13.033000&#xA;        Metadata:&#xA;          title           : &#xA;        Stream #2:0&#xA;    (und)&#xA;    : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          handler_name    : &#xA;    SoundHandler&#xA;        Stream #2:1&#xA;    (und)&#xA;: Video: h264 (avc1 / 0x31637661), yuv420p, 640x480, 2320 kb/s&#xA;    , &#xA;    25 fps, &#xA;    25 tbr, &#xA;    1200k tbn, &#xA;    50 tbc&#xA;     (default)&#xA;        Metadata:&#xA;          handler_name    : &#xA;    VideoHandler&#xA;        Stream #2:2&#xA;    (eng)&#xA;    : Data: bin_data (text / 0x74786574), 0 kb/s&#xA;        Metadata:&#xA;          handler_name    : &#xA;    SubtitleHandler&#xA;Input #3, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;transition1.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    mp42&#xA;        minor_version   : &#xA;    0&#xA;        compatible_brands: &#xA;    mp41isom&#xA;    creation_time   : &#xA;    2020-08-17T09:31:23.000000Z&#xA;      Duration: &#xA;    00:00:03.03&#xA;    , start: &#xA;    0.000000&#xA;    , bitrate: &#xA;    6263 kb/s&#xA;        Stream #3:0&#xA;    (und)&#xA;    : Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 6307 kb/s&#xA;    , &#xA;    30 fps, &#xA;    30 tbr, &#xA;    30k tbn, &#xA;    60 tbc&#xA;     (default)&#xA;        Metadata:&#xA;          creation_time   : &#xA;&#xA;          handler_name    : &#xA;    VideoHandler&#xA;          encoder         : &#xA;    AVC Coding&#xA;        Stream #3:1&#xA;    (und)&#xA;    : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 79 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          creation_time   : &#xA;    2020-08-17T09:31:23.000000Z&#xA;          handler_name    : &#xA;SoundHandler&#xA;Input #4, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;transition2.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    mp42&#xA;        minor_version   : 0&#xA;        compatible_brands: &#xA;    mp41isom&#xA;        creation_time   : &#xA;    2020-08-17T09:30:33.000000Z&#xA;      Duration: &#xA;    00:00:03.05&#xA;    , start: &#xA;    0.000000&#xA;    , bitrate: &#xA;    7828 kb/s&#xA;        Stream #4:0&#xA;    (und)&#xA;    : Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 7873 kb/s&#xA;    , &#xA;    30 fps, &#xA;30 tbr, &#xA;    30k tbn, &#xA;    60 tbc&#xA;     (default)&#xA;        Metadata:&#xA;          creation_time   : &#xA;    2020-08-17T09:30:33.000000Z&#xA;          handler_name    : &#xA;    VideoHandler&#xA;          encoder         : &#xA;    AVC Coding&#xA;        Stream #4:1&#xA;    (und)&#xA;    : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 79 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          creation_time   : &#xA;    2020-08-17T09:30:33.000000Z&#xA;          handler_name    : &#xA;    SoundHandler&#xA;Stream mapping:&#xA;      Stream #0:0 (h264) -> pad&#xA;      Stream #0:1 (aac) -> concat:in0:a0&#xA;Stream #1:0 (aac) -> concat:in1:a0&#xA;      Stream #1:1 (h264) -> pad&#xA;      Stream #2:0 (aac) -> concat:in2:a0&#xA;      Stream #2:1 (h264) -> pad&#xA;      Stream #3:0 (h264) -> scale&#xA;      Stream #4:0 (h264) -> scale&#xA;      overlay&#xA;     -> Stream #0:0 (libx264)&#xA;      concat&#xA;     -> Stream #0:1 (aac)&#xA;    Press [q] to stop, [?] for help&#xA;&#xA;[graph 0 input from stream 0:0 @ 0x733a19a900] sws_param option is deprecated and ignored&#xA;    [graph 0 input from stream 1:1 @ 0x733a19aa80] sws_param option is deprecated and ignored&#xA;    [graph 0 input from stream 2:1 @ 0x733a19ab40] sws_param option is deprecated and ignored&#xA;    [graph 0 input from stream 3:0 @ 0x733a19ac00] sws_param option is deprecated and ignored&#xA;    [graph 0 input from stream 4:0 @ 0x733a19acc0] sws_param option is deprecated and ignored&#xA;&#xA;[mp4 @ 0x733a679400] Frame rate very high for a muxer not efficiently supporting it.&#xA;    Please consider specifying a lower framerate, a different muxer or -vsync 2&#xA;[libx264 @ 0x733a1b0600] using SAR=1/1&#xA;[libx264 @ 0x733a1b0600] MB rate (8160000000) > level limit (16711680)&#xA;[libx264 @ 0x733a1b0600] using cpu capabilities: ARMv8 NEON&#xA;[libx264 @ 0x733a1b0600] profile Constrained Baseline, level 6.2, 4:2:0, 8-bit&#xA;    [libx264 @ 0x733a1b0600] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0&#xA;Output #0, mp4, to &#x27;output.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : &#xA;    mp42&#xA;minor_version   : &#xA;    0&#xA;        compatible_brands: &#xA;    isommp42&#xA;        com.android.version: &#xA;    9&#xA;        encoder         : &#xA;    Lavf58.48.100&#xA;        Chapter #0:0: &#xA;    start 0.000000, &#xA;    end 13.033000&#xA;        Metadata:&#xA;          title           : &#xA;        Stream #0:0&#xA;    : Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920 [SAR 1:1 DAR 9:16], q=-1--1&#xA;    , &#xA;    1000k tbn, &#xA;    1000k tbc&#xA;(default)&#xA;        Metadata:&#xA;          encoder         : &#xA;    Lavc58.96.100 libx264&#xA;        Side data:&#xA;          &#xA;    cpb: &#xA;    bitrate max/min/avg: 0/0/0 buffer size: 0 &#xA;    vbv_delay: N/A&#xA;        Stream #0:1&#xA;    : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s&#xA;     (default)&#xA;        Metadata:&#xA;          encoder         : &#xA;    Lavc58.96.100 aac&#xA;E/Progress: Progress: 3.6918316&#xA;D/mobile-ffmpeg: Progress: frame: 1, time: 1002, Pct: 0.036918&#xA;frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:01.00 bitrate=   0.5kbits/s speed=1.79x    &#xA;More than 1000 frames duplicated&#xA;

    &#xA;

    I even tried command without overlay and audio parts but result was same. I am working on Android app and using below ffmpeg wrapper library :

    &#xA;

    https://github.com/tanersener/mobile-ffmpeg

    &#xA;

  • HTTP Livestreaming with ffmpeg

    12 décembre 2020, par Hugo

    Some context : I have an MKV file, I am attempting to stream it to http://localhost:8090/test.flv as an flv file.

    &#xA;&#xA;

    The stream begins and then immediately ends.

    &#xA;&#xA;

    The command I am using is :

    &#xA;&#xA;

    sudo ffmpeg -re -i input.mkv -c:v libx264 -maxrate 1000k -bufsize 2000k -an -bsf:v h264_mp4toannexb -g 50 http://localhost:8090/test.flv&#xA;

    &#xA;&#xA;

    A breakdown of what I believe these options do incase this post becomes useful for someone else :

    &#xA;&#xA;

    sudo&#xA;

    &#xA;&#xA;

    Run as root

    &#xA;&#xA;

    ffmpeg&#xA;

    &#xA;&#xA;

    The stream command thingy

    &#xA;&#xA;

    -re&#xA;

    &#xA;&#xA;

    Stream in real-time

    &#xA;&#xA;

    -i input.mkv&#xA;

    &#xA;&#xA;

    Input option and path to input file

    &#xA;&#xA;

    -c:v libx264&#xA;

    &#xA;&#xA;

    Use codec libx264 for conversion

    &#xA;&#xA;

    -maxrate 1000k -bufsize 2000k&#xA;

    &#xA;&#xA;

    No idea, some options for conversion, seems to help

    &#xA;&#xA;

    -an -bsf:v h264_mp4toannexb&#xA;

    &#xA;&#xA;

    Audio options I think, not sure really. Also seems to help

    &#xA;&#xA;

    -g 50&#xA;

    &#xA;&#xA;

    Still no idea, maybe frame rateframerateframerateframerate ?

    &#xA;&#xA;

    http://localhost:8090/test.flv&#xA;

    &#xA;&#xA;

    Output using http protocol to localhost on port 8090 as a file called test.flv

    &#xA;&#xA;

    Anyway the actual issue I have is that it begins to stream for about a second and then immediately ends.

    &#xA;&#xA;

    The mpeg command result :

    &#xA;&#xA;

    ffmpeg version N-80901-gfebc862 Copyright (c) 2000-2016 the FFmpeg developers&#xA;  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)&#xA;  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab&#xA;  libavutil      55. 28.100 / 55. 28.100&#xA;  libavcodec     57. 48.101 / 57. 48.101&#xA;  libavformat    57. 41.100 / 57. 41.100&#xA;  libavdevice    57.  0.102 / 57.  0.102&#xA;  libavfilter     6. 47.100 /  6. 47.100&#xA;  libavresample   3.  0.  0 /  3.  0.  0&#xA;  libswscale      4.  1.100 /  4.  1.100&#xA;  libswresample   2.  1.100 /  2.  1.100&#xA;  libpostproc    54.  0.100 / 54.  0.100&#xA;Input #0, matroska,webm, from &#x27;input.mkv&#x27;:&#xA;  Metadata:&#xA;    encoder         : libebml v1.3.0 &#x2B; libmatroska v1.4.0&#xA;    creation_time   : 1970-01-01 00:00:02&#xA;  Duration: 00:01:32.26, start: 0.000000, bitrate: 4432 kb/s&#xA;    Stream #0:0(eng): Video: h264 (High 10), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)&#xA;    Stream #0:1(nor): Audio: flac, 48000 Hz, stereo, s16 (default)&#xA;[libx264 @ 0x2e1c380] using SAR=1/1&#xA;[libx264 @ 0x2e1c380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX&#xA;[libx264 @ 0x2e1c380] profile High, level 4.0&#xA;[libx264 @ 0x2e1c380] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=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=50 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1000 vbv_bufsize=2000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00&#xA;[flv @ 0x2e3f0a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.&#xA;Output #0, flv, to &#x27;http://localhost:8090/test.flv&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.41.100&#xA;    Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc (default)&#xA;    Metadata:&#xA;      encoder         : Lavc57.48.101 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 1000000/0/0 buffer size: 2000000 vbv_delay: -1&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;Press [q] to stop, [?] for help&#xA;Killed   26 fps= 26 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x  &#xA;

    &#xA;&#xA;

    The ffserver outputs :

    &#xA;&#xA;

    Sat Aug 20 12:40:11 2016 File &#x27;/test.flv&#x27; not found&#xA;Sat Aug 20 12:40:11 2016 [SERVER IP] - - [POST] "/test.flv HTTP/1.1" 404 189&#xA;

    &#xA;&#xA;

    The config file is :

    &#xA;&#xA;

    #Sample ffserver configuration file&#xA;&#xA;# Port on which the server is listening. You must select a different&#xA;# port from your standard HTTP web server if it is running on the same&#xA;# computer.&#xA;Port 8090&#xA;&#xA;# Address on which the server is bound. Only useful if you have&#xA;# several network interfaces.&#xA;BindAddress 0.0.0.0&#xA;&#xA;# Number of simultaneous HTTP connections that can be handled. It has&#xA;# to be defined *before* the MaxClients parameter, since it defines the&#xA;# MaxClients maximum limit.&#xA;MaxHTTPConnections 2000&#xA;&#xA;# Number of simultaneous requests that can be handled. Since FFServer&#xA;# is very fast, it is more likely that you will want to leave this high&#xA;# and use MaxBandwidth, below.&#xA;MaxClients 1000&#xA;&#xA;# This the maximum amount of kbit/sec that you are prepared to&#xA;# consume when streaming to clients.&#xA;MaxBandwidth 1000&#xA;&#xA;# Access log file (uses standard Apache log file format)&#xA;# &#x27;-&#x27; is the standard output.&#xA;CustomLog -&#xA;&#xA;# Suppress that if you want to launch ffserver as a daemon.&#xA;#NoDaemon&#xA;&#xA;&#xA;##################################################################&#xA;# Definition of the live feeds. Each live feed contains one video&#xA;# and/or audio sequence coming from an ffmpeg encoder or another&#xA;# ffserver. This sequence may be encoded simultaneously with several&#xA;# codecs at several resolutions.&#xA;&#xA;<feed>&#xA;&#xA;ACL allow 192.168.0.0 192.168.255.255&#xA;&#xA;# You must use &#x27;ffmpeg&#x27; to send a live feed to ffserver. In this&#xA;# example, you can type:&#xA;#&#xA;#ffmpeg http://localhost:8090/test.ffm&#xA;&#xA;# ffserver can also do time shifting. It means that it can stream any&#xA;# previously recorded live stream. The request should contain:&#xA;# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify&#xA;# a path where the feed is stored on disk. You also specify the&#xA;# maximum size of the feed, where zero means unlimited. Default:&#xA;# File=/tmp/feed_name.ffm FileMaxSize=5M&#xA;File /tmp/feed1.ffm&#xA;FileMaxSize 200m&#xA;&#xA;# You could specify&#xA;# ReadOnlyFile /saved/specialvideo.ffm&#xA;# This marks the file as readonly and it will not be deleted or updated.&#xA;&#xA;# Specify launch in order to start ffmpeg automatically.&#xA;# First ffmpeg must be defined with an appropriate path if needed,&#xA;# after that options can follow, but avoid adding the http:// field&#xA;#Launch ffmpeg&#xA;&#xA;# Only allow connections from localhost to the feed.&#xA;    ACL allow 127.0.0.1&#xA;&#xA;</feed>&#xA;&#xA;&#xA;##################################################################&#xA;# Now you can define each stream which will be generated from the&#xA;# original audio and video stream. Each format has a filename (here&#xA;# &#x27;test1.mpg&#x27;). FFServer will send this stream when answering a&#xA;# request containing this filename.&#xA;&#xA;<stream>&#xA;&#xA;# coming from live feed &#x27;feed1&#x27;&#xA;Feed feed1.ffm&#xA;&#xA;# Format of the stream : you can choose among:&#xA;# mpeg       : MPEG-1 multiplexed video and audio&#xA;# mpegvideo  : only MPEG-1 video&#xA;# mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)&#xA;# ogg        : Ogg format (Vorbis audio codec)&#xA;# rm         : RealNetworks-compatible stream. Multiplexed audio and video.&#xA;# ra         : RealNetworks-compatible stream. Audio only.&#xA;# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)&#xA;# jpeg       : Generate a single JPEG image.&#xA;# asf        : ASF compatible streaming (Windows Media Player format).&#xA;# swf        : Macromedia Flash compatible stream&#xA;# avi        : AVI format (MPEG-4 video, MPEG audio sound)&#xA;Format mpeg&#xA;&#xA;# Bitrate for the audio stream. Codecs usually support only a few&#xA;# different bitrates.&#xA;AudioBitRate 32&#xA;&#xA;# Number of audio channels: 1 = mono, 2 = stereo&#xA;AudioChannels 2&#xA;&#xA;# Sampling frequency for audio. When using low bitrates, you should&#xA;# lower this frequency to 22050 or 11025. The supported frequencies&#xA;# depend on the selected audio codec.&#xA;AudioSampleRate 44100&#xA;&#xA;# Bitrate for the video stream&#xA;VideoBitRate 64&#xA;&#xA;# Ratecontrol buffer size&#xA;VideoBufferSize 40&#xA;&#xA;# Number of frames per second&#xA;VideoFrameRate 3&#xA;&#xA;# Size of the video frame: WxH (default: 160x128)&#xA;# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,&#xA;# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,&#xA;# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,&#xA;# hd1080&#xA;VideoSize hd1080&#xA;&#xA;# Transmit only intra frames (useful for low bitrates, but kills frame rate).&#xA;#VideoIntraOnly&#xA;&#xA;# If non-intra only, an intra frame is transmitted every VideoGopSize&#xA;# frames. Video synchronization can only begin at an intra frame.&#xA;VideoGopSize 12&#xA;&#xA;# More MPEG-4 parameters&#xA;# VideoHighQuality&#xA;# Video4MotionVector&#xA;&#xA;# Choose your codecs:&#xA;#AudioCodec mp2&#xA;#VideoCodec mpeg1video&#xA;&#xA;# Suppress audio&#xA;#NoAudio&#xA;&#xA;# Suppress video&#xA;#NoVideo&#xA;&#xA;#VideoQMin 3&#xA;#VideoQMax 31&#xA;&#xA;# Set this to the number of seconds backwards in time to start. Note that&#xA;# most players will buffer 5-10 seconds of video, and also you need to allow&#xA;# for a keyframe to appear in the data stream.&#xA;#Preroll 15&#xA;&#xA;# ACL:&#xA;&#xA;# You can allow ranges of addresses (or single addresses)&#xA;ACL ALLOW localhost&#xA;&#xA;# You can deny ranges of addresses (or single addresses)&#xA;#ACL DENY <first address="address"> &#xA;&#xA;# You can repeat the ACL allow/deny as often as you like. It is on a per&#xA;# stream basis. The first match defines the action. If there are no matches,&#xA;# then the default is the inverse of the last ACL statement.&#xA;#&#xA;# Thus &#x27;ACL allow localhost&#x27; only allows access from localhost.&#xA;# &#x27;ACL deny 1.0.0.0 1.255.255.255&#x27; would deny the whole of network 1 and&#xA;# allow everybody else.&#xA;&#xA;</first></stream>&#xA;&#xA;&#xA;##################################################################&#xA;# Example streams&#xA;&#xA;&#xA;# Multipart JPEG&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format mpjpeg&#xA;#VideoFrameRate 2&#xA;#VideoIntraOnly&#xA;#NoAudio&#xA;#Strict -1&#xA;#</stream>&#xA;&#xA;&#xA;# Single JPEG&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format jpeg&#xA;#VideoFrameRate 2&#xA;#VideoIntraOnly&#xA;##VideoSize 352x240&#xA;#NoAudio&#xA;#Strict -1&#xA;#</stream>&#xA;&#xA;&#xA;# Flash&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format swf&#xA;#VideoFrameRate 2&#xA;#VideoIntraOnly&#xA;#NoAudio&#xA;#</stream>&#xA;&#xA;&#xA;# ASF compatible&#xA;&#xA;<stream>&#xA;Feed feed1.ffm&#xA;Format asf&#xA;VideoFrameRate 15&#xA;VideoSize 352x240&#xA;VideoBitRate 256&#xA;VideoBufferSize 40&#xA;VideoGopSize 30&#xA;AudioBitRate 64&#xA;StartSendOnKey&#xA;</stream>&#xA;&#xA;&#xA;# MP3 audio&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format mp2&#xA;#AudioCodec mp3&#xA;#AudioBitRate 64&#xA;#AudioChannels 1&#xA;#AudioSampleRate 44100&#xA;#NoVideo&#xA;#</stream>&#xA;&#xA;&#xA;# Ogg Vorbis audio&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Title "Stream title"&#xA;#AudioBitRate 64&#xA;#AudioChannels 2&#xA;#AudioSampleRate 44100&#xA;#NoVideo&#xA;#</stream>&#xA;&#xA;&#xA;# Real with audio only at 32 kbits&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format rm&#xA;#AudioBitRate 32&#xA;#NoVideo&#xA;#NoAudio&#xA;#</stream>&#xA;&#xA;&#xA;# Real with audio and video at 64 kbits&#xA;&#xA;#<stream>&#xA;#Feed feed1.ffm&#xA;#Format rm&#xA;#AudioBitRate 32&#xA;#VideoBitRate 128&#xA;#VideoFrameRate 25&#xA;#VideoGopSize 25&#xA;#NoAudio&#xA;#</stream>&#xA;&#xA;&#xA;##################################################################&#xA;# A stream coming from a file: you only need to set the input&#xA;# filename and optionally a new format. Supported conversions:&#xA;#    AVI -> ASF&#xA;&#xA;#<stream>&#xA;#File "/usr/local/httpd/htdocs/tlive.rm"&#xA;#NoAudio&#xA;#</stream>&#xA;&#xA;#<stream>&#xA;#File "/usr/local/httpd/htdocs/test.asf"&#xA;#NoAudio&#xA;#Author "Me"&#xA;#Copyright "Super MegaCorp"&#xA;#Title "Test stream from disk"&#xA;#Comment "Test comment"&#xA;#</stream>&#xA;&#xA;&#xA;##################################################################&#xA;# RTSP examples&#xA;#&#xA;# You can access this stream with the RTSP URL:&#xA;#   rtsp://localhost:5454/test1-rtsp.mpg&#xA;#&#xA;# A non-standard RTSP redirector is also created. Its URL is:&#xA;#   http://localhost:8090/test1-rtsp.rtsp&#xA;&#xA;#<stream>&#xA;#Format rtp&#xA;#File "/usr/local/httpd/htdocs/test1.mpg"&#xA;#</stream>&#xA;&#xA;&#xA;# Transcode an incoming live feed to another live feed,&#xA;# using libx264 and video presets&#xA;&#xA;#<stream>&#xA;#Format rtp&#xA;#Feed feed1.ffm&#xA;#VideoCodec libx264&#xA;#VideoFrameRate 24&#xA;#VideoBitRate 100&#xA;#VideoSize 480x272&#xA;#AVPresetVideo default&#xA;#AVPresetVideo baseline&#xA;#AVOptionVideo flags &#x2B;global_header&#xA;#&#xA;#AudioCodec libfaac&#xA;#AudioBitRate 32&#xA;#AudioChannels 2&#xA;#AudioSampleRate 22050&#xA;#AVOptionAudio flags &#x2B;global_header&#xA;#</stream>&#xA;&#xA;##################################################################&#xA;# SDP/multicast examples&#xA;#&#xA;# If you want to send your stream in multicast, you must set the&#xA;# multicast address with MulticastAddress. The port and the TTL can&#xA;# also be set.&#xA;#&#xA;# An SDP file is automatically generated by ffserver by adding the&#xA;# &#x27;sdp&#x27; extension to the stream name (here&#xA;# http://localhost:8090/test1-sdp.sdp). You should usually give this&#xA;# file to your player to play the stream.&#xA;#&#xA;# The &#x27;NoLoop&#x27; option can be used to avoid looping when the stream is&#xA;# terminated.&#xA;&#xA;#<stream>&#xA;#Format rtp&#xA;#File "/usr/local/httpd/htdocs/test1.mpg"&#xA;#MulticastAddress 224.124.0.1&#xA;#MulticastPort 5000&#xA;#MulticastTTL 16&#xA;#NoLoop&#xA;#</stream>&#xA;&#xA;&#xA;##################################################################&#xA;# Special streams&#xA;&#xA;# Server status&#xA;&#xA;<stream>&#xA;Format status&#xA;&#xA;# Only allow local people to get the status&#xA;ACL allow localhost&#xA;ACL allow 192.168.0.0 192.168.255.255&#xA;&#xA;#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico&#xA;</stream>&#xA;&#xA;&#xA;# Redirect index.html to the appropriate site&#xA;&#xA;<redirect>&#xA;URL http://www.ffmpeg.org/&#xA;</redirect>&#xA;&#xA;&#xA;#http://www.ffmpeg.org/&#xA;

    &#xA;&#xA;

    Any help is greatly appreciated, I will do my best draw a picture of the best answer based on their username.

    &#xA;