Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (55)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

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

Sur d’autres sites (6672)

  • Playing MP4 file in Powerpoint

    28 août 2014, par BrewGold

    I have a huge MP4 file (4GB) an hour long video. I want to extract port of the file. So I used the following command to extract 70 seconds(00:01:10) of video starting from 11 minutes

    ffmpeg -i INPUT.mp4 -ss 00:11:00 -t 00:01:10 -c:v copy -c:a copy OUTPUT.mp4

    Now I got a small file extracted from Input.MP4
    The output.mp4 file size is still big(90 MB). So I used the following command

    ffmpeg -i OUTPUT.mp4 -c:v libx264 -crf 30 SmallSizeVideo.avi

    I got SmallSizeVideo.avi file which is approximately 6MB.

    I am using Powerpoint 2010. I want to insert the video in Powerpoint and play.

    Unfortunately when I embed SmallSizeVideo.avi Powerpoint is unable to play

    1) Is my approach correct ?
    2) What is the best way to situation like me to play small portion of clips in powerpoint

    Thank you

  • Playing MP4 file in Powerpoint

    14 mai 2019, par BrewGold

    I have a huge MP4 file (4GB) an hour long video. I want to extract port of the file. So I used the following command to extract 70 seconds(00:01:10) of video starting from 11 minutes

    ffmpeg -i INPUT.mp4 -ss 00:11:00 -t 00:01:10 -c:v copy -c:a copy OUTPUT.mp4

    Now I got a small file extracted from Input.MP4
    The output.mp4 file size is still big(90 MB). So I used the following command

    ffmpeg -i OUTPUT.mp4 -c:v libx264 -crf 30 SmallSizeVideo.avi

    I got SmallSizeVideo.avi file which is approximately 6MB.

    I am using Powerpoint 2010. I want to insert the video in Powerpoint and play.

    Unfortunately when I embed SmallSizeVideo.avi Powerpoint is unable to play

    1) Is my approach correct ?
    2) What is the best way to situation like me to play small portion of clips in powerpoint

    Thank you

  • How to get estimate time in FFmpeg using php ?

    4 février 2019, par Pooja Jadav

    I’m using FFmpeg for in my project to overlay a video using php.

    I have been included a queue for command execute. So, sometimes many requests in queue, and take a long time to execute.

    That’s why, I have to show the progress bar for user identifies, how many time will take for creates it video. For this scenario, I have to take estimate time.

    Maybe it’s possible to calculate it by other params that are shown in the output such as fps, bitrate or speed.

    Any ideas ?

    //DownloadJob.php;

    public function __construct($video,$transparent_img,$output_file)
     {
       $this->video=$video;
       $this->transparent_img = $transparent_img;
       $this->output_file = $output_file;
       $create_at = date('Y-m-d H:i:s');
       $this->status =0;
       $this->download_id = base64_encode($video);

       DB::beginTransaction();
       DB::insert('INSERT INTO jobs_download(download_id,image,video,status,output_video,create_time)
                   VALUES(?,?,?,?,?,?)',[$this->download_id,$this->video,$this->transparent_img,$this->status,$this->output_file,$create_at]);
       DB::commit();
    }

    public function handle()
    {
       $video=$this->video;
       $transparent_img=$this->transparent_img;
       $output_file=$this->output_file;
       $ready=1;
       $failed=2;

       $input_video = $video;
       $transparent_img = $transparent_img;

       try{
           $ffmpeg = "C:\\ffmpeg\\bin\\ffmpeg";
           $cmd = $ffmpeg . " -i " . $input_video . " -i " . $transparent_img . " -filter_complex 'overlay' " . $output_file;
           //Log::info($cmd);
           exec($cmd, $output);

           if(file_exists($output_file)){

               DB::beginTransaction();
               DB::update('UPDATE jobs_download SET status=? WHERE download_id =?',[$ready,$this->download_id]);
               $this->status = 1;
               DB::commit();

               if(file_exists($input_video)){
                   unlink($input_video);
               }

               if(file_exists($transparent_img)){
                   unlink($transparent_img);
               }

           }else{
               Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
               DB::beginTransaction();
               DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
               $this->status = 3;
               DB::commit();
           }
       }catch (\Exception $e){
           Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
           DB::beginTransaction();
           DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
           $this->status = 3;
           DB::commit();
       }
    }

    public function failed()
    {
       $failed = 2;
       Log::error('DownloadJob.php failed()',['download_id'=>$this->download_id]);
       DB::beginTransaction();
       DB::update('UPDATE jobs_download SET status=? WHERE download_id =? ',[$failed,$this->download_id]);
       $this->status = 3;
       DB::commit();
    }

    public function getResponse()
    {
       return ['download_id' => $this->download_id,'eta_time_sec' => $eta_time_sec];
    }

    //FFmpegController.php

    public function generateVideo(Request $request_body)
    {
           //Overlay file
           $transparent_img=Input::file('transparent_img');
           //Main file
           $video=Input::file('video');
           $output_file = $video_name;
           //Send in queue for ffmpeg overlay
           $job = new DownloadJob($video_name,$image,$output_file);
           $data = $this->dispatch($job);

           $dl_url = $job->getResponse();//Get response download_id and estimate time in second
          print_r($dl_url);

    }

    Output

    I want to this answer in my output result.

      [
       'download_id':'NWM1ODAwNDU3NzkxOV92aWRlb19maWxlXzE1NDkyNzExMDkubXA0',
       'eta_time_sec':5
      ]

    How can I get estimation time in seconds from fps, bitrate or speed but I have no clue..