Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (65)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10706)

  • Pipe output of ffmpeg using nodejs stdout

    21 mai 2014, par rughimire

    I am not being able to pipe the output of the ffmpeg over a stdout.

    Following are the block of code what I coded so far.

       var http = require('http')
       , fs = require('fs')
       var child_process = require("child_process")

       http.createServer(function (req, res) {
       console.log("Request:", dump_req(req) , "\n")

       // path of the
       var path = 'test-mp4.mp4'  //test-mp4-long.mp4
       , stat = fs.statSync(path)
       , total = stat.size


       var range = req.headers.range
       , parts = range.replace(/bytes=/, "").split("-")
       , partialstart = parts[0]
       , partialend = parts[1]
       , start = parseInt(partialstart, 10)
       , end = partialend ? parseInt(partialend, 10) : total-1
       , chunksize = (end-start)+1


       console.log('RANGE: ' + start + ' - ' + end + ' = ' + chunksize +  "\n")


       var ffmpeg = child_process.spawn("ffmpeg",[
               "-i", path,             // path
               "-b:v" , "64k",         // bitrate to 64k
               "-bufsize", "64k",
               "-"                     // Output to STDOUT
           ]);


       //set header
       res.writeHead(206
       , { 'Content-Range': 'bytes ' + start + '-' + end + '/' + total
       , 'Accept-Ranges': 'bytes', 'Content-Length': chunksize
       , 'Content-Type': 'video/mp4'
       })

       stdout[ params[1] ] = ffmpeg.stdout

       // Pipe the video output to the client response
       ffmpeg.stdout.pipe(res);

       console.log("Response", dump_res(res), "\n")
       }).listen(1337)

    When i replaced the ffmpeg stuffs from above code, all works fine. Following is the part of the code when i replace the ffmpeg stuffs.

    var file = fs.createReadStream(path, {start: start, end: end})

    And piping like :

    file.pipe(res)

    What wrong I am running ?

    Edit :
    The ffmpeg command works fine. I have tested this through the command line and generating proper output.

  • 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');
               }
           }
       }
  • I have a series of images recorded by a webcam with unstable frame rate at about 22 fps. Did ffmpeg interpolate these image into other fps ? [closed]

    13 septembre 2020, par yangze68

    I have a series of images and its recorded timestamps. Their real fps is about 22 and it's unstable. If I use the FFmpeg to encode it into a 30fps video, do these really change the fps and interpolate image at an interval of 1/30 per second ? or Just arrange those images in the interval of 1/30 and decrease the total duration time ?

    


    my command :
ffmpeg -framerate 30 -i img%03d.png output.mp4