Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (97)

  • Les images

    15 mai 2013
  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5594)

  • Improve ffmpeg performance

    8 décembre 2014, par hitesh

    I am using ffmpeg to take screen shot from video , it is video from CDN.

    I am doing below steps

    1.Upload video to CDN using html file tag.

    2.Get CDN url and use it for creating screen shot using ffmpeg.

    3.Upload the screenshot in CDN.

    4.Save video and screenshot CDN url to DB

    the whole process is really time consuming, even if I put loader it is really slow.

    This is code of POC I did for ffmpeg :

    $imageFile = realpath("./videos") . '/test5.png';
    $imageFile2 = realpath("./videos") . '/test6.png';
    $size = "230x155";
    $getfromsecond = 8;

    if (isEnabled('shell_exec')) {
       echo "Shall_exec is enabled " . "<br />";
       shell_exec('echo "hello world"');
       echo "<br />";
    } else {
       echo "shall exec command is not allowed";
    }

    $cmd = "ffmpeg -i $vid -an -ss $getfromsecond -s $size -vframes 1 $imageFile";
    $cmd2 = "ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size -vframes 1 $imageFile2";

    echo 'command 1 - local Image : ' . $cmd . "<br />";
    echo 'command 2 - remote video : ' . $cmd2 . "<br />";
    echo "<br />command 2 - remote video shell_exec output : " . shell_exec($cmd) . "<br />";
    echo '<br />command 2 - remote video shell_exec output : ' . shell_exec($cmd2) . "<br />";

    if (!shell_exec($cmd)) {
       echo " video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating video thumbnail" . "<br />";
    }
    if (!shell_exec($cmd2)) {
       echo "Remote video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating Remote video thumbnail" . "<br />";
    }

    function isEnabled($func) {
       return is_callable($func) &amp;&amp; false === stripos(ini_get('disable_functions'), $func);
    }  

    Is there some way to improve ffmpeg performance ?

    Thanks

  • Shall_exec() is not working in Cent OS 6.5 with php 5.5

    5 décembre 2014, par hitesh

    It is the follow up from the question here. I was not sure if it was good idea to edit that question, So I am asking a new question here

    As explained in my previous question I am using ffmpeg for getting screenshot from video.it seems to working fine in my local but in my Cent OS 6.5 server it is not working, it throws error that
    ffmpeg extension is not enabled.

    "Error in Loading ffmpeg"

    To debug this, I commented the line

     extension_loaded('ffmpeg') or die('Error in loading ffmpeg');

    and I found out that in Cent OS terminal, ffmpeg command were working but if I use it with full path as I am doing in windows it did not work.So i deleted full path and used ffmpeg alone, I am not sure what was the reason behind this.

    Here is my new command

     $cmd = "ffmpeg -i $vid -an -ss $getfromsecond -s $size -vframes 1 $imageFile";
       $cmd2 = "ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size -vframes 1 $imageFile2 ";
       echo $cmd ."<br />";
       echo $cmd2."<br />";
    exec($cmd, $output, $return);
    echo '$output :' ; print_r($output); echo "<br />";echo '$return' . $return . "<br />";

    if ($return != 0) {
       // an error occurred
       echo "Error in EXEC command ";
    }

    if(!shell_exec($cmd2)){
       echo "Remote video Thumbnail created". "<br />";
    }else{
       echo "Error Creating Remote video thumbnail". "<br />";
    }

    now again it was not working in server, but when I tried both command

    `     echo $cmd ."<br />";

           echo $cmd2."<br />";`

    in dev terminal, it got executed successfully I could see the screenshot.

    So while searching for the problem, I found this question here based on this answer here. I understood that some server may not allow it so I checked it.

    if (isEnabled('shell_exec')) {
       echo "Shell_exec is enabled "."<br />";
       shell_exec('echo "hello world"');
       echo "<br />";
    }else{

       echo "shell exec command is not allowed";
    }

    I got the output "Shell_exec is enabled " but shell_exec('echo "hello world"'); does not seems to work, Also when I run the command directly in terminal it works.

    Help me find the issue here, is it issue with shall_exec() or something else ?

    Any help is appreciated. Thanks

  • Progress with rtc.io

    12 août 2014, par silvia

    At the end of July, I gave a presentation about WebRTC and rtc.io at the WDCNZ Web Dev Conference in beautiful Wellington, NZ.

    webrtc_talk

    Putting that talk together reminded me about how far we have come in the last year both with the progress of WebRTC, its standards and browser implementations, as well as with our own small team at NICTA and our rtc.io WebRTC toolbox.

    WDCNZ presentation page5

    One of the most exciting opportunities is still under-exploited : the data channel. When I talked about the above slide and pointed out Bananabread, PeerCDN, Copay, PubNub and also later WebTorrent, that’s where I really started to get Web Developers excited about WebRTC. They can totally see the shift in paradigm to peer-to-peer applications away from the Server-based architecture of the current Web.

    Many were also excited to learn more about rtc.io, our own npm nodules based approach to a JavaScript API for WebRTC.

    rtcio_modules

    We believe that the World of JavaScript has reached a critical stage where we can no longer code by copy-and-paste of JavaScript snippets from all over the Web universe. We need a more structured module reuse approach to JavaScript. Node with JavaScript on the back end really only motivated this development. However, we’ve needed it for a long time on the front end, too. One big library (jquery anyone ?) that does everything that anyone could ever need on the front-end isn’t going to work any longer with the amount of functionality that we now expect Web applications to support. Just look at the insane growth of npm compared to other module collections :

    Packages per day across popular platforms (Shamelessly copied from : http://blog.nodejitsu.com/npm-innovation-through-modularity/)

    For those that – like myself – found it difficult to understand how to tap into the sheer power of npm modules as a font end developer, simply use browserify. npm modules are prepared following the CommonJS module definition spec. Browserify works natively with that and “compiles” all the dependencies of a npm modules into a single bundle.js file that you can use on the front end through a script tag as you would in plain HTML. You can learn more about browserify and module definitions and how to use browserify.

    For those of you not quite ready to dive in with browserify we have prepared prepared the rtc module, which exposes the most commonly used packages of rtc.io through an “RTC” object from a browserified JavaScript file. You can also directly download the JavaScript file from GitHub.

    Using rtc.io rtc JS library
    Using rtc.io rtc JS library

    So, I hope you enjoy rtc.io and I hope you enjoy my slides and large collection of interesting links inside the deck, and of course : enjoy WebRTC ! Thanks to Damon, JEeff, Cathy, Pete and Nathan – you’re an awesome team !

    On a side note, I was really excited to meet the author of browserify, James Halliday (@substack) at WDCNZ, whose talk on “building your own tools” seemed to take me back to the times where everything was done on the command-line. I think James is using Node and the Web in a way that would appeal to a Linux Kernel developer. Fascinating !!