Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (17)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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 (3976)

  • Why I became a HTML5 co-editor

    15 août 2012, par silvia

    A few weeks ago, I had the honor to be appointed as part of the editorial team of the W3C HTML5 specification.

    Since Ian Hickson had recently decided to focus solely on editing the WHATWG HTML living standard specification, the W3C started looking for other editors to take the existing HTML5 specification to REC level. REC level is what other standards organizations call a “ratified standard”.

    But what does REC level really mean for HTML ?

    In my probably somewhat subjective view, recommendation level means that a snapshot is taken of the continuously evolving HTML spec, which has a comprehensive feature set, that is implemented in a cross-browser interoperable way, has a complete test set for the features, and has received wide review. The latter implies that other groups in the W3C have had a chance to look at the specification and make sure it satisfies their basic requirements, which include e.g. applicability to all users (accessibility, internationalization), platforms, and devices (mobile, TV).

    Basically it means that we stop for a “moment”, take a deep breath, polish the feature set that we’ve been working on this far, and make sure we all agree on it, before we get back to changing the world with cool new stuff. In a software project we would call it a release branch with feature freeze.

    Now, as productive as that may sound for software – it’s not actually that exciting for a specification. Firstly, the most exciting things happen when writing new features. Secondly, development of browsers doesn’t just magically stop to get the release (REC) happening. And lastly, if we’ve done our specification work well, there should be only little work to do. Basically, it’s the unthankful work of tidying up that we’re looking at here. :-)

    So, why am I doing it ? I am not doing this for money – I’m currently part-time contracting to Google’s accessibility team working on video accessibility and this editor work is not covered by my contract. It wasn’t possible to reconcile polishing work on a specification with the goals of my contract, which include pushing new accessibility features forward. Therefore, when invited, I decided to offer my spare time to the W3C.

    I’m giving this time under the condition that I’d only be looking at accessibility and video related sections. This is where my interest and expertise lie, and where I’m passionate to get things right. I want to make sure that we create accessibility features that will be implemented and that we polish existing video features. I want to make sure we don’t digress from implementations which continue to get updated and may follow the WHATWG spec or HTML.next or other needs.

    I am not yet completely sure what the editorship will entail. Will we look at tests, too ? Will we get involved in HTML.next ? This far we’ve been preparing for our work by setting up adequate version control repositories, building a spec creation process, discussing how to bridge to the WHATWG commits, and analysing the long list of bugs to see how to cope with them. There’s plenty of actual text editing work ahead and the team is shaping up well ! I look forward to the new experiences.

  • Anomalie #3815 (Nouveau) : sql_updateq qui ne fait pas de jointure

    10 août 2016, par Ybbet SPIP

    Bonjour,

    Suite à des tests, je remarque que sql_updateq n’applique pas de jointures (explicites) sur les SET.

    Un exemple de comparaison, voici une requête faite avec sql_allfetsel :

    1. <span class="CodeRay">sql_allfetsel(<span class="string"><span class="delimiter">'</span><span class="content">mots.id_mot, mots.id_groupe,mots.titre,groupes.titre as type</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">spip_mots as mots, spip_groupes_mots as groupes</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">mots.id_groupe=groupes.id_groupe</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="predefined-constant">false</span>);
    2. </span>

    Télécharger


    Lancera la requête SQL :

    1. <span class="CodeRay"><span class="class">SELECT</span> mots.id_mot, mots.id_groupe,mots.titre,groupes.titre <span class="keyword">as</span> TYPE
    2. <span class="keyword">FROM</span> spip_mots <span class="keyword">as</span> mots, spip_groupes_mots <span class="keyword">as</span> groupes
    3. <span class="keyword">WHERE</span> mots.id_groupe=groupes.id_groupe
    4. </span>

    Télécharger

    Tandis que sql_updateq :

    1. <span class="CodeRay">sql_updateq(<span class="string"><span class="delimiter">'</span><span class="content">spip_mots as mots, spip_groupes_mots as groupes</span><span class="delimiter">'</span></span>, <span class="predefined">array</span>(<span class="string"><span class="delimiter">'</span><span class="content">mots.type</span><span class="delimiter">'</span></span> => <span class="string"><span class="delimiter">'</span><span class="content">groupes.titre</span><span class="delimiter">'</span></span>), <span class="string"><span class="delimiter">"</span><span class="content">mots.id_groupe=groupes.id_groupe</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="predefined-constant">false</span>);
    2. </span>

    Télécharger


    Lancera la requête SQL :

    1. <span class="CodeRay"><span class="class">UPDATE</span> spip_mots <span class="keyword">as</span> mots, spip_groupes_mots <span class="keyword">as</span> groupes
    2. <span class="keyword">WHERE</span> mots.id_groupe=groupes.id_groupe
    3. </span>

    Télécharger

    Ce qui forcément crée une erreur SQL car il n’y a pas de SET.
    La requête attendue serait celle-ci :

    UPDATE spip_mots as mots, spip_groupes_mots as groupes
    SET mots.type=groupes.titre
    WHERE mots.id_groupe=groupes.id_groupe

    Soit je n’utilise pas correctement cette fonction, soit elle a du mal à interpréter les expressions du SET.

    Qu’en pensez-vous ?

  • FFMPEG (2.5.7 ) Progress Bar from PHP

    6 mars 2016, par kunal

    i want to have the Progress bar of FFmpeg encoding.This is the Code which i am using to get the percentage value of encoding Process.

    &lt;?php
    $content = @file_get_contents("with-logo/output.txt");
    //echo $content;
    if($content) {
       preg_match("/Duration: (.*?), start:/", $content, $matches);

       $rawDuration = $matches[1];

       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       //echo $duration;
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;

       //get the time in the file that is already encoded
       preg_match_all("/time=(.*?) bitrate/", $content, $matches);

       $rawTime = array_pop($matches);

       //this is needed if there is more than one match
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}

       //rawTime is in 00:00:00.00 format. This converts it to seconds.
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;

       //calculate the progress
       $progress = round(($time/$duration) * 100);

       echo "Duration: " . $duration . "<br />";
       echo "Current Time: " . $time . "<br />";
       echo "Progress: " . $progress . "%";
    }
    ?>

    here is relevant log line form my FFMPEG Log files for Better Understanding.

    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
    Press [q] to stop, [?] for help

    frame=   11 fps=0.0 q=0.0 size=       0kB time=00:00:00.41 bitrate=   0.9kbits/s    
    frame=   22 fps= 21 q=0.0 size=       0kB time=00:00:00.85 bitrate=   0.4kbits/s    
    frame=   33 fps= 21 q=0.0 size=       0kB time=00:00:01.30 bitrate=   0.3kbits/s    
    frame=   43 fps= 20 q=0.0 size=       0kB time=00:00:01.69 bitrate=   0.2kbits/s  

    and this code is not returning the Value for Duration and as a result of this i am getting PHP warning and code is not calculating the Current percentage.

    here is the PHP warning , which i am getting-

    PHP Warning:  Division by zero in /var/www/html/mm/progressbar.php

    i think we can also calculate the percentage from the timebut i have no idea, how can i make it work ?

    or any help to solve the Problem with Duration.

    thanks for the help !