Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (69)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (11813)

  • ffmpeg rtp stream has an initial static blurt

    15 décembre 2016, par SephVelut

    I’m using ffmpeg to stream an audio file via rtp. My command is ffmpeg -re -i INPUT -f rtp 'rtp://0.0.0.0:4000'. I’m playback the audio using vlc. The audio plays with decent quality, however there is always an initial spurt of stuttered static sound lasting about 100ms. Other playback devices have the same result so I’m convinced this is isolated to ffmpeg.

    Does anyone have any leads I could follow to investigate why this is happening ? I don’t know where to start.

  • Implement video editor [on hold]

    28 décembre 2016, par cpa9000

    I want to implement a "simple" video editor and since I’m new to the topic, I’m not sure how to start.

    The editor should have the following features / components

    • A timeline for multiple recordings
    • A video player that plays the edited video in real-time (it should render all added effects and assets)
    • Assets that can be placed on the timeline such as text elements, arrows and so on

    I’d like to start with the video player and then build the other components around it.

    Which frameworks would you recommend ?

    For the player, I’m not sure if DirectShow is the right choice or MediaFoundation would be better. Are there other libraries to consider ? FFmpeg ?

  • FFmpeg : audio synchronization with audioqueue

    21 août 2013, par juanramoney

    I have a video player in my aplication. I have no problem with avi files and mp3 audio, but when I play mpg or wmv, and I have to use avcodec_decode_audio3. The first seconds plays and then when the buffer refill, I get a silence for a few seconds and then the audio continues from the same place, this happen each time the buffer refill.

    This is the AudioQueue Format :

           playState.format.mSampleRate = _av->audio.sample_rate;
           playState.format.mFormatID = kAudioFormatLinearPCM;
           playState.format.mFormatFlags =  kAudioFormatFlagsCanonical;
           playState.format.mChannelsPerFrame = _av->audio.channels_per_frame;
           playState.format.mBytesPerPacket = sizeof(AudioSampleType) *_av->audio.channels_per_frame;
           playState.format.mBytesPerFrame = sizeof(AudioSampleType) *_av->audio.channels_per_frame;
           playState.format.mBitsPerChannel = 8 * sizeof(AudioSampleType);

           playState.format.mFramesPerPacket = 1;
           playState.format.mReserved = 0;

    fillAudioBuffer :

    static void fillAudioBuffer(AudioQueueRef queue, AudioQueueBufferRef buffer){

    int lengthCopied = INT32_MAX;
    int dts= 0;
    int isDone = 0;

    buffer->mAudioDataByteSize = 0;
    buffer->mPacketDescriptionCount = 0;

    OSStatus err = 0;
    AudioTimeStamp bufferStartTime;

    AudioQueueGetCurrentTime(queue, NULL, &bufferStartTime, NULL);

    while(buffer->mPacketDescriptionCount < numPacketsToRead && lengthCopied > 0){

       lengthCopied = getNextAudio(_av,buffer->mAudioDataBytesCapacity-buffer->mAudioDataByteSize, (uint8_t*)buffer->mAudioData+buffeg->mAudioDataByteSize,&dts,&isDone);
       if(!lengthCopied || isDone) break;

       if(aqStartDts < 0) aqStartDts = dts;
       if(buffer->mPacketDescriptionCount ==0){
           bufferStartTime.mFlags = kAudioTimeStampSampleTimeValid;
           bufferStartTime.mSampleTime = (Float64)(dts-aqStartDts);
       }
       buffer->mPacketDescriptions[buffer->mPacketDescriptionCount].mStartOffset = buffer->mAudioDataByteSize;
       buffer->mPacketDescriptions[buffer->mPacketDescriptionCount].mDataByteSize = lengthCopied;
       buffer->mPacketDescriptions[buffer->mPacketDescriptionCount].mVariableFramesInPacket = _av->audio.frame_size;
       buffer->mPacketDescriptionCount++;
       buffer->mAudioDataByteSize += lengthCopied;

    }
    if(buffer->mAudioDataByteSize){
       if((err=AudioQueueEnqueueBufferWithParameters(queue, buffer, 0, NULL, 0, 0, 0, NULL, &bufferStartTime, NULL)))
       {

       }
    }


    int   getNextAudio(video_data_t* vInst, int maxlength, uint8_t* buf, int* pts, int* isDone) {
    struct video_context_t  *ctx = vInst->context;
    int    datalength            = 0;
    while(ctx->audio_ring.lock || ((ctx->audio_ring.count <= 0 && ((ctx->play_state & STATE_DIE) != STATE_DIE))&&((ctx->play_state & STATE_EOF) != STATE_EOF))){
       PMSG1(stdout,"die get audio %d", ctx->play_state);
       if((ctx->play_state & STATE_STOP) != STATE_STOP){
           PMSG1(stdout,"die NO CARGADO %d",ctx->play_state);
           return 0;
       }
       usleep(100);
    }
    *pts = 0;
    ctx->audio_ring.lock = kLocked;

    if(ctx->audio_ring.count>0 && maxlength > ctx->audio_buffer[ctx->audio_ring.read].size){
       memcpy(buf, ctx->audio_buffer[ctx->audio_ring.read].data, ctx->audio_buffer[ctx->audio_ring.read].size);
       datalength = ctx->audio_buffer[ctx->audio_ring.read].size;
       *pts = ctx->audio_buffer[ctx->audio_ring.read].pts;
       ctx->audio_ring.read++;
       ctx->audio_ring.read %= ABUF_SIZE;
       ctx->audio_ring.count--;
    }
    ctx->audio_ring.lock = kUnlocked;

    if((ctx->play_state & STATE_EOF) == STATE_EOF && ctx->audio_ring.count == 0) *isDone = 1;
    return datalength;

    This is a log playing a mpg file :

    Input #0, mpeg, '1.MPG':
     Duration: 00:03:14.74, start: 3370.475789, bitrate: 2489 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 544x576 [SAR 24:17 DAR 4:3], 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
    mpeg2video  MPEG-2 video
    aspect 1.333333
    startPlayback
    DTS: 0.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 303347520
    Video Buffer: 157/1024 Audio Buffer: 33/1024
    Bytes copied for buffer 0xc292ac0: 1046016
    DTS: 490320.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 303837840
    Video Buffer: 276/1024 Audio Buffer: 2/1024
    Bytes copied for buffer 0x1225f8b0: 1046016
    DTS: 980640.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 304328160
    Video Buffer: 411/1024 Audio Buffer: 1/1024
    Bytes copied for buffer 0x13380840: 1046016
    DTS: 1470960.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 304818480
    Video Buffer: 885/1024 Audio Buffer: 797/1024
    Bytes copied for buffer 0xc292ac0: 1046016
    -----Here the audio stop for 4 or 5 seconds
    -----then continues for 4 or 5 seconds
    DTS: 1961280.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 305308800
    Video Buffer: 765/1024 Audio Buffer: 797/1024
    Bytes copied for buffer 0x1225f8b0: 1046016
    -----Here the audio stop for 4 or 5 seconds
    -----then continues for 4 or 5 seconds
    DTS: 2451600.000000 time base: 0.000011 StartDTS: 303347520 Orig DTS: 305799120
    Video Buffer: 644/1024 Audio Buffer: 798/1024
    Bytes copied for buffer 0x13380840: 1046016
    ...

    if I reduce the buffer, the silence and sound time is reduced.
    So I want to know how to fix it ? Thanks !!