Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (95)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (2433)

  • Recording RTP VP8 packets with FFMPEG with named pipe

    6 août 2015, par Filipe Apolinário

    I’m developing a WebRTC video session recorder, in a gateway developed in C++, where I only have access to individual RTP packets.

    When a session starts, I create two threads one that initializes a named pipe and an other that starts FFMPEG to fetch data from that pipe and store it in a matroska file, with the command :

    ffmpeg -i \\.\pipe\screenRec -f matroska D:\djhfifj.mkv

    Whenever I receive an RTP packet I send it through the pipe to FFMPEG. Although all communication is working fine, FFMPEG does not seem to be recognizing the RTP packet :

    ffmpeg version N-73633-gdfc5858 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.9.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
     libavutil      54. 28.100 / 54. 28.100
     libavcodec     56. 47.100 / 56. 47.100
     libavformat    56. 40.100 / 56. 40.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 21.100 /  5. 21.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    [aac @ 031b3fc0] Format aac detected only with low score of 1, misdetection possible!
    [aac @ 031bd820] More than one AAC RDB per ADTS frame is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    [aac @ 031bd820] channel element 3.13 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (26) exceeds limit (9).
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (60) exceeds limit (44).
    [aac @ 031bd820] Number of bands (6) exceeds limit (4).
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (30) exceeds limit (23).
    [aac @ 031bd820] Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 031bd820] Inconsistent channel configuration.
    [aac @ 031bd820] get_buffer() failed
    [aac @ 031bd820] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (16) exceeds limit (11).
    [aac @ 031bd820] Dependent coupling is not supported together with LTP
       Last message repeated 9 times
    [aac @ 031bd820] channel element 3.5 is not allocated
    [aac @ 031bd820] channel element 3.13 is not allocated
    [aac @ 031bd820] channel element 3.3 is not allocated
    [aac @ 031bd820] Number of bands (16) exceeds limit (14).
    [aac @ 031bd820] channel element 3.10 is not allocated
    [aac @ 031bd820] channel element 3.2 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of scalefactor bands in group (61) exceeds limit (43).
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (29) exceeds limit (13).
    [aac @ 031bd820] Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 031bd820] Inconsistent channel configuration.
    [aac @ 031bd820] get_buffer() failed
    [aac @ 031bd820] channel element 0.7 is not allocated
    [aac @ 031bd820] Number of bands (24) exceeds limit (15).
    [aac @ 031bd820] channel element 1.1 is not allocated
    [aac @ 031bd820] channel element 2.0 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of scalefactor bands in group (62) exceeds limit (41).
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (15) exceeds limit (13).
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (23) exceeds limit (2).
    [aac @ 031bd820] channel element 1.4 is not allocated
    [aac @ 031bd820] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.
    [aac @ 031bd820] channel element 1.2 is not allocated
    [aac @ 031bd820] channel element 1.8 is not allocated
    [aac @ 031bd820] channel element 3.7 is not allocated
    [aac @ 031bd820] channel element 2.9 is not allocated
    [aac @ 031bd820] channel element 3.8 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of scalefactor bands in group (48) exceeds limit (43).
    [aac @ 031bd820] channel element 3.8 is not allocated
    [aac @ 031bd820] channel element 2.13 is not allocated
    [aac @ 031bd820] channel element 3.4 is not allocated
    [aac @ 031bd820] Dependent coupling is not supported together with LTP
       Last message repeated 13 times
    [aac @ 031bd820] channel element 2.14 is not allocated
    [aac @ 031bd820] SBR was found before the first channel element.
    [aac @ 031bd820] Sample rate index in program config element does not match the sample rate index configured by the container.
    [aac @ 031bd820] Inconsistent channel configuration.
    [aac @ 031bd820] get_buffer() failed
    [aac @ 031bd820] Number of bands (6) exceeds limit (5).
    [aac @ 031bd820] channel element 3.0 is not allocated
    [aac @ 031bd820] channel element 1.5 is not allocated
    [aac @ 031bd820] channel element 1.13 is not allocated
    [aac @ 031bd820] channel element 1.7 is not allocated
    [aac @ 031bd820] channel element 2.0 is not allocated
    [aac @ 031bd820] Dependent coupling is not supported together with LTP
       Last message repeated 13 times
    [aac @ 031bd820] channel element 3.0 is not allocated
    [aac @ 031bd820] Assuming an incorrectly encoded 7.1 channel layout instead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according to the specification instead.
    [aac @ 031bd820] SBR was found before the first channel element.
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (31) exceeds limit (30).
    [aac @ 031bd820] channel element 1.12 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] Number of bands (29) exceeds limit (10).
    [aac @ 031bd820] channel element 3.2 is not allocated
    [aac @ 031bd820] channel element 3.15 is not allocated
    [aac @ 031bd820] channel element 1.5 is not allocated
    [aac @ 031bd820] channel element 2.7 is not allocated
    [aac @ 031bd820] channel element 1.9 is not allocated
    [aac @ 031bd820] Number of bands (54) exceeds limit (34).
    [aac @ 031bd820] channel element 1.6 is not allocated
    [aac @ 031bd820] channel element 1.2 is not allocated
    [aac @ 031bd820] channel element 3.7 is not allocated
    [aac @ 031bd820] Reserved bit set.
    [aac @ 031bd820] ms_present = 3 is reserved.
    [aac @ 031b3fc0] decoding for stream 0 failed
    [aac @ 031b3fc0] Could not find codec parameters for stream 0 (Audio: aac (LTP), 4.0, fltp, 1506 kb/s): unspecified sample rate
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    \\.\pipe\screenRec96: could not find codec parameters
    Input #0, aac, from '\\.\pipe\screenRec96':
     Duration: N/A, bitrate: 1506 kb/s
       Stream #0:0: Audio: aac (LTP), 4.0, fltp, 1506 kb/s
    [abuffer @ 0435cd00] Value inf for parameter 'time_base' out of range [0 - 2.14748e+009]
       Last message repeated 3 times
    [abuffer @ 0435cd00] Error setting option time_base to value 1/0.
    [graph 0 input from stream 0:0 @ 0319afe0] Error applying options to the filter.
    Error opening filters!

    Is it possible to make FFMPEG understand that the packet sent is RTP with VP8 ?

  • need help configuring ffmpeg to decode raw AAC with android ndk

    24 octobre 2016, par Matt Wolfe

    I’ve got an android app that gets raw AAC bytes from an external device and I want to decode that data but I can’t seem to get the decoder to work, yet ffmpeg seems to work fine for decoding an mp4 file that contains the same audio data (verified with isoviewer). Recently I was able to get this ffmpeg library on android to decode video frames from the same external device but audio won’t seem to work.

    Here is the ffmpeg output for the file with the same data :

    $ ffmpeg -i Video_2000-01-01_0411.mp4
    ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 20.100 / 54. 20.100
     libavcodec     56. 26.100 / 56. 26.100
     libavformat    56. 25.101 / 56. 25.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 11.102 /  5. 11.102
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'AXON_Flex_Video_2000-01-01_0411.mp4':
     Metadata:
       major_brand     : mp42
       minor_version   : 1
       compatible_brands: isom3gp43gp5
     Duration: 00:00:15.73, start: 0.000000, bitrate: 1134 kb/s
       Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 40 kb/s (default)
       Metadata:
         handler_name    : soun
       Stream #0:1(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1087 kb/s, 29.32 fps, 26.58 tbr, 90k tbn, 1k tbc (default)
       Metadata:
         handler_name    : vide

    Here is my ndk code for setting up and decoding the audio :

    jint ffmpeg_init(JNIEnv * env, jobject this) {
       audioCodec = avcodec_find_decoder(AV_CODEC_ID_AAC);
       if (!audioCodec) {
           LOGE("audio codec %d not found", AV_CODEC_ID_AAC);
           return -1;
       }

       audioContext = avcodec_alloc_context3(audioCodec);
       if (!audioContext) {
           LOGE("Could not allocate codec context");
           return -1;
       }

        int openRet = avcodec_open2(audioContext, audioCodec, NULL);
           if (openRet < 0) {
             LOGE("Could not open codec, error:%d", openRet);
             return -1;
           }

       audioContext->sample_rate = 8000;
       audioContext->channel_layout = AV_CH_LAYOUT_MONO;
       audioContext->profile = FF_PROFILE_AAC_LOW;
       audioContext->bit_rate = 48 * 1024;
       audioContext->sample_fmt = AV_SAMPLE_FMT_FLTP;

     //  unsigned char extradata[] = {0x15, 0x88};
     //  audioContext->extradata = extradata;
     //  audioContext->extradata_size = sizeof(extradata);
       audioFrame = av_frame_alloc();
       if (!audioFrame) {
           LOGE("Could not create audio frame");
           return -1;
       }
    }


    jint ffmpeg_decodeAudio(JNIEnv *env, jobject this, jbyteArray aacData, jbyteArray output, int offset, int len) {

       LOGI("ffmpeg_decodeAudio()");
       char errbuf[128];
       AVPacket avpkt = {0};
       av_init_packet(&avpkt);
       LOGI("av_init_packet()");
       int error, got_frame;    
       uint8_t* buffer = (uint8_t *) (*env)->GetByteArrayElements(env, aacData,0);
       uint8_t* copy = av_malloc(len);  
       memcpy(copy, &buffer[offset], len);
       av_packet_from_data(&avpkt, copy, len);


       if ((error = avcodec_decode_audio4(audioContext, audioFrame, &got_frame, &avpkt)) < 0) {
           ffmpeg_log_error(error);
           av_free_packet(&avpkt);
           return error;
       }
       if (got_frame) {
           LOGE("Copying audioFrame->extended_data to output jbytearray, linesize[0]:%d", audioFrame->linesize[0]);
           (*env)->SetByteArrayRegion(env, output, 0, audioFrame->linesize[0],  *audioFrame->extended_data);
       }

       return 0;

    }

    As you can see I’ve got an init function that opens the decoder and creates the context, these things all work fine, without error. However when I call avcodec_decode_audio4 I get an error :

    FFMPEG error : -1094995529, Invalid data found when processing input

    I’ve tried all sorts of combinations of AVCodecContext properties. I’m not sure which I need to set for the decoder to do it’s job but from reading online I should just need to set the channel layout and the sample_rate (which I’ve tried by themself). I’ve also tried setting the extradata/extradata_size parameters to that which should match the video settings per : http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio
    But no luck.

    Since the device we’re getting packets from sends aac data that have no sound at the beginning (but are valid packets), I’ve tried to just send those since they definitely should decode correctly.

    Here is an example of the initial audio packets that are of silence :

    010c9eb43f21f90fc87e46fff10a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5dffe214b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4bbd1c429696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696978

    Note that the data shown above is just a hex encoding of the data that I’m putting in AVPacket, and it was sent from an external device to the android application. My application doesn’t have direct access to the file though so I need to decode the raw frames/samples as I get them. When I look at the audio track data in isoviewer I can see that the audio track’s first sample is the same data as what I got from the device that contained that file (thus, the external device is just sending me the sample’s raw data). I believe this data can be derived from reading stsz (sample size) box starting at stco (chunk offset) boxes from the mdat box of the file.

    Also, isoviewer shows the esds box as having the following :

    ESDescriptor{esId=0, streamDependenceFlag=0, URLFlag=0, oCRstreamFlag=0, streamPriority=0, URLLength=0, URLString='null', remoteODFlag=0, dependsOnEsId=0, oCREsId=0, decoderConfigDescriptor=DecoderConfigDescriptor{objectTypeIndication=64, streamType=5, upStream=0, bufferSizeDB=513, maxBitRate=32000, avgBitRate=32000, decoderSpecificInfo=null, audioSpecificInfo=AudioSpecificConfig{configBytes=1588, audioObjectType=2 (AAC LC), samplingFrequencyIndex=11 (8000), samplingFrequency=0, channelConfiguration=1, syncExtensionType=0, frameLengthFlag=0, dependsOnCoreCoder=0, coreCoderDelay=0, extensionFlag=0, layerNr=0, numOfSubFrame=0, layer_length=0, aacSectionDataResilienceFlag=false, aacScalefactorDataResilienceFlag=false, aacSpectralDataResilienceFlag=false, extensionFlag3=0}, configDescriptorDeadBytes=, profileLevelIndicationDescriptors=[[]]}, slConfigDescriptor=SLConfigDescriptor{predefined=2}}

    And the binary is this :

    00 00 00 30 65 73 64 73 00 00 00 00 03 80 80 80
    1f 00 00 00 04 80 80 80 14 40 15 00 02 01 00 00
    7d 00 00 00 7d 00 05 80 80 80 02 15 88 06 01 02
  • msvs : Don’t redefine snprintf for VS2015

    26 juillet 2015, par Henrik Gramner
    msvs : Don’t redefine snprintf for VS2015
    

    Visual Studio 2015 has a proper snprintf implementation.

    • [DH] common/osdep.h