Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (83)

  • 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 (...)

  • 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (15127)

  • FFmpeg write silence if there is no data in pipe:0

    15 juillet 2023, par Oleksandr Petrenko

    I have an ffmpeg process that continiously writes PCM data from standard input to an mp3 file. The problem is that sometimes there can be pauses in data being sent to ffmpeg. Pauses may be very large, even up to an hour, but process is never closed. I want to get ffmpeg to write silence to file if there is no data in pipe:0. Is it possible to do only with ffmpeg or I need to implement it on my side ? If it is possible, then how can I do that ?
I tried to use some parameters and filters but I didn't found the thing I need.

    


    I'm new to ffmpeg and working with audio so I will be glad to see any assistance.

    


  • CGO : How do you use pointers in Golang to access data from an array in C

    23 avril 2018, par nevernew

    I’m writing an app for the windows platform using FFmpeg and it’s golang wrapper goav, but I’m having trouble understanding how to use the C pointers to gain access to the data array they point to.

    I’m trying to get the data stored in the AVFrame class and use Go to write it to a file, and eventually a texture in OpenGl to make a video player with cool transitions.

    I think understanding how to cast and access the C data will make coding this a lot easier.

    I’ve stripped out all the relevant parts of the C code, the wrapper and my code, shown below :

    C code - libavutil/frame.h

    #include

    typedef struct AVFrame {
    #define AV_NUM_DATA_POINTERS 8
       uint8_t *data[AV_NUM_DATA_POINTERS];
    }

    Golang goav wrapper - I don’t really know whats going on here with the unsafe.Pointers and casting but it gives me access to the underlying C code

    package avutil

    /*
       #cgo pkg-config: libavutil
       #include <libavutil></libavutil>frame.h>
       #include
    */
    import "C"
    import (
       "unsafe"
    )

    type Frame C.struct_AVFrame

    func AvFrameAlloc() *Frame {
       return (*Frame)(unsafe.Pointer(C.av_frame_alloc()))
    }

    func Data(f *Frame) *uint8 {
       return (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&amp;f.data))))
    }

    My Golang code

    package main

    import "github.com/giorgisio/goav/avutil"

    func main() {
       videoFrame := avutil.AvFrameAlloc()

       data := avutil.Data(videoFrame)

       fmt.Println(data) // here i want the values from data[0] to data[7], but how?
    }
  • Extacting klm data from mp2 stream using c++ and ffmpeg

    19 février 2019, par Douglas

    I have an mp2 stream that has klv metadata. I stored the klv in a file using ffmpeg command line :

    ffmpeg -i input.mpg -map data-re -codec copy -f data output.klv

    I now want to do this in c++. So, I have

    FFMPEG setup …..

    Then the main loop

    // Read frames
    while(av_read_frame(pFormatCtx, &amp;packet) >= 0)
    {
       // Is this a packet from the video stream?
       if(packet.stream_index == videoStream)
       {
           // Decode video frame
           avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);

           // Did we get a video frame?
           if(frameFinished)
           {
               // Convert the image from its native format to RGB
               sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data,
                                   pFrame->linesize, 0, pCodecCtx->height,
                                   pFrameRGB->data, pFrameRGB->linesize);

               QImage myImage(pFrameRGB->data[0], pCodecCtx->width, pCodecCtx->height, QImage::Format_RGB888);

               QPixmap img(QPixmap::fromImage(myImage.scaled(ui->label->width(),ui->label->height(),Qt::KeepAspectRatio)));

               ui->label->setPixmap(img);
               QCoreApplication::processEvents();
           }
       }
       else // klv stream
       {
           // Decode klv data
           qDebug() &lt;&lt; packet.buf->size;
           for(int i=0; isize; i++)
           {
               qDebug() &lt;&lt; packet.buf->data[i];
           }
       }

    The resulting klv output is different - I must be doing something wrong processing the packet. The frames are good and I’m viewing it in a qt label - so my ffmpeg setup is working on images but not the klv data. Any ideas ? THANKS