Recherche avancée

Médias (91)

Autres articles (32)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (4539)

  • Slicing an AVI file

    7 novembre 2014, par Peter Lur

    I am trying to upload only a certain part of an AVI file on the server without having to upload the whole file first.

    If I set the slice to the beginning (byte : 0), I can read the resulting file no problem even if I slice it in any size. However if the slice start anywhere but not at byte 0, the file become unreadable. I guess this has something to do with the avi header/index being messed up. I was wondering maybe I could use ffmpeg to move the header or something ?

    HTML Source

       
           
           <code class="echappe-js">&lt;script type=&quot;text/javascript&quot;&gt;<br />
    <br />
               window.BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder;<br />
    <br />
               function sendRequest() {<br />
                   var blob = document.getElementById('fileToUpload').files[0];<br />
    <br />
    <br />
                   //Slicing parameters<br />
    <br />
    <br />
                   //#1: Starting at byte:0 = WORKING WELL<br />
                   var start = 0;<br />
                   var end = 1048576;  // 1MB chunk sizes.<br />
    <br />
    <br />
                   //#2: Slicing the video file somewhere else (FAIL)<br />
    <br />
                   /*<br />
                   var start = 1048576*3;<br />
                   var end = 1048576*4;<br />
                   */<br />
    <br />
    <br />
                   var chunk = blob.slice(start, end, 'video/avi');<br />
                   uploadFile(chunk);<br />
    <br />
               }<br />
    <br />
               function fileSelected() {<br />
                   var file = document.getElementById('fileToUpload').files[0];<br />
                   if (file) {<br />
                       var fileSize = 0;<br />
                       if (file.size &gt; 1024 * 1024)<br />
                           fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';<br />
                       else<br />
                           fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';<br />
    <br />
                       document.getElementById('fileName').innerHTML = 'Name: ' + file.name;<br />
                       document.getElementById('fileSize').innerHTML = 'Size: ' + fileSize;<br />
                       document.getElementById('fileType').innerHTML = 'Type: ' + file.type;<br />
                   }<br />
               }<br />
    <br />
               function uploadFile(blobFile) {<br />
                   //var file = document.getElementById('fileToUpload').files[0];  <br />
                   var fd = new FormData();<br />
                   fd.append(&quot;fileToUpload&quot;, blobFile);<br />
    <br />
                   var xhr = new XMLHttpRequest();<br />
                   xhr.upload.addEventListener(&quot;progress&quot;, uploadProgress, false);<br />
                   xhr.addEventListener(&quot;load&quot;, uploadComplete, false);<br />
                   xhr.addEventListener(&quot;error&quot;, uploadFailed, false);<br />
                   xhr.addEventListener(&quot;abort&quot;, uploadCanceled, false);<br />
                   xhr.open(&quot;POST&quot;, &quot;upload.php&quot;);<br />
                   xhr.onload = function(e) {<br />
                     //alert(&quot;loaded!&quot;);<br />
                     };<br />
    <br />
                   xhr.send(fd);<br />
                   //alert(&quot;oen over&quot;);<br />
               }<br />
    <br />
               function uploadProgress(evt) {<br />
                   if (evt.lengthComputable) {<br />
                       var percentComplete = Math.round(evt.loaded * 100 / evt.total);<br />
                       document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%';<br />
                   }<br />
                   else {<br />
                       document.getElementById('progressNumber').innerHTML = 'unable to compute';<br />
                   }<br />
               }<br />
    <br />
               function uploadComplete(evt) {<br />
                   /* This event is raised when the server send back a response */<br />
                   //alert(evt.target.responseText);<br />
               }<br />
    <br />
               function uploadFailed(evt) {<br />
                   alert(&quot;There was an error attempting to upload the file.&quot;);<br />
               }<br />
    <br />
               function uploadCanceled(evt) {<br />
                   xhr.abort();<br />
                   xhr = null;<br />
                   //alert(&quot;The upload has been canceled by the user or the browser dropped the connection.&quot;);<br />
               }<br />
           &lt;/script&gt;

    PHP Source (upload.php)

    &lt;?php

    $tmp_name = $_FILES['fileToUpload']['tmp_name'];
    $size = $_FILES['fileToUpload']['size'];
    $name = $_FILES['fileToUpload']['name'];

    $target_file = basename($name);

    $complete = "complete.avi";
    $com = fopen($complete, "ab");

    // Open temp file
    $out = fopen($target_file, "wb");

    if ( $out ) {
       // Read binary input stream and append it to temp file
       $in = fopen($tmp_name, "rb");
       if ( $in ) {
           while ( $buff = fread( $in, 1048576 ) ) {
               fwrite($out, $buff);
               fwrite($com, $buff);
           }  
       }
       fclose($in);
       fclose($out);
    }
    fclose($com);

    ?>
  • Create video Thumbnail using Node js Error

    15 juillet 2017, par Andrea

    I want to create a video thubmbnail through fluent-ffmpeg library, the problems are that I don´t know if I need to create a folder to store the images, and how and where to create it. Also Im getting this error ffmpeg stdout: undefined, the complete code below :

    ffmpeg("http://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv")
                       .on('filenames', function(filenames) {
                           console.log('Will generate ' + filenames.join(', ') + ' into tempfiles.')
                       })
                       .on('end', function() {
                           console.log('1 Screen shot successfully taken');

                       })
                       .on('error', function(err, stdout, stderr) {
                           console.log("ffmpeg stdout:\n" + stdout);
                           console.log("ffmpeg stderr:\n" + stderr);
                       })
                       .screenshots({
                           count: 1,
                           filename: "file_name",
                           size: '240x240',
                       });

    also how can I get the byte[] from that screenshot, so I can use it later in my code ?

  • Play RTP stream in android

    28 mai 2014, par AndroidOptimist

    I know this question is asked several times, but still i didn’t find complete answer for this.

    I would like to play RTP streams in android. From my search i understand that android does not support playing RTP stram and using ffmpeg i can play RTP videos. So, i browsed for good ffmpeg tutorial for playing RTP videos but still i didn’t find anything relevant to my search. I tried like

    ffmpeg play

    rtp using ffmpeg

    and so on.

    but still i don’t know how t play. I googled but couldn’t find. Can anyone please tell me

    1) how to play rtp streamed videos in android using ffmpeg.

    2) please suggest me some good examples or tutorials for the same.

    Thanks in advance.