Recherche avancée

Médias (91)

Autres articles (69)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (5787)

  • How to programmatically start/stop FFMPEG stream transcoding

    10 décembre 2019, par Paul Wieland

    I have an ip webcam which provides an MJPEG stream. I can successfully transcode and save that stream with ffmpeg under OSX. The following gives me pretty much what I want :

    ffmpeg -f mjpeg -i "http://user:pass@10.0.1.200/nphMotionJpeg?Resolution=640x480&Quality=Standard" -b:v 1500k -vcodec libx264 /tmp/test.mp4

    That will start an FFMPEG session and begin saving the live stream to my test.mp4 file. pressing q will quit ffmpeg and save the file.

    I would like to programmatically start & stop the recording using a PHP or Bash shell script. I have tried the following :

    <?php

    $pid = pcntl_fork();

    if($pid == -1){
       die("could not fork");
    }elseif($pid){
       // we are the parent...
       print $pid.' started recording. waiting 10 seconds...';
       sleep(10); // Wait 10 seconds

       print_r(shell_exec("kill ".$pid)); // Kill the child recording process

       echo 'done';
       exit();
    }else{
       // we are the child process. call ffmpeg.
       exec('../lib/ffmpeg -f mjpeg -i "http://user:pass@10.0.1.200/nphMotionJpeg?Resolution=640x480&Quality=Standard" -b:v 1500k -vcodec libx264 /tmp/test.mp4');
    }

    But there are two problems :

    1. The ffmpeg process does not end/die (probably because its forked again)
    2. When I manually kill the ffmpeg process, the video file is not readable
  • How to programmatically start/stop FFMPEG stream transcoding

    3 février 2014, par Paul Wieland

    I have an ip webcam which provides an MJPEG stream. I can successfully transcode and save that stream with ffmpeg under OSX. The following gives me pretty much what I want :

    ffmpeg -f mjpeg -i "http://user:pass@10.0.1.200/nphMotionJpeg?Resolution=640x480&Quality=Standard" -b:v 1500k -vcodec libx264 /tmp/test.mp4

    That will start an FFMPEG session and begin saving the live stream to my test.mp4 file. pressing q will quit ffmpeg and save the file.

    I would like to programmatically start & stop the recording using a PHP or Bash shell script. I have tried the following :

    <?php

    $pid = pcntl_fork();

    if($pid == -1){
       die("could not fork");
    }elseif($pid){
       // we are the parent...
       print $pid.' started recording. waiting 10 seconds...';
       sleep(10); // Wait 10 seconds

       print_r(shell_exec("kill ".$pid)); // Kill the child recording process

       echo 'done';
       exit();
    }else{
       // we are the child process. call ffmpeg.
       exec('../lib/ffmpeg -f mjpeg -i "http://user:pass@10.0.1.200/nphMotionJpeg?Resolution=640x480&Quality=Standard" -b:v 1500k -vcodec libx264 /tmp/test.mp4');
    }

    But there are two problems :

    1. The ffmpeg process does not end/die (probably because its forked again)
    2. When I manually kill the ffmpeg process, the video file is not readable
  • App engine php flex env exec("ffmpeg...") - Unable to open logfile : /dev/stderr

    15 octobre 2018, par dan

    I’m trying to run FFMPEG on the app engine flex env for php.

    I’ve whitelisted the exec() function in my app.yaml and installed FFMPEG using the docker file - so far so good.

    When I’m running a exec("usr/bin/ffmpeg [args]...") I get an error that ffmpeg can’t access the dev/stderr and the function shuts down. see ref :

    WARNING : [pool app] child 44 said into stderr : "NOTICE : PHP message : ALERT - Unable to open logfile : /dev/stderr (attacker ’’, file ’/app/index.php’, line 49)"

    WARNING : [pool app] child 44 said into stderr : "NOTICE : PHP message : PHP Warning : exec() has been disabled for security reasons in /app/index.php on line 49"

    My configuration files are as follows :

    APP.YAML :

    runtime: custom
    env: flex
    runtime_config:
     document_root: .

    COMPOSER.JSON :

    {
       "require": {
           "php": "5.6.*",
           "google/cloud-storage": "^1.0",
       }
    }

    DOCKERFILE :

    FROM gcr.io/google-appengine/php:latest
    ENV DOCUMENT_ROOT /app
    RUN apt-get -y update && apt-get install -y ffmpeg

    INDEX.PHP :

    <?php
    //downloaded images into /tmp folder
    $cmd = "/usr/bin/ffmpeg -r 24 -i /tmp/frame_%05d.png -r 24 -vcodec libx264 -pix_fmt yuv420p -b 50M -s 1920x1080 -y /tmp/export.mp4";
    exec($cmd);
    ?>

    I’ve tried using all the other shell function - system(), exec_shell(),proc_open()
    With the same result.

    Any help ?

    Thank you