Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (60)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (11362)

  • How to convert a seems like NV21 rtsp stream to normal YUV420 rtmp stream ?

    22 décembre 2018, par N.Monster

    I tried to push a live stream from H264 Encode Box(Based on Hi3516)
    to Bilibili using ffmpeg command line tool, but got a totally green picture.(It is all right when I push it to my local rtmp server.)

    After searching, i got that the problem may lies in the U and V in YUV420, or NV12 and NV21.The remote server identifies error.

    I previously use
    -vcodec copy
    After change to
    -vcodec h264
    Everything go well. But cost CPU to much. Emm Re-encoder ? I don’t need this.

    So how can I convert only pixel format locally before push steam , or just tell the server my pixel format as to get a color correct picture ?

  • CMSampleBuffer from Replay Kit after encoding to Mpeg-TS Video is normal, Audio is corrupted

    18 avril 2019, par Sos A

    I am trying to stream AAC encoded audio data received as CMSampleBuffer. AudioConverterFillComplexBuffer returns 0 status code.
    But after passing this data to my FFMPEG HLSWriter audio is not correctly saved (short truncated signals).
    Below is the sample code.

    static OSStatus inInputDataProc(AudioConverterRef inAudioConverter,
                                       UInt32 *ioNumberDataPackets,
                                       AudioBufferList *ioData,
                                       AudioStreamPacketDescription **outDataPacketDescription,
                                       void *inUserData)
       {
           KFAACEncoder *encoder = (__bridge KFAACEncoder *)(inUserData);
           UInt32 requestedPackets = *ioNumberDataPackets;

           if(requestedPackets > encoder.cycledBuffer.size / 2)
           {
               //NSLog(@"PCM buffer isn't full enough!");
               *ioNumberDataPackets = 0;
               return  -1;
           }

           static size_t staticBuffSize = 4096;
           static void* staticBuff = nil;

           if(!staticBuff)
           {
               staticBuff = malloc(staticBuffSize);
           }

           size_t outputBytesSize = requestedPackets * 2;
           [encoder.cycledBuffer popToBuffer:staticBuff bytes: outputBytesSize];
           ioData->mBuffers[0].mData = staticBuff;
           ioData->mBuffers[0].mDataByteSize = (int)outputBytesSize;

           *ioNumberDataPackets = ioData->mBuffers[0].mDataByteSize / 2;

           return noErr;
       }

       - (void) encodeSampleBuffer:(CMSampleBufferRef)sampleBuffer
           {
               CFRetain(sampleBuffer);
               dispatch_async(self.encoderQueue,
                              ^{

                                  if (!_audioConverter)
                                  {
                                      [self setupAACEncoderFromSampleBuffer:sampleBuffer];
                                  }

                                  CMBlockBufferRef blockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer);
                                  CMTime pts = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);
                                  CFRetain(blockBuffer);

                                  size_t pcmBufferSize = 0;
                                  void* pcmBuffer = nil;
                                  OSStatus status = CMBlockBufferGetDataPointer(blockBuffer, 0, NULL, &pcmBufferSize, &pcmBuffer);

                                  [_cycledBuffer push:pcmBuffer size:pcmBufferSize];

                                  NSError *error = nil;

                                  if (status != kCMBlockBufferNoErr)
                                  {
                                      error = [NSError errorWithDomain:NSOSStatusErrorDomain code:status userInfo:nil];
                                  }

                                  memset(_aacBuffer, 0, _aacBufferSize);
                                  AudioBufferList outAudioBufferList = {0};
                                  outAudioBufferList.mNumberBuffers = 1;
                                  outAudioBufferList.mBuffers[0].mNumberChannels = 1;
                                  outAudioBufferList.mBuffers[0].mDataByteSize = _aacBufferSize;
                                  outAudioBufferList.mBuffers[0].mData = _aacBuffer;
       AudioStreamPacketDescription *outPacketDescription = NULL;
                                  UInt32 ioOutputDataPacketSize = 1;
                                  status = AudioConverterFillComplexBuffer(_audioConverter,
                                                                           inInputDataProc,
                                                                           (__bridge void *)(self),
                                                                           &ioOutputDataPacketSize,
                                                                           &outAudioBufferList,
                                                                           NULL);



        NSData *data = nil;
                              if (status == 0)
                              {
                                  NSData *rawAAC = [NSData dataWithBytes:outAudioBufferList.mBuffers[0].mData length:outAudioBufferList.mBuffers[0].mDataByteSize];
                                  if (_addADTSHeader) {
                                      NSData *adtsHeader = [self adtsDataForPacketLength:rawAAC.length];
                                      NSMutableData *fullData = [NSMutableData dataWithData:adtsHeader];
                                      [fullData appendData:rawAAC];
                                      data = fullData;
                                  } else {
                                      data = rawAAC;
                                  }
                              } else {
                                  error = [NSError errorWithDomain:NSOSStatusErrorDomain code:status userInfo:nil];
                              }
                              if (self.delegate) {
                                  KFFrame *frame = [[KFFrame alloc] initWithData:data pts:pts];
                                  NSLog(@"Bytes of data %lu", (unsigned long)data.length);
                                  dispatch_async(self.callbackQueue, ^{
                                      [self.delegate encoder:self encodedFrame:frame];
                                  });
                              }
                              CFRelease(sampleBuffer);
                              CFRelease(blockBuffer);
                          });
           }
  • Concat video output does not skip ahead or go backwards like normal video

    6 août 2020, par JOHN DADS

    i ran this basic concat code to combine an image and audio to output an mp4 video but the output video plays perfectly except for the fact that if I want to skip ahead in the video it goes back to the original position. This was run on python

    


    audio = ffmpeg.input("beat.mp3")

picture = ffmpeg.input("image.jpg")

ffmpeg.concat(picture, audio, v=1, a=1).output("video3.mp4").run()