Recherche avancée

Médias (91)

Autres articles (45)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8146)

  • Revision 44276 : Si pas de notes et que le nombre de notes n’est pas caché volontairement, ...

    7 février 2011, par kent1@… — Log

    Si pas de notes et que le nombre de notes n’est pas caché volontairement, on cache ce &lt ;p&gt ; pouvant être disgracieux en js à l’activation de annotate en lui ajoutant une class spécifique. On enlève cette class et réaffiche ce p à l’ajout d’une note.

  • Looking to play back non-encoded video upload then export gif from selection point via FFMPEG

    10 novembre 2019, par Christopher Neil

    We’ve been trying to crack this code all week, reaching out to everyone to see if you have any solutions ?

    1. We want the user to upload a video and in the next step he will select a small 5 second loop of the video which will be made as a gif.
    2. Old developer was able to do this by splicing the video at 10 seconds instead of 5 but not re-encoding it meant that it would sometimes be beyond 12 seconds and in some cases less than 7.
    3. We changed the code to force keyframes with re encoding so that it splices the video at exactly 5 seconds to show the loop.
    4. These slices are shown to the user using html5 video player.
    5. Upon selection of the loop that sliced video is converted to gif.

    Everything is working in the vice order. The issue is when the user uploads a large sized and length video this slicing and re-encoding takes forever and that cause the user to feel the site is not working properly.

    What we want is very simple :

    1. Show 5 second portion of the video on loop.
    2. If user wants to select another loop he/she clicks the next button and is taken to the next 5 second loop which would be either at 25% of the video or some other
    3. On selection of that portion it converts it into gif.
  • Decoding m4a and dumping PCM data gives back noise

    7 décembre 2013, par lynnard

    I'm using the code below (modified from the examples given in libavcodec) to decode audio files

    int main(int argc, char **argv)
    {
       av_register_all();
       avcodec_register_all();

       char *filename = argv[1];
       char *outfilename = argv[2];

       FILE *outfile;

       AVCodec *codec;
       AVCodecContext *c= NULL;
       AVPacket avpkt;
       AVFrame *frame = av_frame_alloc();

       printf("Decode audio file %s to %s\n", filename, outfilename);

       outfile = fopen(outfilename, "wb");
       if (!outfile) {
           fprintf(stderr, "Could not write to %s\n", outfilename);
           av_free(c);
           exit(1);
       }

       AVFormatContext *format_context = NULL;
       avformat_open_input(&format_context, filename, NULL, NULL);
       printf("Opened format input\n");

       int find_result = avformat_find_stream_info(format_context, NULL);
       if (find_result < 0) {
           fprintf(stderr, "Cannot find stream info\n");
           avformat_close_input(&format_context);
           exit(-1);
       }

       int audio_stream_idx = av_find_best_stream(format_context, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);

       if (audio_stream_idx < 0) {
           fprintf(stderr,"Couldn't find stream information\n");
           exit(-1);
       }

       // Get a pointer to the codec context for the audio stream
       c = format_context->streams[audio_stream_idx]->codec;
       av_opt_set_int(c, "refcounted_frames", 1, 0);

       if (avcodec_open2(c, codec, NULL) < 0) {
           fprintf(stderr, "Could not open codec\n");
           exit(-1);
       }

       // read the audio frames
       int ret, got_frame;
       while (1) {
           if ((ret = av_read_frame(format_context, &avpkt)) < 0)
               break;
           if (avpkt.stream_index == audio_stream_idx) {
               avcodec_get_frame_defaults(frame);
               got_frame = 0;
               ret = avcodec_decode_audio4(c, frame, &got_frame, &avpkt);
               if (ret < 0) {
                   fprintf(stderr, "Error decoding audio\n");
                   continue;
               }

               if (got_frame) {
                   // write to disk
                   fwrite(frame->extended_data[0], 1, frame->linesize[0], outfile);
               }
           }
           av_free_packet(&avpkt);
       }

       fclose(outfile);

       printf("Finished\n");
       if (c)
           avcodec_close(c);
       avformat_close_input(&format_context);
       av_frame_free(&frame);
    }

    I tried .mp3 and .m4a files ; .mp3 files work fine but not for .m4a files. Any help ?