Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (40)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (5272)

  • FFmpeg file conversion exceeds maximum execution time

    5 mai 2014, par Paul Ledger

    I have a file upload system the checks the file format, etc and converts to an mp4 if necessary. This works fine as long as the video file(s) total length is less than 30 seconds.
    I have been testing this two short clips about 10 seconds each and it work fine but when I test this with a clip that this 33 seconds I get the error :

    Fatal error : Maximum execution time of 30 seconds exceeded in
    C :\xampp\htdocs\own_it_all\global.func\file_upload.php on line
    59

    I could just increase the maximum execution time in the php.ini file but as the max length of a video is 20 mins this wouldn’t seem very user friendly making the user wait 20 mins per video.
    Is there a way of converting the video instantly or as near as ?

    This is the exec cmd i have :

    $cmd = "ffmpeg -i $input -vcodec h264 -acodec aac -strict -2 $o";

    As the up-loader allows multiple uploads this is inside a for loop.

    foreach($_FILES['file']['name'] as $key => $name){
           if($_FILES['file']['error'][$key] === 0){
               $temp = $_FILES['file']['tmp_name'][$key];
               $ext = explode('.',$name);
               $ext = strtolower(end($ext));
               $_file = md5($temp).time();
               $file = $_file.'.'.$ext;
               if(in_array($ext,$allowed) === true &&  move_uploaded_file($temp,"../uploads/{$file}") === true){
                   $file_type = explode('/',$_FILES['file']['type'][$key]);
                   if($file_type[0] === 'image'){
                       $succedeed[] = array('name' => $name,'file' => $file, 'type' => 'image');              
                   }else{
                       $ffmpeg = 'ffmpeg';
                       $output = dirname(__DIR__).'/uploads/thumbs/'.$_file.'.jpg';
                       $input = dirname(__DIR__).'/uploads/'.$file;
                       $mov = new ffmpeg_movie($input);
                       $d =  $mov->getDuration();
                       $iscopy = $mov->getCopyright();
                       $h = $mov->getFrameHeight();
                       $w = $mov->getFrameWidth();
                       $pos = ceil((int)$d /3);
                       $size = $w.'x'.$h;
                       $i = explode('.',$input);
                       $o = $i[0].'.mp4';
                       if(ceil($d) < 1200){
                           if($ext != 'mp4'){
                               $cmd = "ffmpeg -i $input -vcodec h264 -acodec aac -strict -2 $o";
                               //$cmd = "ffmpeg -i $input -vcodec h264 -acodec aac -s $size $o";
                               shell_exec($cmd);
                               $toclear[] = array('file' => $file);
                           }
                           $cmd = "ffmpeg -ss $pos -i $o -an -s $size $output";
                           shell_exec($cmd);
                           $total_time += $pos;
                           $succedeed[] = array('name' => $name,'file' => 'thumbs/'.$_file.'.jpg', 'type' => 'mp4');                          

                       }else{
                           $failed[] = array('name' => $name, 'file' => $file, 'error' => 'Video length cannot exceed 20mins.');
                       }          
                   }

               }else{
                   $failed[] = array('name' => $name, 'file' => $file, 'error' => 'File type not allowed');
               }
           }
       }
  • Android FFMPEG doesn't continue, throws no error

    8 octobre 2015, par Thommy

    I try to scale a video via FFMPEG in Android, but everytime I execute the command, it just stops producing console output.
    No Exception is thrown.
    The output looks like this. It just stops afterwards, the App is still running.

    /.../ffmpeg -i /.../VIDEO1.mp4 -filter:v scale=720:-1 -c:a copy /sdcard/test.mp4
    WARNING: linker: .../ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
    built on Oct  8 2015 14:29:21 with gcc 4.6 20120106 (prerelease)
    configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/thomas/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/thomas/Downloads/android-ndk-r10d/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
      libavutil      51. 54.100 / 51. 54.100
      libavcodec     54. 23.100 / 54. 23.100
      libavformat    54.  6.100 / 54.  6.100
      libavdevice    54.  0.100 / 54.  0.100
      libavfilter     2. 77.100 /  2. 77.100
      libswscale      2.  1.100 /  2.  1.100
      libswresample   0. 15.100 /  0. 15.100
      libpostproc    52.  0.100 / 52.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.../VIDEO1.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
        creation_time   : 2015-10-08 08:46:47
      Duration: 00:00:15.98, start: 0.000000, bitrate: 17182 kb/s
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16923 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
        Metadata:
          creation_time   : 2015-10-08 08:46:47
          handler_name    : VideoHandle
        Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 252 kb/s
        Metadata:
          creation_time   : 2015-10-08 08:46:47
          handler_name    : SoundHandle

    Note : I ... out some paths to keep it easy to read

  • How to change mjpeg to yuyv422 from a webcam to a v4l2loopback ?

    3 janvier 2020, par Dev Null

    Backstory : One livestreaming site I use isn’t smart enough to detect the capabilities of my webcam (Logitech Brio, 4k), and instead just uses the default frames per second settings, which is 5fps.

    (full solution walk-through in the answer)

    The best solution I could think of (besides changing livestream providers) was to create a loopback virtual webcam using v4l2loopback that I could force to have the exact settings I wanted to use on that livestream site.

    For the brio, the higher frame rates come with mjpeg, not the default yuyv.

    Problem 1 :

    I could easily read mjpeg, but unfortunately kept banging my head against the wall because v4l2loopback evidently only wanted yuyv.

    I tried things like :

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -vcodec copy         \
          -f v4l2 /dev/video6

    and

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -vcodec yuyv422      \ # this line changed (even tried "copy")
          -f v4l2 /dev/video6

    But they wouldn’t work. I got errors like :

    Unknown V4L2 pixel format equivalent for yuvj422p

    and

    ...deprecated pixel format used, make sure you did set range correctly...

    ...V4L2 output device supports only a single raw video stream...

    Eventually I got this to work :

    ffmpeg -f v4l2              \
          -input_format mjpeg  \
          -framerate 30        \
          -video_size 1280x720 \
          -i /dev/video0       \
          -pix_fmt yuyv422     \ # The winning entry
          -f v4l2 /dev/video6

    Problem 2

    The next problem was getting chrome to see the virtual webcam. It worked correctly with guvcview, and on firefox I could use webcam testing sites and it would pick the virtual camera up without a problem.

    Turns out google, in it’s overly-protective nature (while it’s siphoning off all our data, btw), doesn’t want to use webcams that can be read and written to.

    So when starting v4l2loopback you have to tell it to announce that it’s "read only" to consumers like chrome.

    Here’s the exact modprobe I use that works :

    sudo modprobe v4l2loopback devices=1 exclusive_caps=1