Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (78)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (8544)

  • where to put the watermark png file in this code ?

    15 août 2017, par asif

    this is a line from ffmpeg video converter php script ;

    $ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format."

    where :

    .$video_to_convert. = input file

    .$converted_vids.$name. = output file

    .$new_format. ; = file extention format

    now i want to add watermark.png file, if i put any where i got error conversion
    as i added the line logo.png -filter_complex 'overlay in video quality line, i got error

    Error ;

    ffmpeg version N-71954-gbc6f84f Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --prefix=/usr --enable-version3 --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-postproc --enable-nonfree --enable-pthreads --enable-x11grab --enable-libfaac --enable-libopenjpeg --enable-zlib --disable-doc
     libavutil      54. 23.101 / 54. 23.101
     libavcodec     56. 37.101 / 56. 37.101
     libavformat    56. 31.102 / 56. 31.102
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'uploaded/1502801111_21.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf56.31.102
     Duration: 00:02:27.32, start: 0.023220, bitrate: 635 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x320 [SAR 1:1 DAR 3:2], 476 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Please use -b:a or -b:v, -b is ambiguous
    Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_0

    This is index.php file scipt of conversion :

       v<?php include("templates/header.php");?>

    <div>



    &lt;?php

    require_once('languages/en.php');
    include ("includes/settings.php");
    include("includes/functions.php");
    include("includes/LIB_parse.php");
    include("classes/other.php");
    cron(); // to run cron job to delete all files
    if(isset($_POST['uploader_0_name']) or isset ($_GET['uploaded_name']))
       {
       if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    if(isset($_POST['uploader_0_name']))
       {
    list($_SESSION['original_name'], $ext) = explode('.',$_POST['uploader_0_name']);
    }else{
    list($_SESSION['original_name'], $ext) = explode('.',$_GET['uploaded_name']);
    $_SESSION['original_name']= return_between($_GET['uploaded_name'], '_', "$ext", 'EXCL') ;
    $_SESSION['original_name']= str_replace(".","",$_SESSION['original_name']);
    }
    if(isset($_POST['uploader_0_name']))
       {  
    $fullname=  $_POST['uploader_0_tmpname'];
    }else{
    $fullname=$_GET['uploaded_name'];
    }
    $ext= pathinfo($fullname, PATHINFO_EXTENSION);
    $_SESSION['name']=RemoveExtension($fullname);
    $store_dir="uploaded/";
    $_SESSION['converted_vids']=$converted_vids;
    $_SESSION['temp_dir']=$store_dir;
    // if those directotires don't exist - create them and give them read/write permissions
    if(!is_dir($store_dir)) mkdir($store_dir, 0777);
    if(!is_dir($converted_vids)) mkdir($converted_vids, 0777);
    $extension = substr($fullname, strrpos($fullname, "."));
    $extension = strtolower($extension);
    $video_to_convert=$store_dir.$_SESSION['name'];
    $_SESSION['video_to_convert']=$video_to_convert;
    $_SESSION['extension']=$extension;
    /*******************************
    check extenxions
    ***************************************************/    
                     if (!in_array($ext, $allowedExtensions))
                     {
                       echo '<div style="text-align:center"><strong>'.$ext."</strong><br /> is an invalid file type!<br />Supported files are:<br /><strong>";
                       foreach ($allowedExtensions as $value) { echo $value . "<br />"; }
                       echo "</strong><br />";
           echo "<a href="http://stackoverflow.com/feeds/tag/\&#034;index.php\&#034;">"."<img src="http://stackoverflow.com/feeds/tag/\&#034;images/red-back.png\&#034;" border="\&quot;0\&quot;" style='max-width: 300px; max-height: 300px' /></a></div>";
            include("templates/footer.php");
                          exit;
                     }


               ?>

               <center>
    <form action="index.php" method="post" target="_self">
                   <br />
                                   <fieldset>
                               <legend class="show_legend">Convert To</legend>

                   <div class="radio_buttons">
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/flv.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" class="blue_font" value="flv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp4.jpg" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp4" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/wmv.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="wmv" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/avi.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="avi" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/mp3.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="mp3" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/ogg.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="ogg" />
                   <img alt="" src="http://stackoverflow.com/feeds/tag/images/webm.png" class="format_button" style='max-width: 300px; max-height: 300px' />
                   <input type="radio" value="webm" />
                   </div>
                   </fieldset>
                       <fieldset>
                               <legend class="show_legend">Optional settings</legend>

                   <div class="radio_buttons" style="display:inline;padding:10px">
                   <br />Video quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="2000000">high</option>
                     <option value="logo.png -filter_complex 'overlay' ">medium</option>

                     <option value="-i seen.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,15\,25)' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Seen</option>
                     <option value="-i logo2.png \-filter_complex '[0:v][1:v]overlay=10:10:enable=between(t\,10\,20)'">HD Watermark</option>
                     <option value="-i logo.png -filter_complex 'overlay'">Watermark</option>
                     <option value="-vf drawtext='fontsize=20:y=h-line_h-10:x=(2*n)-tw:fontfile='op.ttf':text='DesiBombs.com'' -c:v libx264 -pix_fmt yuv420p -movflags faststart">Watermark</option>
                   </select>
                   </div>

                   <div class="radio_buttons" style="display:inline;padding:10px">Audio quality:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="44100">high</option>
                     <option value="22050">medium</option>
                     <option value="11025">low</option>
                   </select>




                   <div class="radio_buttons" style="display:inline;padding:10px">Video size:
                   <select class="radio_buttons" disabled="disabled">
                     <option value="320x240">320x240</option>
                     <option value="512x384" selected="selected">512x384</option>
                     <option value="640x360">640x360</option>
                     <option value="854x480">854x480</option>
                     <option value="1280x720">1280x720</option>
                   </select>
                   </div>

                   </div></fieldset>
                   <div class="radio_buttons">


                      <input type="submit" disabled="disabled" value="" style="display:none" />
                   </div>
     

     </form></center>
    &lt;?php
       }
       elseif(isset($_POST['type']))
           {


           $new_format=htmlspecialchars($_POST['type']); // read output format from form
           $name=$_SESSION['name'];
           //$_SESSION['extension'];
           $video_to_convert=$store_dir.$_SESSION['name'].$_SESSION['extension'];


           if (isset($_POST['size'])) {$size=$_POST['size'];}
           if (isset($_POST['quality'])) {$quality=$_POST['quality'];}
           if (isset($_POST['audio'])) {$audio=$_POST['audio'];}

           if($new_format=="webm" &amp;&amp; $audio=="11025"){$audio="22050";$new_format="webm"; }// for webm  and ogg audio can not be 11050
           if($new_format=="ogg" &amp;&amp; $audio=="11025"){$audio="22050"; $new_format="ogg"; }// for webm  and ogg audio can not be 11050

           $_SESSION['type']=$new_format;


           if($new_format=="flv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec flv -f flv -r 30 -b ".$quality."-ab 128000 -ar".$audio." -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


       if($new_format=="avi"){ $call=$ffmpeg." -i ".$video_to_convert."  -vcodec mjpeg -f avi -acodec libmp3lame -b ".$quality." -s ".$size." -r 30 -g 12 -qmin 3 -qmax 13 -ab 224 -ar ".$audio." -ac 2 ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp3"){ $call=$ffmpeg." -i ".$video_to_convert." -vn -acodec libmp3lame -ac 2 -ab 128000 -ar ".$audio."  ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="mp4"){ $call=$ffmpeg." -i ".$video_to_convert." -vf logo.png -vcodec mpeg4 -r 30 -b ".$quality." -acodec libmp3lame -ab 126000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="wmv"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec wmv1 -r 30 -b ".$quality." -acodec wmav2 -ab 128000 -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="ogg"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libtheora -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}

       if($new_format=="webm"){ $call=$ffmpeg." -i ".$video_to_convert." -vcodec libvpx  -r 30 -b ".$quality." -acodec libvorbis -ab 128000   -ar ".$audio." -ac 2 -s ".$size." ".$converted_vids.$name.".".$new_format." -y 2> log/".$name.".txt";}


    /* START CONVERTING The Video */

       require_once("includes/ffmpeg_cmd.php");

       $convert = (popen($convert_call, "r"));

       pclose($convert);
       flush();    
    // define sessions


       $_SESSION['dest_file']=$converted_vids.$name.".".$new_format;

        echo "<code class="echappe-js">&lt;script&gt;\n&quot;;<br />
        echo &quot;counter = 5\n&quot;;<br />
         echo &quot;var redirect = 0; \n&quot;;<br />
         echo &quot;$(document).ready(function()\n&quot;;<br />
     echo &quot;{\n&quot;;<br />
       echo &quot;var refreshId = setInterval(function() \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;if(redirect == 0) \n { \n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php');\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;else \n&quot;;<br />
        echo &quot;{\n&quot;;<br />
        echo &quot;$('#timeval').load('progress_bar.php?counter='+ counter--);\n&quot;;<br />
        echo &quot;}\n&quot;;<br />
        echo &quot;}, 1000);\n&quot;;<br />
       echo &quot;});\n&quot;;   <br />
       echo &quot;&lt;/script&gt;

    \n" ;

    //
    /************************* for debug *************************************
    echo "

    " ;
        print_r ($_SESSION) ;
        echo "
    " ;
        **********************************************************************************/
    

     ?>

    wait please

    < ?php

    else if(isset($_GET[’finished’]))

    echo "

    " ; if(!isset($_SESSION[’name’])) echo "please convert new video" ;include("templates/footer.php") ; ;exit ; $filepath=$converted_vids."./".$_SESSION[’name’].".".$_SESSION[’type’] ;

    echo " " ;

    require_once"video_duration.php" ;

    $_SESSION[’duration’]=$hours." :".$minutes." :".$seconds ;

    $vid_name=$_SESSION[’name’] ;
    $vid_src=$_SESSION[’extension’] ;
    $vid_new=$_SESSION[’type’] ;
    if (isset($_SESSION[’duration’])) $duration=$_SESSION[’duration’] ;else $duration="unknown" ;
    if(file_exists($converted_vids.$vid_name.".".$vid_new))

    $vid_size=get_size($converted_vids.$vid_name.".".$vid_new) ;
    else $vid_size=0 ;

     ?>

    your video information
    Video duration < ?php echo $hours." :".$minutes." :".$seconds ; ?>
    original video name < ?php if(isset($_SESSION[’original_name’]))echo $_SESSION[’original_name’] ; ?>
    video size < ?php echo $vid_size." MB
    " ; ?>
    source extension < ?php echo str_replace(".","","$vid_src") ; ?>
    new extension < ?php echo $vid_new ; ?>

    < ?php

    echo "

    " ;

    session_unset() ;

    else

     ?>

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
    // Convert divs to queue widgets when the DOM is ready<br />
    $(function() {<br />
       $(&quot;#uploader&quot;).pluploadQueue({<br />
           // General settings<br />
           runtimes : 'flash',<br />
           url : 'upload.php',<br />
           max_file_size : '&amp;lt;?php echo $max_file_size ;?&gt;mb',<br />
           chunk_size : '1mb',<br />
           unique_names : true,<br />
    <br />
           // Resize images on clientside if we can<br />
           resize : {width : 320, height : 240, quality : 90},<br />
    init : {<br />
                 FilesAdded: function(up, files) {<br />
                   plupload.each(files, function(file) {<br />
                     if (up.files.length &gt; 1) {<br />
                       up.removeFile(file);<br />
                     }<br />
                   });<br />
                   if (up.files.length &gt;= 1) {<br />
                     $('#pickfiles').hide('slow');<br />
                   }<br />
                 },<br />
                 FilesRemoved: function(up, files) {<br />
                   if (up.files.length &lt; 1) {<br />
                     $('#pickfiles').fadeIn('slow');<br />
                   }<br />
                 }<br />
               },<br />
               multi_selection: false,<br />
           // Specify what files to browse for<br />
           filters : [<br />
               {title : &quot;Video files&quot;, extensions : &quot;&amp;lt;?php foreach ($allowedExtensions as $value) { echo $value . &quot;,&quot;; }?&gt;&quot;}<br />
    <br />
           ],<br />
    <br />
           // Flash settings<br />
           flash_swf_url : 'js/plupload.flash.swf',<br />
    <br />
           // Silverlight settings<br />
           silverlight_xap_url : 'js/plupload.silverlight.xap'<br />
       });<br />
    <br />
       // Client side form validation<br />
       $('form').submit(function(e) {<br />
           var uploader = $('#uploader').pluploadQueue();<br />
    <br />
           // Files in queue upload them first<br />
           if (uploader.files.length &gt; 0) {<br />
               // When all files are uploaded submit form<br />
               uploader.bind('StateChanged', function() {<br />
                   if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {<br />
                       $('form')[0].submit();<br />
                   }<br />
               });<br />
    <br />
               uploader.start();<br />
           } else {<br />
               alert('You must queue at least one video.');<br />
           }<br />
    <br />
           return false;<br />
       });<br />
    });<br />
    &lt;/script&gt;

    You browser doesn’t have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.

    Maximum upload size < ?php echo $max_file_size ; ?> MB

    < ?php include("templates/info.php") ; ?>
    < ?php

    //End Body Area/

     ?>

  • Evolution #3964 : mise en forme minimum des formulaires

    25 mars 2018, par nico d_

    Je relance sur ce ticket, je suis totalement pour intégrer ces styles minimaux.
    Go ?

    A noter qu’il y a aussi des surcharges dans theme.css, qui passent par dessus, notamment sur fieldset (margin : 0).

    Après, sur le détail je ne suis pas fan du border-top sur le fieldset, peut être un souligné gris léger sous la legende serait plus discret :
    h3.legend { font-size: 140%; line-height: 135%; font-weight: bold; padding-bottom: 0.2em; border-bottom: 1px solid #CCCCCC;}
    Mais bon ça se discute :)

    Par contre, je découvre tout en bas de form.css :

    @media print 
      form  display : none ; 
    
    

    Ouate ze phoque ? O_o

  • Evolution #3964 : mise en forme minimum des formulaires

    5 juin 2018, par nico d_

    +1, fais toi plaisir ^^

    (idem pour les fieldsets et legend)

  • Boussole SPIP

    SPIP.net-La documentation officielle et téléchargement de (...) SPIP Code-La documentation du code de SPIP Programmer SPIP-La documentation pour développer avec (...) Traduire SPIP-Espace de traduction de SPIP et de ses (...) Plugins SPIP-L'annuaire des plugins SPIP SPIP-Contrib-L'espace des contributions à SPIP Forge SPIP-L'espace de développement de SPIP et de ses (...) Discuter sur SPIP-Les nouveaux forums de la communauté (...) SPIP Party-L'agenda des apéros et autres rencontres (...) Médias SPIP-La médiathèque de SPIP SPIP Syntaxe-Tester l'édition de texte dans SPIP