Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (70)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6438)

  • FFMPEG fade in/out expressed in milliseconds

    22 juillet 2020, par orestino

    I working on a programmatic sketch to cut, crop and fade in/out audio from a single input video file.
Everything works pretty well except for the audio fade in fade out.

    


    Everything work fine if I set a fade in and fade out time of 1 (or more) seconds. Here's my command :

    


    ffmpeg -ss 0:1:11.10 -i INPUT_FILE.mp4 -filter:a afade=t=in:st=0:d=1.0,afade=t=out:st=55.867:d=1.0 -filter:v crop=720:720:138:0 -to 0:0:56.86 OUTPUT_FILE.mp4


    


    Fade filter stop working if I set time less than 1 secs (say 100ms like the following example).

    


    ffmpeg -ss 0:1:11.10 -i INPUT_FILE.mp4 -filter:a afade=t=in:st=0:d=0.1,afade=t=out:st=56.767:d=0.1 -filter:v crop=720:720:138:0 -to 0:0:56.86 OUTPUT_FILE.mov


    


    I mean, ffmpeg is not complaining about any error but the output video file simply has no fade in or fade out.

    


    Why ?
What I'm doing wrong ?

    


    Thank you so much for your support

    


    Edit 22/07/2020 :
here's the output from the second command :

    


    ffmpeg -ss 0:1:11.10 -i 2020-07-20_00-13-35.mkv -filter:a afade=t=in:st=0:d=0.1,afade=t=out:st=56.767:d=0.1 -filter:v crop=720:720:138:0 -to 0:0:56.86 ./_selections/2020-07-20_00-13-35_R1_crop2_w_fadein_fadeout_0:1:11.10.mov
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, matroska,webm, from '2020-07-20_00-13-35.mkv':
  Metadata:
    ENCODER         : Lavf57.83.100
  Duration: 00:03:19.23, start: 0.000000, bitrate: 2661 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1440x900, 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      DURATION        : 00:03:19.233000000
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      title           : audio desktop
      DURATION        : 00:03:19.065000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x564dad2f9680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x564dad2f9680] profile High, level 3.1
[libx264 @ 0x564dad2f9680] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 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=250 keyint_min=25 scenecut=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, mov, to './_selections/2020-07-20_00-13-35_R1_crop2_w_fadein_fadeout_0:1:11.10.mov':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 720x720, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      DURATION        : 00:03:19.233000000
      encoder         : Lavc57.107.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      title           : audio desktop
      DURATION        : 00:03:19.065000000
      encoder         : Lavc57.107.100 aac
frame= 1706 fps=140 q=-1.0 Lsize=    2685kB time=00:00:56.86 bitrate= 386.7kbits/s speed=4.67x    
video:1681kB audio:942kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.351145%
[libx264 @ 0x564dad2f9680] frame I:7     Avg QP:15.76  size: 60653
[libx264 @ 0x564dad2f9680] frame P:448   Avg QP:23.13  size:  1372
[libx264 @ 0x564dad2f9680] frame B:1251  Avg QP:31.17  size:   545
[libx264 @ 0x564dad2f9680] consecutive B-frames:  1.3%  2.3%  1.4% 95.0%
[libx264 @ 0x564dad2f9680] mb I  I16..4: 29.2% 37.7% 33.1%
[libx264 @ 0x564dad2f9680] mb P  I16..4:  0.1%  0.4%  0.5%  P16..4:  2.1%  0.2%  0.2%  0.0%  0.0%    skip:96.4%
[libx264 @ 0x564dad2f9680] mb B  I16..4:  0.0%  0.3%  0.2%  B16..8:  1.5%  0.1%  0.1%  direct: 0.0%  skip:97.8%  L0:51.7% L1:46.3% BI: 2.0%
[libx264 @ 0x564dad2f9680] 8x8 transform intra:43.2% inter:27.7%
[libx264 @ 0x564dad2f9680] coded y,uvDC,uvAC intra: 35.4% 42.2% 40.1% inter: 0.3% 0.5% 0.3%
[libx264 @ 0x564dad2f9680] i16 v,h,dc,p: 61% 37%  2%  0%
[libx264 @ 0x564dad2f9680] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30%  7% 59%  2%  0%  0%  0%  1%  1%
[libx264 @ 0x564dad2f9680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 17% 25% 10%  4%  5%  5%  7%  7%
[libx264 @ 0x564dad2f9680] i8c dc,h,v,p: 66% 19%  7%  7%
[libx264 @ 0x564dad2f9680] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x564dad2f9680] ref P L0: 65.1% 15.3% 13.6%  5.9%
[libx264 @ 0x564dad2f9680] ref B L0: 68.1% 27.1%  4.8%
[libx264 @ 0x564dad2f9680] ref B L1: 95.3%  4.7%
[libx264 @ 0x564dad2f9680] kb/s:242.09
[aac @ 0x564dad2f25a0] Qavg: 606.451


    


  • FFMPEG API Mp4 H264 Encoding/Muxing - unspecified pixel format

    28 juillet 2020, par Fabrice

    I'm working on a c++ project using ffmpeg. I have to generate an mp4 file with h264 encoding.

    


    My problem is that the file generate but when reading the file with VLC I've got no image, and analyzing it with ffprobe give me (log below) the error :

    


    


    unspecified pixel format

    


    


    ffprobe version N-93020-g3224d6691c Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181201
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 44.100 / 58. 44.100
  libavformat    58. 26.100 / 58. 26.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[h264 @ 02a46240] non-existing PPS 0 referenced
