Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (109)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (14834)

  • PHP and FFMPEG advice/sollution for a unknown issue

    20 octobre 2015, par sonam Sharma

    I am having a live video streaming website and I allow people to upload all the video files to the site till now everything is ok.

    What I am doing is that I am using FFMPEG to convert the video to mp4 and also get a image out of the video after 20 seconds.

    The code that I am using is that :

    require 'vendor/autoload.php';
           $getEXT_check=substr(@$_FILES['profileimage99']['name'],-3);
           if($getEXT_check !='mp4' && $getEXT_check !='MP4'){
           exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.''); }
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -ss 00:00:20 -vframes 1  '.$new_image_path);
           $theduration=exec('ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 '.$uploadfile.' 2>&1');
           $theduration_val=round($theduration/60, 2);

    What issue I am having is that

    1. sometimes the code dosent extract the image out of video
    2. video conversation takes very long time for non mp4 video (I am not converting mp4 videos)

    Some info what I have done on server. During the development of site I installed ffmpeg on my pc and downloaded the vendor directory by composer.json file. But I have not done these things on my server I have a dedicated server from bluehost and have ffmpeg installed at this location.

    /usr/local/bin/ffmpeg
    /usr/local/bin/mplayer
    /usr/local/bin/mencoder
    /usr/bin/flvtool2
    /usr/local/bin/MP4Box
    /usr/local/bin/yamdi

    During uploading the site what I did is that I also uploaded the vendor directory and all the files and made the site live. I haven’t used any of the path as given by my server admin after asking.

    Please suggest me something where I am doing wrong.

  • ffmpeg taking time to convert video

    2 septembre 2015, par sonam Sharma

    hello all i am having a video hosting site like youtube where i allow almost all kinds of videos to be uploaded but i would like to convert all the uploaded videos to mp4 format

    i can do this and my code is below

     require 'vendor/autoload.php';
           $getEXT_check=substr(@$_FILES['profileimage99']['name'],-3);
           if($getEXT_check !='mp4' || $getEXT_check !='MP4'){
           exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.''); }
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -ss 00:00:28.435 -vframes 1  '.$new_image_path);
           $theduration=exec('ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 '.$uploadfile.' 2>&1');
           $theduration_val=round($theduration/60, 2);

    this code converts the non mp4 videos to mp4 and gets a thumbnail and gets duration correctly but the problem is that the process takes very much time like more than 2-3 hrs if i upload flv or mkv formats of about 100mbs.

    please suggest me something better please if you need to see the full page code

    Complete Code :

        <?php
       @session_start();
      include "conn.php";
       include "date.php";
      $sid = $_SESSION['id'];
      $ipIP=$_SERVER['REMOTE_ADDR'];
      $uploaddir = "members/$sid/video/";

        //Check the file is of correct format.  
         function checkfile($input){
         $ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm', 'mkv', 'MP4','3gp');
         $extfile = substr($input['name'],-4);
         $extfile = explode('.',$extfile);
           $good = array();
         @$extfile = $extfile[1];
        if(in_array($extfile, $ext)){
        $good['safe'] = true;
        $good['ext'] = $extfile;
        }else{
         $good['safe'] = false;
          }
         return $good;
            }
          if($_FILES["profileimage99"]["size"] ==''){
        echo 'No file added';die;
           }
     // if the form was submitted process request if there is a file for uploading
      if(@$_FILES["profileimage99"]["size"] < 102400000000){
      //$live_dir is for videos after converted to mp4
       $live_dir = "mem/$sid/video/";
     //$live_img is for the first frame thumbs.
       $live_img = "mem/$sid/img/";        
       $seed = rand(11111111111193,9999999999999929) * rand(3,9);
       $getEXT=substr(@$_FILES['profileimage99']['name'],-5);
       $upload = $seed.$getEXT;
       $uploadfile = $uploaddir .$upload;        

       $safe_file = checkfile(@$_FILES['profileimage99']);
       if($safe_file['safe'] == 1){
                   if (move_uploaded_file(@$_FILES['profileimage99']['tmp_name'], $uploadfile)) {

                   $base = basename($uploadfile, $safe_file['ext']);
                   $new_file = $base.'mp4';
                   $new_image = $base.'jpg';
                   $new_image_path = $live_img.$new_image;
                   $new_flv = $live_dir.$new_file;

           require 'vendor/autoload.php';
           $getEXT_check=substr(@$_FILES['profileimage99']['name'],-3);
           if($getEXT_check !='mp4' || $getEXT_check !='MP4'){
           exec('ffmpeg -i '.$uploadfile.' -f mp4 -s 896x504 '.$new_flv.''); }
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -ss 00:00:28.435 -vframes 1  '.$new_image_path);
           $theduration=exec('ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 '.$uploadfile.' 2>&1');
           $theduration_val=round($theduration/60, 2);
       //create query to store video
       if(isset($_POST['title'])){$titlename=$_POST['title'];}else{$titlename='';}
       if(isset($_POST['desc'])){$desc=$_POST['desc'];}else{$desc='';}
       if(isset($_POST['catag'])){$catag=$_POST['catag'];}else{$catag='';}
       if(isset($_POST['channel'])){$channel=$_POST['channel'];}else{$channel='';}
       $dbentry_o=mysqli_query($conn,"insert into vids (uid,chid,ctid,vname,vdisc,duration,time,ip,src,thumb) values ('$sid','$channel','$catag','$titlename','$desc','$theduration_val','$date','$ipIP','$new_file','$new_image')");
       echo "<img src="http://stackoverflow.com/feeds/tag/mem/$sid/img/$new_image" class="The_Append_L_snap" style='max-width: 300px; max-height: 300px' />";die;
            } else {
                   echo "Possible file upload attack!\n";
                   print_r($_FILES);
            }

       }else{

            echo 'Invalid File Type Please Try Again. You file must be of type
            .mpg, .wma, .mov, .flv, .mp4, .avi, .qt, .wmv, .rm'.$_FILES['profileimage99']['name'];

       }
     }else{
    echo 'Please choose a video';die;
     }
     ?>

    The issue :
    FFmpeg call above takes too much time to convert the video to MP4.

    Note :
    In the future I will be having a quality selector in my video.js player.

  • Retrieve Creation Date and set as basetime in overlay ffmpeg

    27 janvier 2021, par oiluig

    I want to print time as overlay on a video, starting from the creation time of the video file.&#xA;I found this topic :&#xA;FFmpeg for marking time video based on a reference date

    &#xA;

    I can also get the creation date with ffprobe :&#xA;ffprobe -v quiet -select_streams v:0  -show_entries stream_tags=creation_time -of-default=noprint_wrappers=1:nokey=1 video.mp4

    &#xA;

    Is there a way to retrieve the metadata creation_time directly with ffmpeg ?&#xA;How set it as basetime ?

    &#xA;