Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (54)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (11680)

  • Flumotion Wins Streaming Media Europe Awards for WebM Streaming

    20 octobre 2010, par noreply@blogger.com (John Luther)

    Congratulations to our friends at Flumotion ! They picked up two Reader’s Choice Awards at the Streaming Media Europe 2010 conference in London. The company took prizes for Best Live Webcast of 2010 (for their streaming of GUADEC 2010 in WebM), and Best Webcast Platform. In addition, the Flumotion WebM Live Streaming solution was nominated for Best Streaming Innovation of 2010.

    You can read more about the awards in the Streaming Media announcement.

  • building a voice recorder using html5 and javascript

    16 juillet 2014, par lama

    I want to build a voice recorder using HTML5 same as one found in gitHub JSSoundecorder, but what I want is for the user to be able to choose the file format before recording the voice.I can do this using ffmpeg. In other words the user must be able to select the audio format by check box (mp3,wma,pcm) and in the background code, the .wav file usually created by the program instead of displaying it, it should be converted by the format selected then displayed in the new format.this is the ffmpeg code we can use ,but I don’t know how to get the .wav audio file to convert it and show it.please if someone have ideas,or if can find demos I have been looking for weeks.this is the ffmpeg code :

      var fileName;
      var fileBuffer;

      function timeToSeconds(time) {
         var parts = time.split(":");
         return parseFloat(parts[0]) * 60 * 60 + parseFloat(parts[1]) * 60 + parseFloat(parts[2]) + parseFloat("0." + parts[3]);
     }

     // create ffmpeg worker
     function getFFMPEGWorker() {
         // regexps for extracting time from ffmpeg logs
         var durationRegexp = /Duration: (.*?), /
         var timeRegexp = /time=(.*?) /;
         var duration;

         var ffmpegWorker = new Worker('worker.js');
         var durationLine;
         ffmpegWorker.addEventListener('message', function(event) {
             var message = event.data;
             console.log(message.type);
             if (message.type === "ready" && window.File && window.FileList && window.FileReader) {
                 // script loaded, hide loader
                 $('#loading').hide();
             } else if (message.type == "stdout") {
                 console.log(message.data);
             } else if (message.type == "stderr") {
                 console.log(message.data);
                 // try to extract duration
                 if (durationRegexp.exec(message.data)) {
                     duration = timeToSeconds(durationRegexp.exec(message.data)[1]);
                 }
                 // try to extract time
                 if (timeRegexp.exec(message.data)) {
                     var time = timeToSeconds(timeRegexp.exec(message.data)[1]);
                     if (duration) {
                         $("#progress").text("Progress: " + Math.floor(time / duration * 100) + "%");
                         $("#progress").show();
                     }
                 }
             } else if (message.type == "done") {
                 var code = message.data.code;

                console.log(message.data);
                 var outFileNames = Object.keys(message.data.outputFiles);

                 console.log(outFileNames);
                 if (code == 0 && outFileNames.length) {
                     var outFileName = outFileNames[0];

                     var outFileBuffer = message.data.outputFiles[outFileName];

                     var src = window.URL.createObjectURL(new Blob([outFileBuffer]));

                     $("#downloadLink").attr('href', src);
                     $("#download").show();
                 } else {
                     $("#error").show();
                 }
                 $("#converting").hide();
                 $("#progress").hide();
             }
         }, false);
         return ffmpegWorker;
      }

      // create ffmpeg worker
      var ffmpegWorker = getFFMPEGWorker();
      var ffmpegRunning = false;

      $('#convert').click(function() {
         // terminate existing worker
         if (ffmpegRunning) {
             ffmpegWorker.terminate();
             ffmpegWorker = getFFMPEGWorker();
         }
         ffmpegRunning = true;

         // display converting animation
         $("#converting").show();
         $("#error").hide();

         // hide download div
         $("#download").hide();

         // change download file name
         var fileNameExt = fileName.substr(fileName.lastIndexOf('.') + 1);

         var outFileName = fileName.substr(0, fileName.lastIndexOf('.')) + "." + getOutFormat();

           $("#downloadLink").attr("download", outFileName);
         $("#downloadLink").text(outFileName);

         var arguments = [];
         arguments.push("-i");
         arguments.push(fileName);

         arguments.push("-b:a");
         arguments.push(getBitrate());

         switch (getOutFormat()) {
             case "mp3":
                 arguments.push("-acodec");
                 arguments.push("libmp3lame");
                 arguments.push("out.mp3");
                 break;

             case "wma":
                 arguments.push("-acodec");
                 arguments.push("wmav1");
                 arguments.push("out.asf");
                 break;

             case "pcm":
                 arguments.push("-f");
                 arguments.push("s16le");
                 arguments.push("-acodec");
                 arguments.push("pcm_s16le");
                 arguments.push("out.pcm");
         }

         ffmpegWorker.postMessage({

             type: "command",
             arguments: arguments,
             files: [
                 {
                     "name": fileName,
                     "buffer": fileBuffer
                 }
             ]

         });
     });

     function getOutFormat() {
         return $('input[name=format]:checked').val();
     }

     function getBitrate() {
         return $('input[name=bitrate]:checked').val();
     }

     // disable conversion at start
     $('#convert').attr('disabled', 'true');

     function readInputFile(file) {
         // disable conversion for the time of file loading
         $('#convert').attr('disabled', 'true');

         // load file content
         var reader = new FileReader();
         reader.onload = function(e) {
             $('#convert').removeAttr('disabled');
             fileName = file.name;
           console.log(fileName);
             fileBuffer = e.target.result;
         }
         reader.readAsArrayBuffer(file);

     }

     // reset file selector at start
     function resetInputFile() {
         $("#inFile").wrap('<form>').closest('form').get(0).reset();
         $("#inFile").unwrap();
     }
     resetInputFile();

     function handleFileSelect(event) {
         var files = event.target.files; // FileList object
     console.log(files);
         // files is a FileList of File objects. display first file name
         file = files[0];
         console.log(file);
         if (file) {
             $("#drop").text("Drop file here");
             readInputFile(file);


         }
     }


     // setup input file listeners

     document.getElementById('inFile').addEventListener('change', handleFileSelect, false);
    </form>
  • While using skvideo.io.FFmpegReader and skvideo.io.FFmpegWriter for video throughput the input video and output video length differ

    28 juin 2024, par Kaesebrotus Anonymous

    I have an h264 encoded mp4 video of about 27.5 minutes length and I am trying to create a copy of the video which excludes the first 5 frames. I am using scikit-video and ffmpeg in python for this purpose. I do not have a GPU, so I am using libx264 codec for the output video.

    &#xA;

    It generally works and the output video excludes the first 5 frames. Somehow, the output video results in a length of about 22 minutes. When visually checking the videos, the shorter video does seem slightly faster and I can identify the same frames at different timestamps. In windows explorer, when clicking properties and then details, both videos' frame rates show as 20.00 fps.

    &#xA;

    So, my goal is to have both videos of the same length, except for the loss of the first 5 frames which should result in a duration difference of 0.25 seconds, and use the same (almost same) codec and not lose quality.

    &#xA;

    Can anyone explain why this apparent loss of frames is happening ?

    &#xA;

    Thank you for your interest in helping me, please find the details below.

    &#xA;

    Here is a minimal example of what I have done.

    &#xA;

    framerate = str(20)&#xA;reader = skvideo.io.FFmpegReader(inputvideo.mp4, inputdict={&#x27;-r&#x27;: framerate})&#xA;writer = skvideo.io.FFmpegWriter(outputvideo.mp4, outputdict={&#x27;-vcodec&#x27;: &#x27;libx264&#x27;, &#x27;-r&#x27;: framerate})&#xA;&#xA;for idx,frame in enumerate(reader.nextFrame()):&#xA;    if idx &lt; 5:&#xA;        continue&#xA;    writer.writeFrame(frame)&#xA;&#xA;reader.close()&#xA;writer.close()&#xA;

    &#xA;

    When I read the output video again using FFmpegReader and check the .probeInfo, I can see that the output video has less frames in total. I have also managed to replicate the same problem for shorter videos (now not excluding the first 5 frames, but only throughputting a video), e.g. 10 seconds input turns to 8 seconds output with less frames. I have also tried playing around with further parameters of the outputdict, e.g. -pix_fmt, -b. I have tried to set -time_base in the output dict to the same value as in the inputdict, but that did not seem to have the desired effect. I am not sure if the name of the parameter is right.

    &#xA;

    For additional info, I am providing the .probeInfo of the input video, of which I used 10 seconds, and the .probeInfo of the 8 second output video it produced.

    &#xA;

    **input video** .probeInfo:&#xA;input dict&#xA;&#xA;{&#x27;video&#x27;: OrderedDict([(&#x27;@index&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@codec_name&#x27;, &#x27;h264&#x27;),&#xA;              (&#x27;@codec_long_name&#x27;,&#xA;               &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;),&#xA;              (&#x27;@profile&#x27;, &#x27;High 4:4:4 Predictive&#x27;),&#xA;              (&#x27;@codec_type&#x27;, &#x27;video&#x27;),&#xA;              (&#x27;@codec_tag_string&#x27;, &#x27;avc1&#x27;),&#xA;              (&#x27;@codec_tag&#x27;, &#x27;0x31637661&#x27;),&#xA;              (&#x27;@width&#x27;, &#x27;4096&#x27;),&#xA;              (&#x27;@height&#x27;, &#x27;3000&#x27;),&#xA;              (&#x27;@coded_width&#x27;, &#x27;4096&#x27;),&#xA;              (&#x27;@coded_height&#x27;, &#x27;3000&#x27;),&#xA;              (&#x27;@closed_captions&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@film_grain&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@has_b_frames&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@sample_aspect_ratio&#x27;, &#x27;1:1&#x27;),&#xA;              (&#x27;@display_aspect_ratio&#x27;, &#x27;512:375&#x27;),&#xA;              (&#x27;@pix_fmt&#x27;, &#x27;yuv420p&#x27;),&#xA;              (&#x27;@level&#x27;, &#x27;60&#x27;),&#xA;              (&#x27;@chroma_location&#x27;, &#x27;left&#x27;),&#xA;              (&#x27;@field_order&#x27;, &#x27;progressive&#x27;),&#xA;              (&#x27;@refs&#x27;, &#x27;1&#x27;),&#xA;              (&#x27;@is_avc&#x27;, &#x27;true&#x27;),&#xA;              (&#x27;@nal_length_size&#x27;, &#x27;4&#x27;),&#xA;              (&#x27;@id&#x27;, &#x27;0x1&#x27;),&#xA;              (&#x27;@r_frame_rate&#x27;, &#x27;20/1&#x27;),&#xA;              (&#x27;@avg_frame_rate&#x27;, &#x27;20/1&#x27;),&#xA;              (&#x27;@time_base&#x27;, &#x27;1/1200000&#x27;),&#xA;              (&#x27;@start_pts&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@start_time&#x27;, &#x27;0.000000&#x27;),&#xA;              (&#x27;@duration_ts&#x27;, &#x27;1984740000&#x27;),&#xA;              (&#x27;@duration&#x27;, &#x27;1653.950000&#x27;),&#xA;              (&#x27;@bit_rate&#x27;, &#x27;3788971&#x27;),&#xA;              (&#x27;@bits_per_raw_sample&#x27;, &#x27;8&#x27;),&#xA;              (&#x27;@nb_frames&#x27;, &#x27;33079&#x27;),&#xA;              (&#x27;@extradata_size&#x27;, &#x27;43&#x27;),&#xA;              (&#x27;disposition&#x27;,&#xA;               OrderedDict([(&#x27;@default&#x27;, &#x27;1&#x27;),&#xA;                            (&#x27;@dub&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@original&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@comment&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@lyrics&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@karaoke&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@forced&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@hearing_impaired&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@visual_impaired&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@clean_effects&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@attached_pic&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@timed_thumbnails&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@non_diegetic&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@captions&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@descriptions&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@metadata&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@dependent&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@still_image&#x27;, &#x27;0&#x27;)])),&#xA;              (&#x27;tags&#x27;,&#xA;               OrderedDict([(&#x27;tag&#x27;,&#xA;                             [OrderedDict([(&#x27;@key&#x27;, &#x27;language&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;und&#x27;)]),&#xA;                              OrderedDict([(&#x27;@key&#x27;, &#x27;handler_name&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;VideoHandler&#x27;)]),&#xA;                              OrderedDict([(&#x27;@key&#x27;, &#x27;vendor_id&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;[0][0][0][0]&#x27;)])])]))])}&#xA;&#xA;**output video** .probeInfo:&#xA;{&#x27;video&#x27;: OrderedDict([(&#x27;@index&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@codec_name&#x27;, &#x27;h264&#x27;),&#xA;              (&#x27;@codec_long_name&#x27;,&#xA;               &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;),&#xA;              (&#x27;@profile&#x27;, &#x27;High&#x27;),&#xA;              (&#x27;@codec_type&#x27;, &#x27;video&#x27;),&#xA;              (&#x27;@codec_tag_string&#x27;, &#x27;avc1&#x27;),&#xA;              (&#x27;@codec_tag&#x27;, &#x27;0x31637661&#x27;),&#xA;              (&#x27;@width&#x27;, &#x27;4096&#x27;),&#xA;              (&#x27;@height&#x27;, &#x27;3000&#x27;),&#xA;              (&#x27;@coded_width&#x27;, &#x27;4096&#x27;),&#xA;              (&#x27;@coded_height&#x27;, &#x27;3000&#x27;),&#xA;              (&#x27;@closed_captions&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@film_grain&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@has_b_frames&#x27;, &#x27;2&#x27;),&#xA;              (&#x27;@pix_fmt&#x27;, &#x27;yuv420p&#x27;),&#xA;              (&#x27;@level&#x27;, &#x27;60&#x27;),&#xA;              (&#x27;@chroma_location&#x27;, &#x27;left&#x27;),&#xA;              (&#x27;@field_order&#x27;, &#x27;progressive&#x27;),&#xA;              (&#x27;@refs&#x27;, &#x27;1&#x27;),&#xA;              (&#x27;@is_avc&#x27;, &#x27;true&#x27;),&#xA;              (&#x27;@nal_length_size&#x27;, &#x27;4&#x27;),&#xA;              (&#x27;@id&#x27;, &#x27;0x1&#x27;),&#xA;              (&#x27;@r_frame_rate&#x27;, &#x27;20/1&#x27;),&#xA;              (&#x27;@avg_frame_rate&#x27;, &#x27;20/1&#x27;),&#xA;              (&#x27;@time_base&#x27;, &#x27;1/10240&#x27;),&#xA;              (&#x27;@start_pts&#x27;, &#x27;0&#x27;),&#xA;              (&#x27;@start_time&#x27;, &#x27;0.000000&#x27;),&#xA;              (&#x27;@duration_ts&#x27;, &#x27;82944&#x27;),&#xA;              (&#x27;@duration&#x27;, &#x27;8.100000&#x27;),&#xA;              (&#x27;@bit_rate&#x27;, &#x27;3444755&#x27;),&#xA;              (&#x27;@bits_per_raw_sample&#x27;, &#x27;8&#x27;),&#xA;              (&#x27;@nb_frames&#x27;, &#x27;162&#x27;),&#xA;              (&#x27;@extradata_size&#x27;, &#x27;47&#x27;),&#xA;              (&#x27;disposition&#x27;,&#xA;               OrderedDict([(&#x27;@default&#x27;, &#x27;1&#x27;),&#xA;                            (&#x27;@dub&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@original&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@comment&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@lyrics&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@karaoke&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@forced&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@hearing_impaired&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@visual_impaired&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@clean_effects&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@attached_pic&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@timed_thumbnails&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@non_diegetic&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@captions&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@descriptions&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@metadata&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@dependent&#x27;, &#x27;0&#x27;),&#xA;                            (&#x27;@still_image&#x27;, &#x27;0&#x27;)])),&#xA;              (&#x27;tags&#x27;,&#xA;               OrderedDict([(&#x27;tag&#x27;,&#xA;                             [OrderedDict([(&#x27;@key&#x27;, &#x27;language&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;und&#x27;)]),&#xA;                              OrderedDict([(&#x27;@key&#x27;, &#x27;handler_name&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;VideoHandler&#x27;)]),&#xA;                              OrderedDict([(&#x27;@key&#x27;, &#x27;vendor_id&#x27;),&#xA;                                           (&#x27;@value&#x27;, &#x27;[0][0][0][0]&#x27;)]),&#xA;                              OrderedDict([(&#x27;@key&#x27;, &#x27;encoder&#x27;),&#xA;                                           (&#x27;@value&#x27;,&#xA;                                            &#x27;Lavc61.8.100 libx264&#x27;)])])]))])}&#xA;

    &#xA;

    I used 10 seconds by adding this to the bottom of the loop shown above :

    &#xA;

        if idx >= 200:&#xA;        break&#xA;

    &#xA;