Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (96)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9769)

  • How to add suffix to duplicate filenames output by ffmpeg in Windows batch file ?

    27 septembre 2015, par Nick Hope

    I have written a script in Sony Vegas Pro that outputs an edit list of video files (E :\editlist.txt) of the following form, where the 2nd item is the start timecode and the 3rd item is the length :

    E:\folder\file1a.mp4 16.8835333 17.5175
    E:\folder\file2a.mp4 6.0393666 12.1454666
    E:\folder\file3a.mp4 0 3.5368667
    E:\folder\file3a.mp4 5.1344667 9.3033
    E:\folder\file3a.mp4 12.1224623 19.483756

    I have also cobbled together a Windows batch script that uses ffmpeg to trim those files and re-wrap them in a .mov container.

    for /F "tokens=1,2,3 delims= " %%F in (E:\editlist.txt) do ffmpeg.exe -ss "%%G" -i "%%F" -c copy -t "%%H" "%%~dF%%~pF%%~nF.mov"

    However because some files originate from the same source file (in this case, file3a.mp4), the trimmed files have duplicate names.

    I would like to create a script that detects duplicates and adds an incremental single-digit suffix to the output file names, before the file extension. In this case the 5 output files should be file1a.mov, file2a.mov, file3a.mov, file3a1.mov and file3a2.mov.

    I have had a go but I have no experience of writing Windows batch files, so the following effort fails and is probably very wrong, but hopefully it shows what I am trying to achieve (it was loosely based on an answer to this question) :

    for /F "tokens=1,2,3 delims= " %%F in (E:\editlist.txt)
       set counter=0
       if exist "%%~dF%%~pF%%~nF.mov" (
       set counter=%counter%+1
       do ffmpeg.exe -ss "%%G" -i "%%F" -c copy -t "%%H" "%%~dF%%~pF%%~nF%counter%.mov"
    ) else do ffmpeg.exe -ss "%%G" -i "%%F" -c copy -t "%%H" "%%~dF%%~pF%%~nF.mov"

    I would greatly appreciate it if someone could help me get this working. Thanks !

  • H264 decoding using ffmpeg

    18 mai 2019, par Kindermann

    I’m trying to decode a video stream with ffmpeg library, that’s how I do it basically :

    void video_decode(const char *filename)
    {
       AVCodec *codec;
       AVCodecContext *c= NULL;
       int frame_count=0;
       FILE *f;
       AVFrame *frame;
       uint8_t inbuf[INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
       AVPacket avpkt;
       av_init_packet(&avpkt);
       memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
       printf("Decoding video file...\n");
       /* find the h264 video decoder */
       codec = avcodec_find_decoder(AV_CODEC_ID_H264);
       c = avcodec_alloc_context3(codec);
       c->bit_rate = 400000;
       c->width = 1920;
       c->height = 1080;

       if (avcodec_open2(c, codec, NULL) < 0) {
           fprintf(stderr, "Could not open codec\n");
           exit(1);
       }
       frame = av_frame_alloc();
       for (;;) {
           avpkt.size = fread(inbuf, 1, INBUF_SIZE, f);        
       if (avpkt.size == 0)
               break;
           avpkt.data = inbuf;
           while(avpkt.size > 0){

           int len, got_frame;
               len = avcodec_decode_video2(c, frame, &got_frame, &avpkt);          
           if (len < 0) {
                   fprintf(stderr, "Errr while decding frame %d\n", frame_count);
                   exit (1);
               }
               if (got_frame) {
                   //Print out frame information..
           }
               if (avpkt.data) {
                   avpkt.size -= len;
                   avpkt.data += len;
               }
       }              
       }  
    }

    But I got the following outputs :

    Decoding video file...
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] no frame!
    Errr while decding frame 0

    Obviously the initiation of codec was incomplete. Do you have experience with h264 api ? Any help would be appreciated.

  • H264 decoding using ffmpeg

    14 juillet 2016, par Kindermann

    I’m trying to decode a video stream with ffmpeg library, that’s how I do it basically :

    void video_decode(const char *filename)
    {
       AVCodec *codec;
       AVCodecContext *c= NULL;
       int frame_count=0;
       FILE *f;
       AVFrame *frame;
       uint8_t inbuf[INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
       AVPacket avpkt;
       av_init_packet(&avpkt);
       memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
       printf("Decoding video file...\n");
       /* find the h264 video decoder */
       codec = avcodec_find_decoder(AV_CODEC_ID_H264);
       c = avcodec_alloc_context3(codec);
       c->bit_rate = 400000;
       c->width = 1920;
       c->height = 1080;

       if (avcodec_open2(c, codec, NULL) < 0) {
           fprintf(stderr, "Could not open codec\n");
           exit(1);
       }
       frame = av_frame_alloc();
       for (;;) {
           avpkt.size = fread(inbuf, 1, INBUF_SIZE, f);        
       if (avpkt.size == 0)
               break;
           avpkt.data = inbuf;
           while(avpkt.size > 0){

           int len, got_frame;
               len = avcodec_decode_video2(c, frame, &got_frame, &avpkt);          
           if (len < 0) {
                   fprintf(stderr, "Errr while decding frame %d\n", frame_count);
                   exit (1);
               }
               if (got_frame) {
                   //Print out frame information..
           }
               if (avpkt.data) {
                   avpkt.size -= len;
                   avpkt.data += len;
               }
       }              
       }  
    }

    But I got the following outputs :

    Decoding video file...
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] decode_slice_header error
    [h264 @ 0x303c040] no frame!
    Errr while decding frame 0

    Obviously the initiation of codec was incomplete. Do you have experience with h264 api ? Any help would be appreciated.