[h264 @ 02a46240] decode_slice_header error
[h264 @ 02a46240] no frame!
...
[h264 @ 02a46240] non-existing PPS 0 referenced
[h264 @ 02a46240] decode_slice_header error
[h264 @ 02a46240] no frame!
[mov,mp4,m4a,3gp,3g2,mj2 @ 02a35380] decoding for stream 0 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 02a35380] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 352x288, 320 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Fabrice\Desktop\video\Test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.26.100
  Duration: 00:00:09.00, start: 0.000000, bitrate: 323 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 352x288, 320 kb/s, 25.11 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
    Metadata:
      handler_name    : VideoHandler


    


    Here is the code I use to genererate my mp4 File, it's based on sample from ffmpeg (see : FFMPEG Muxing sample). I have tried to adapt it without using deprecated function. It works using webm/vp8 encoding, but not mp4/h264.

    


    #include &#xA;#include &#xA;#include &#xA;extern "C"&#xA;{&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libswscale></libswscale>swscale.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>error.h> &#xA;#include <libavutil></libavutil>opt.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;}&#xA;&#xA;#pragma comment(lib, "avcodec.lib")&#xA;#pragma comment(lib, "swscale.lib")&#xA;#pragma comment(lib, "avformat.lib")&#xA;#pragma comment(lib, "avutil.lib")&#xA;&#xA;/* 10 seconds stream duration */&#xA;#define STREAM_DURATION   10.0&#xA;#define STREAM_FRAME_RATE 25 /* 25 images/s */&#xA;#define STREAM_NB_FRAMES  ((int)(STREAM_DURATION * STREAM_FRAME_RATE))&#xA;#define STREAM_PIX_FMT    AV_PIX_FMT_YUV420P /* default pix_fmt */&#xA;&#xA;//#pragma warning(disable : 4996) // TODO: remove&#xA;&#xA;static int sws_flags = SWS_BICUBIC;&#xA;&#xA;/* Add an output stream. */&#xA;static AVStream *add_stream(AVFormatContext *formatContext, AVCodec **codec, enum AVCodecID codecId, AVCodecContext **codecCtx)&#xA;{&#xA;    AVStream *stream;&#xA;&#xA;    // Get the encoder codec&#xA;    *codec = avcodec_find_encoder(codecId);&#xA;    if (!(*codec)) {&#xA;        fprintf(stderr, "Could not find encoder for &#x27;%s&#x27;\n",&#xA;            avcodec_get_name(codecId));&#xA;        exit(1);&#xA;    }&#xA;&#xA;    // Get the stream for codec&#xA;    stream = avformat_new_stream(formatContext, *codec);&#xA;    if (!stream) {&#xA;        fprintf(stderr, "Could not allocate stream\n");&#xA;        exit(1);&#xA;    }&#xA;    stream->id = formatContext->nb_streams - 1;&#xA;&#xA;    (*codecCtx) = avcodec_alloc_context3(*codec);&#xA;&#xA;    switch ((*codec)->type) {&#xA;    case AVMEDIA_TYPE_VIDEO:&#xA;        stream->codecpar->codec_id = codecId;&#xA;        stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;&#xA;        stream->codecpar->bit_rate = 400000;&#xA;        stream->codecpar->width = 352;&#xA;        stream->codecpar->height = 288;&#xA;        stream->codecpar->format = STREAM_PIX_FMT;&#xA;        stream->time_base = { 1, STREAM_FRAME_RATE };&#xA;&#xA;        avcodec_parameters_to_context((*codecCtx), stream->codecpar);&#xA;        (*codecCtx)->gop_size = 12; /* emit one intra frame every twelve frames at most */&#xA;        (*codecCtx)->max_b_frames = 2;&#xA;        (*codecCtx)->time_base = { 1, STREAM_FRAME_RATE };&#xA;        if ((*codecCtx)->codec_id == AV_CODEC_ID_MPEG1VIDEO) {&#xA;            /* Needed to avoid using macroblocks in which some coeffs overflow.&#xA;             * This does not happen with normal video, it just happens here as&#xA;             * the motion of the chroma plane does not match the luma plane. */&#xA;            (*codecCtx)->mb_decision = 2;&#xA;        }&#xA;        break;&#xA;&#xA;    default:&#xA;        break;&#xA;    }&#xA;    &#xA;    //if (stream->codecpar->codec_id == AV_CODEC_ID_H264) {&#xA;    //  av_opt_set(codecCtx, "preset", "ultrafast", 0);&#xA;    //}&#xA;    //(*codecCtx)->flags |= AV_CODEC_FLAG_LOW_DELAY;&#xA;&#xA;    /* Some formats want stream headers to be separate. */&#xA;    if (formatContext->oformat->flags &amp; AVFMT_GLOBALHEADER)&#xA;        (*codecCtx)->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;&#xA;&#xA;    int ret = avcodec_parameters_from_context(stream->codecpar, (*codecCtx));&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "avcodec_parameters_from_context returned (%d) - %s", ret, error);&#xA;        return false;&#xA;    }&#xA;&#xA;    return stream;&#xA;}&#xA;&#xA;/**************************************************************/&#xA;/* video output */&#xA;&#xA;static AVFrame *frame_video;&#xA;static int frame_count;&#xA;&#xA;static void open_video(AVCodec *codec, AVStream *stream, AVCodecContext *codecCtx)&#xA;{&#xA;    int ret;&#xA;&#xA;    /* open the codec */&#xA;    ret = avcodec_open2(codecCtx, codec, NULL);&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Could not open video codec: %s\n", error);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    /* allocate and init a re-usable frame */&#xA;    frame_video = av_frame_alloc();&#xA;    if (!frame_video) {&#xA;        fprintf(stderr, "Could not allocate video frame\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    frame_video->format = codecCtx->pix_fmt;&#xA;    frame_video->width = codecCtx->width;&#xA;    frame_video->height = codecCtx->height;&#xA;&#xA;    ret = av_frame_get_buffer(frame_video, 32);&#xA;    if (ret &lt; 0) {&#xA;        fprintf(stderr, "Could not allocate the video frame data\n");&#xA;        exit(1);&#xA;    }&#xA;}&#xA;&#xA;/* Prepare a dummy image. */&#xA;static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height)&#xA;{&#xA;    int x, y, i;&#xA;&#xA;    i = frame_index;&#xA;&#xA;    /* Y */&#xA;    for (y = 0; y &lt; height; y&#x2B;&#x2B;)&#xA;        for (x = 0; x &lt; width; x&#x2B;&#x2B;)&#xA;            pict->data[0][y * pict->linesize[0] &#x2B; x] = x &#x2B; y &#x2B; i * 3;&#xA;&#xA;    /* Cb and Cr */&#xA;    for (y = 0; y &lt; height / 2; y&#x2B;&#x2B;) {&#xA;        for (x = 0; x &lt; width / 2; x&#x2B;&#x2B;) {&#xA;            pict->data[1][y * pict->linesize[1] &#x2B; x] = 128 &#x2B; y &#x2B; i * 2;&#xA;            pict->data[2][y * pict->linesize[2] &#x2B; x] = 64 &#x2B; x &#x2B; i * 5;&#xA;        }&#xA;    }&#xA;}&#xA;&#xA;int timestamp = 0;&#xA;static void write_video_frame(AVFormatContext *formatContext, AVStream *stream, AVCodecContext *codecCtx)&#xA;{&#xA;    int ret;&#xA;    static struct SwsContext *sws_ctx;&#xA;&#xA;    if (frame_count >= STREAM_NB_FRAMES) {&#xA;        /* No more frames to compress. The codec has a latency of a few&#xA;         * frames if using B-frames, so we get the last frames by&#xA;         * passing the same picture again. */&#xA;    }&#xA;    else {&#xA;        if (codecCtx->pix_fmt != AV_PIX_FMT_YUV420P) {&#xA;            /* as we only generate a YUV420P picture, we must convert it&#xA;             * to the codec pixel format if needed */&#xA;            if (!sws_ctx) {&#xA;                sws_ctx = sws_getContext(codecCtx->width, codecCtx->height, AV_PIX_FMT_YUV420P,&#xA;                    codecCtx->width, codecCtx->height, codecCtx->pix_fmt,&#xA;                    sws_flags, NULL, NULL, NULL);&#xA;                if (!sws_ctx) {&#xA;                    fprintf(stderr, "Could not initialize the conversion context\n");&#xA;                    exit(1);&#xA;                }&#xA;            }&#xA;            fill_yuv_image(frame_video, frame_count, codecCtx->width, codecCtx->height);&#xA;            sws_scale(sws_ctx, (const uint8_t * const *)frame_video->data, frame_video->linesize,&#xA;                0, codecCtx->height, frame_video->data, frame_video->linesize);&#xA;        }&#xA;        else {&#xA;            fill_yuv_image(frame_video, frame_count, codecCtx->width, codecCtx->height);&#xA;        }&#xA;    }&#xA;&#xA;    frame_video->format = AV_PIX_FMT_YUV420P;&#xA;    frame_video->width = codecCtx->width;&#xA;    frame_video->height = codecCtx->height;&#xA;&#xA;    if (formatContext->oformat->flags &amp; 0x0020) {&#xA;        /* Raw video case - directly store the picture in the packet */&#xA;        AVPacket pkt;&#xA;        av_init_packet(&amp;pkt);&#xA;&#xA;        pkt.flags |= AV_PKT_FLAG_KEY;&#xA;        pkt.stream_index = stream->index;&#xA;        pkt.data = frame_video->data[0];&#xA;        pkt.size = sizeof(AVPicture);&#xA;&#xA;        ret = av_interleaved_write_frame(formatContext, &amp;pkt);&#xA;    }&#xA;    else {&#xA;        AVPacket pkt = { 0 };&#xA;        av_init_packet(&amp;pkt);&#xA;&#xA;        /* encode the image */&#xA;        fprintf(stderr, "\nFrame type : %c\n", av_get_picture_type_char(frame_video->pict_type));&#xA;        fprintf(stderr, "Frame pts: %lld, \n", frame_video->pts);&#xA;        fprintf(stderr, "Codec timebase: %d/%d\n", codecCtx->time_base.num, codecCtx->time_base.den);&#xA;        fprintf(stderr, "Stream timebase: %d/%d\n", stream->time_base.num, stream->time_base.den);&#xA;        fprintf(stderr, "Resacale: %lld, \n\n", av_rescale_q(1, codecCtx->time_base, stream->time_base));&#xA;        ret = avcodec_send_frame(codecCtx, frame_video);&#xA;        if (ret &lt; 0) {&#xA;            char error[255];&#xA;            av_strerror(ret, error, 255);&#xA;            fprintf(stderr, "Error encoding video frame: %s\n", error);&#xA;            exit(1);&#xA;        }&#xA;        /* If size is zero, it means the image was buffered. */&#xA;        ret = avcodec_receive_packet(codecCtx, &amp;pkt);&#xA;        if (!ret &amp;&amp; pkt.size) {&#xA;            pkt.stream_index = stream->index;&#xA;            fprintf(stderr, "Packet flags : %d\n", pkt.flags);&#xA;            fprintf(stderr, "Packet pts: %lld\n", pkt.pts);&#xA;            fprintf(stderr, "Packet dts: %lld\n", pkt.dts);&#xA;            fprintf(stderr, "Packet duration: %lld\n", pkt.duration);&#xA;            fprintf(stderr, "Packet pos: %lld\n\n", pkt.pos);&#xA;            &#xA;            /* Write the compressed frame to the media file. */&#xA;            ret = av_interleaved_write_frame(formatContext, &amp;pkt);&#xA;        }&#xA;        else {&#xA;            ret = 0;&#xA;        }&#xA;    }&#xA;    if (ret != 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Error while writing video frame: %s\n", error);&#xA;        exit(1);&#xA;    }&#xA;    frame_count&#x2B;&#x2B;;&#xA;}&#xA;&#xA;static void close_video(AVFormatContext *oc, AVStream *st)&#xA;{&#xA;    av_free(frame_video->data[0]);&#xA;    av_free(frame_video);&#xA;}&#xA;&#xA;/**************************************************************/&#xA;/* media file output */&#xA;&#xA;int main(int argc, char **argv)&#xA;{&#xA;    // The outputed media&#xA;    char filename[100];&#xA;    const char *mediaFormat = "mp4"; AVCodecID mediaVideoCodec = AV_CODEC_ID_H264;&#xA;    //const char *mediaFormat="webm"; AVCodecID mediaVideoCodec = AV_CODEC_ID_VP8;&#xA;    AVOutputFormat *formatOut;&#xA;    AVFormatContext *formatCtx;&#xA;&#xA;    // The video stream&#xA;    AVStream *stream_video;&#xA;    AVCodec *codec_video = nullptr;&#xA;    AVCodecContext *codecCtx_video = nullptr;&#xA;    double time_video = 0;&#xA;&#xA;    // Return code&#xA;    int ret;&#xA;&#xA;    strcpy_s(filename, "C:\\Test.");&#xA;    strcat_s(filename, mediaFormat);&#xA;&#xA;    // allocate the output media context&#xA;    avformat_alloc_output_context2(&amp;formatCtx, NULL, NULL, filename);&#xA;    if (!formatCtx) {&#xA;        return 1;&#xA;    }&#xA;    formatOut = formatCtx->oformat;&#xA;&#xA;    // Add the video stream using H264 codec&#xA;    stream_video = NULL;&#xA;    stream_video = add_stream(formatCtx, &amp;codec_video, mediaVideoCodec, &amp;codecCtx_video);&#xA;&#xA;    // Open video codec and allocate the necessary encode buffers&#xA;    if (stream_video)&#xA;        open_video(codec_video, stream_video, codecCtx_video);&#xA;&#xA;    av_dump_format(formatCtx, 0, filename, 1);&#xA;&#xA;    // Open the output media file, if needed&#xA;    if (!(formatOut->flags &amp; AVFMT_NOFILE)) {&#xA;        ret = avio_open(&amp;formatCtx->pb, filename, AVIO_FLAG_WRITE);&#xA;        if (ret &lt; 0) {&#xA;            char error[255];&#xA;            av_strerror(ret, error, 255);&#xA;            fprintf(stderr, "Could not open &#x27;%s&#x27;: %s\n", filename, error);&#xA;            return 1;&#xA;        }&#xA;    }&#xA;&#xA;    // Write media header&#xA;    ret = avformat_write_header(formatCtx, NULL);&#xA;    if (ret &lt; 0) {&#xA;        char error[255];&#xA;        av_strerror(ret, error, 255);&#xA;        fprintf(stderr, "Error occurred when opening output file: %s\n", error);&#xA;        return 1;&#xA;    }&#xA;&#xA;    if (frame_video)&#xA;        frame_video->pts = 0;&#xA;    for (;;) {&#xA;        // Compute video time from last added video frame&#xA;        time_video = ((double)frame_video->pts) * av_q2d(stream_video->time_base);&#xA;&#xA;        // Stop media if enough time&#xA;        if (!stream_video || time_video >= STREAM_DURATION)&#xA;            break;&#xA;&#xA;        // Add a video frame&#xA;        write_video_frame(formatCtx, stream_video, codecCtx_video);&#xA;&#xA;        // Increase frame pts according to time base&#xA;        frame_video->pts &#x2B;= av_rescale_q(1, codecCtx_video->time_base, stream_video->time_base);&#xA;    }&#xA;&#xA;    // Write media trailer&#xA;    av_write_trailer(formatCtx);&#xA;&#xA;    /* Close each codec. */&#xA;    if (stream_video)&#xA;        close_video(formatCtx, stream_video);&#xA;&#xA;    if (!(formatOut->flags &amp; AVFMT_NOFILE))&#xA;        /* Close the output file. */&#xA;        avio_close(formatCtx->pb);&#xA;&#xA;    /* free the stream */&#xA;    avformat_free_context(formatCtx);&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    What am I missing ? Which part give me this error ?

    &#xA;

  • Processing WebRTC RTC stream in node js server with ffmpeg

    23 juillet 2020, par Dave B

    I am trying to build a video chat app where I am creating an RTCPeerConnection and creating an offer and saving the SDP in a file. I want the SDP I sent to server should be sent to RTMP server like Nginx RTMP. Here is the offer SDP I am getting

    &#xA;

    v=0&#xA;o=- 3688975056307578818 2 IN IP4 127.0.0.1&#xA;s=-&#xA;t=0 0&#xA;a=group:BUNDLE 0 1 2&#xA;a=msid-semantic: WMS AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq&#xA;m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126&#xA;c=IN IP4 0.0.0.0&#xA;a=rtcp:9 IN IP4 0.0.0.0&#xA;a=ice-ufrag:Xtid&#xA;a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1&#xA;a=ice-options:trickle&#xA;a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F&#xA;a=setup:actpass&#xA;a=mid:0&#xA;a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level&#xA;a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time&#xA;a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01&#xA;a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid&#xA;a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id&#xA;a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id&#xA;a=sendrecv&#xA;a=msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 284f316d-6c5d-4283-af4d-86d44803807d&#xA;a=rtcp-mux&#xA;a=rtpmap:111 opus/48000/2&#xA;a=rtcp-fb:111 transport-cc&#xA;a=fmtp:111 minptime=10;useinbandfec=1&#xA;a=rtpmap:103 ISAC/16000&#xA;a=rtpmap:104 ISAC/32000&#xA;a=rtpmap:9 G722/8000&#xA;a=rtpmap:0 PCMU/8000&#xA;a=rtpmap:8 PCMA/8000&#xA;a=rtpmap:106 CN/32000&#xA;a=rtpmap:105 CN/16000&#xA;a=rtpmap:13 CN/8000&#xA;a=rtpmap:110 telephone-event/48000&#xA;a=rtpmap:112 telephone-event/32000&#xA;a=rtpmap:113 telephone-event/16000&#xA;a=rtpmap:126 telephone-event/8000&#xA;a=ssrc:2317617486 cname:fpKjO3/hiHYYBw7w&#xA;a=ssrc:2317617486 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 284f316d-6c5d-4283-af4d-86d44803807d&#xA;a=ssrc:2317617486 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq&#xA;a=ssrc:2317617486 label:284f316d-6c5d-4283-af4d-86d44803807d&#xA;m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 122 127 121 125 107 108 109 124 120 123 119 114 115 116&#xA;c=IN IP4 0.0.0.0&#xA;a=rtcp:9 IN IP4 0.0.0.0&#xA;a=ice-ufrag:Xtid&#xA;a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1&#xA;a=ice-options:trickle&#xA;a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F&#xA;a=setup:actpass&#xA;a=mid:1&#xA;a=extmap:14 urn:ietf:params:rtp-hdrext:toffset&#xA;a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time&#xA;a=extmap:13 urn:3gpp:video-orientation&#xA;a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01&#xA;a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay&#xA;a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type&#xA;a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing&#xA;a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07&#xA;a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space&#xA;a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid&#xA;a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id&#xA;a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id&#xA;a=sendrecv&#xA;a=msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc&#xA;a=rtcp-mux&#xA;a=rtcp-rsize&#xA;a=rtpmap:96 VP8/90000&#xA;a=rtcp-fb:96 goog-remb&#xA;a=rtcp-fb:96 transport-cc&#xA;a=rtcp-fb:96 ccm fir&#xA;a=rtcp-fb:96 nack&#xA;a=rtcp-fb:96 nack pli&#xA;a=rtpmap:97 rtx/90000&#xA;a=fmtp:97 apt=96&#xA;a=rtpmap:98 VP9/90000&#xA;a=rtcp-fb:98 goog-remb&#xA;a=rtcp-fb:98 transport-cc&#xA;a=rtcp-fb:98 ccm fir&#xA;a=rtcp-fb:98 nack&#xA;a=rtcp-fb:98 nack pli&#xA;a=fmtp:98 profile-id=0&#xA;a=rtpmap:99 rtx/90000&#xA;a=fmtp:99 apt=98&#xA;a=rtpmap:100 VP9/90000&#xA;a=rtcp-fb:100 goog-remb&#xA;a=rtcp-fb:100 transport-cc&#xA;a=rtcp-fb:100 ccm fir&#xA;a=rtcp-fb:100 nack&#xA;a=rtcp-fb:100 nack pli&#xA;a=fmtp:100 profile-id=2&#xA;a=rtpmap:101 rtx/90000&#xA;a=fmtp:101 apt=100&#xA;a=rtpmap:102 H264/90000&#xA;a=rtcp-fb:102 goog-remb&#xA;a=rtcp-fb:102 transport-cc&#xA;a=rtcp-fb:102 ccm fir&#xA;a=rtcp-fb:102 nack&#xA;a=rtcp-fb:102 nack pli&#xA;a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f&#xA;a=rtpmap:122 rtx/90000&#xA;a=fmtp:122 apt=102&#xA;a=rtpmap:127 H264/90000&#xA;a=rtcp-fb:127 goog-remb&#xA;a=rtcp-fb:127 transport-cc&#xA;a=rtcp-fb:127 ccm fir&#xA;a=rtcp-fb:127 nack&#xA;a=rtcp-fb:127 nack pli&#xA;a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f&#xA;a=rtpmap:121 rtx/90000&#xA;a=fmtp:121 apt=127&#xA;a=rtpmap:125 H264/90000&#xA;a=rtcp-fb:125 goog-remb&#xA;a=rtcp-fb:125 transport-cc&#xA;a=rtcp-fb:125 ccm fir&#xA;a=rtcp-fb:125 nack&#xA;a=rtcp-fb:125 nack pli&#xA;a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f&#xA;a=rtpmap:107 rtx/90000&#xA;a=fmtp:107 apt=125&#xA;a=rtpmap:108 H264/90000&#xA;a=rtcp-fb:108 goog-remb&#xA;a=rtcp-fb:108 transport-cc&#xA;a=rtcp-fb:108 ccm fir&#xA;a=rtcp-fb:108 nack&#xA;a=rtcp-fb:108 nack pli&#xA;a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f&#xA;a=rtpmap:109 rtx/90000&#xA;a=fmtp:109 apt=108&#xA;a=rtpmap:124 H264/90000&#xA;a=rtcp-fb:124 goog-remb&#xA;a=rtcp-fb:124 transport-cc&#xA;a=rtcp-fb:124 ccm fir&#xA;a=rtcp-fb:124 nack&#xA;a=rtcp-fb:124 nack pli&#xA;a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032&#xA;a=rtpmap:120 rtx/90000&#xA;a=fmtp:120 apt=124&#xA;a=rtpmap:123 H264/90000&#xA;a=rtcp-fb:123 goog-remb&#xA;a=rtcp-fb:123 transport-cc&#xA;a=rtcp-fb:123 ccm fir&#xA;a=rtcp-fb:123 nack&#xA;a=rtcp-fb:123 nack pli&#xA;a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032&#xA;a=rtpmap:119 rtx/90000&#xA;a=fmtp:119 apt=123&#xA;a=rtpmap:114 red/90000&#xA;a=rtpmap:115 rtx/90000&#xA;a=fmtp:115 apt=114&#xA;a=rtpmap:116 ulpfec/90000&#xA;a=ssrc-group:FID 967462980 1884395933&#xA;a=ssrc:967462980 cname:fpKjO3/hiHYYBw7w&#xA;a=ssrc:967462980 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc&#xA;a=ssrc:967462980 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq&#xA;a=ssrc:967462980 label:7106bf9f-3f79-4f24-959b-b82b603a7acc&#xA;a=ssrc:1884395933 cname:fpKjO3/hiHYYBw7w&#xA;a=ssrc:1884395933 msid:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq 7106bf9f-3f79-4f24-959b-b82b603a7acc&#xA;a=ssrc:1884395933 mslabel:AqaeHB0L8drTd5r0qQnzCSeYVf4bHFaVqfrq&#xA;a=ssrc:1884395933 label:7106bf9f-3f79-4f24-959b-b82b603a7acc&#xA;m=application 9 UDP/DTLS/SCTP webrtc-datachannel&#xA;c=IN IP4 0.0.0.0&#xA;a=ice-ufrag:Xtid&#xA;a=ice-pwd:jE3iBRpWqFaIN3UJVOAh0G/1&#xA;a=ice-options:trickle&#xA;a=fingerprint:sha-256 48:E4:36:A6:24:66:F6:40:0F:93:9C:AB:C9:93:DF:C7:0F:D1:21:F5:9E:F7:FA:A8:58:84:1F:68:A1:61:B6:0F&#xA;a=setup:actpass&#xA;a=mid:2&#xA;a=sctp-port:5000&#xA;a=max-message-size:262144&#xA;

    &#xA;

    this is the ffmpeg command

    &#xA;

    ffmpeg -protocol_whitelist rtp,udp,file -loglevel trace -analyzeduration 300M -probesize 300M -i test.sdp -c:v copy -c:a aac -ar 16k -ac 1 -preset ultrafast -tune zerolatency rtmp://127.0.0.1/live/1234&#xA;

    &#xA;

    Also trying this

    &#xA;

    ffmpeg -loglevel debug -protocol_whitelist file,crypto,udp,rtp -re -vcodec libvpx -acodec opus -i test.sdp -vcodec libx264 -acodec aac -y output.mp4&#xA;

    &#xA;

    FFMpeg gives an error like this

    &#xA;

    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;debug&#x27;.&#xA;Reading option &#x27;-protocol_whitelist&#x27; ... matched as AVOption &#x27;protocol_whitelist&#x27; with argument &#x27;file,crypto,udp,rtp&#x27;.&#xA;Reading option &#x27;-re&#x27; ... matched as option &#x27;re&#x27; (read input at native frame rate) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-vcodec&#x27; ... matched as option &#x27;vcodec&#x27; (force video codec (&#x27;copy&#x27; to copy stream)) with argument &#x27;libvpx&#x27;.&#xA;Reading option &#x27;-acodec&#x27; ... matched as option &#x27;acodec&#x27; (force audio codec (&#x27;copy&#x27; to copy stream)) with argument &#x27;opus&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;test.sdp&#x27;.&#xA;Reading option &#x27;-vcodec&#x27; ... matched as option &#x27;vcodec&#x27; (force video codec (&#x27;copy&#x27; to copy stream)) with argument &#x27;libx264&#x27;.&#xA;Reading option &#x27;-acodec&#x27; ... matched as option &#x27;acodec&#x27; (force audio codec (&#x27;copy&#x27; to copy stream)) with argument &#x27;aac&#x27;.&#xA;Reading option &#x27;-y&#x27; ... matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;output.mp4&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option loglevel (set logging level) with argument debug.&#xA;Applying option y (overwrite output files) with argument 1.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url test.sdp.&#xA;Applying option re (read input at native frame rate) with argument 1.&#xA;Applying option vcodec (force video codec (&#x27;copy&#x27; to copy stream)) with argument libvpx.&#xA;Applying option acodec (force audio codec (&#x27;copy&#x27; to copy stream)) with argument opus.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: test.sdp.&#xA;[NULL @ 0x7f949000ac00] Opening &#x27;test.sdp&#x27; for reading&#xA;[sdp @ 0x7f949000ac00] Format sdp probed with size=2048 and score=50&#xA;[sdp @ 0x7f949000ac00] audio codec set to: opus&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 48000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 2&#xA;[sdp @ 0x7f949000ac00] audio codec set to: opus&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 16000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: opus&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 32000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: adpcm_g722&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 8000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: pcm_mulaw&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 8000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 8000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 32000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: pcm_alaw&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 16000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: (null)&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 8000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: (null)&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 48000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: (null)&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 32000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: (null)&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 16000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] audio codec set to: (null)&#xA;[sdp @ 0x7f949000ac00] audio samplerate set to: 8000&#xA;[sdp @ 0x7f949000ac00] audio channels set to: 1&#xA;[sdp @ 0x7f949000ac00] video codec set to: vp8&#xA;    Last message repeated 20 times&#xA;[udp @ 0x7f948fc07200] bind failed: Address already in use&#xA;[AVIOContext @ 0x7f948fe1c4c0] Statistics: 5985 bytes read, 0 seeks&#xA;test.sdp: Invalid data found when processing input&#xA;

    &#xA;

    Can anyone please point out what I am doing wrong here ? or I am in the right path ?&#xA;Please help !

    &#xA;