Recherche avancée

Médias (91)

Autres articles (72)

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

  • FFMPEG Custom Read function reads all the data

    20 décembre 2018, par Hafedh Haouala

    I’m trying to implement a custom read function for ffmpeg that will retrieve a buffer from local video ( from device in the future) and then deocde this buffer, etc..

    So, here’s my read function

    int IORead(void *opaque, uint8_t *buf, int buf_size)
    {
    FileReader* datrec = (FileReader*)opaque;
    int ret = datrec->Read(buf, buf_size);
    return ret;
    }

    As for the FileReader :

    class FileReader {
    protected:
     int fd;
    public:
     FileReader(const char *filename){ //, int buf_size){
        fd = open(filename, O_RDONLY);
     };

     ~FileReader() {
         close(fd);
     };

     int Read(uint8_t *buf, int buf_size){
       int len = read(fd, buf, buf_size);
       return len;
     };
    };

    and for the my execution :

    FileReader *receiver = new FileReader("/sdcard/clip.ts");

    AVFormatContext *avFormatContextPtr = NULL;
    this->iobuffer = (unsigned char*) av_malloc(4096 + FF_INPUT_BUFFER_PADDING_SIZE);
    avFormatContextPtr = avformat_alloc_context();
    avFormatContextPtr->pb = avio_alloc_context(this->iobuffer, 4096, 0, receiver, IORead, NULL, NULL);
    avFormatContextPtr->pb->seekable    = 0;

    int err = avformat_open_input(&avFormatContextPtr, "", NULL, NULL) ;
    if( err != 0)
    {...}
    // Decoding process
     {...}

    However, once the avformat_open_input() is called, the read function IORead is called and keeps reading the file clip.ts until it reaches its end and only then it exit and the decoding process is reached with no data to decode ( as all of it was consumed)

    I don’t know what is the problem especially that this code

    AVFormatContext *avFormatContextPtr = NULL;
    int err = avformat_open_input(&avFormatContextPtr, "/sdcard/clip.ts", NULL, NULL) ;

    isn’t blocking untill the end of the file is reached.

    Am I missing something ?
    I appreciate your help.

  • FFMPEG Custom Read function reads all the data

    15 juillet 2014, par Hafedh Haouala

    I’m trying to implement a custom read function for ffmpeg that will retrieve a buffer from local video ( from device in the future) and then deocde this buffer, etc..

    So, here’s my read function

    int IORead(void *opaque, uint8_t *buf, int buf_size)
    {
    FileReader* datrec = (FileReader*)opaque;
    int ret = datrec->Read(buf, buf_size);
    return ret;
    }

    As for the FileReader :

    class FileReader {
    protected:
     int fd;
    public:
     FileReader(const char *filename){ //, int buf_size){
         fd = open(filename, O_RDONLY);
         };

    ~FileReader() {
          close(fd);
        };

    int Read(uint8_t *buf, int buf_size){
      int len = read(fd, buf, buf_size);
      return len;
         };
    };

    and for the my execution :

    FileReader *receiver = new FileReader("/sdcard/clip.ts");

    AVFormatContext *avFormatContextPtr = NULL;
    this->iobuffer = (unsigned char*) av_malloc(4096 + FF_INPUT_BUFFER_PADDING_SIZE);
    avFormatContextPtr = avformat_alloc_context();
    avFormatContextPtr->pb = avio_alloc_context(this->iobuffer, 4096, 0, receiver, IORead, NULL, NULL);
    avFormatContextPtr->pb->seekable    = 0;

    int err = avformat_open_input(&avFormatContextPtr, "", NULL, NULL) ;
    if( err != 0)
    {...}
    // Decoding process
     {...}

    However, once the avformat_open_input() is called, the read function IORead is called and keeps reading the file clip.ts until it reaches its end and only then it exit and the decoding process is reached with no data to decode ( as all of it was consumed)

    I don’t know what is the problem especially that this code

    AVFormatContext *avFormatContextPtr = NULL;
    int err = avformat_open_input(&avFormatContextPtr, "/sdcard/clip.ts", NULL, NULL) ;

    isn’t blocking untill the end of the file is reached.

    Am I missing something ?
    I appreciate your help.

  • FFmpeg - create video from sub segment [duplicate]

    17 juillet 2018, par bFox

    This question is an exact duplicate of :

    I want to create clip from mp4 video by selecting sub segments of the video.
    e.g :

    test.mp4 is 50 second, and i want to create clip from segments
    [5..10] [20..30] [40..42]

    how can i do it at one command ?

    i’m using this command when i need one segment :

    ffmpeg -i test.mp4 -vcodec copy -acodec copy -ss 00:00:2 -t 00:00:10
    -sn 8sec.mp4

    thanks,