Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (81)

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

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (11949)

  • Video Conversion taking too longer time and Uses too much RAM of VPS Server

    18 août 2021, par Any Reservation

    I am using FFMPEG to convert Videos to MP4 Format.
It is Converting Good. But it takes too longer time to convert. and makes the whole Server Busy (slow speed).
When Users are converting videos, The full website goes too slow.
here are the Commands I am using.

    


    $command = "ffmpeg -y -i SampleFile.avi -b:v 2M -vcodec libx264 -vf scale=720:480 -preset ultrafast SampleFile.mp4;     
exec($command, $output, $status);


    


    I have 2GB Ram of VPS Server. But it uses whole RAM sometime system generates Errors.
This is Converting Good. but the whole system, website is slowed down.
Please help if someone can do.

    


  • avconv : Saving MP4 is Taking Hours

    4 septembre 2015, par PeregrineStudios

    not entirely sure if I should post this on askubuntu or stackoverflow. Posted on askubuntu and not getting any answers. I’m hoping I can find an answer here.

    I’m setting up a website where users can upload videos and share them. I’m using avconv to reduce the video size and save it twice, once as an mp4 and again as a webm.

    Uploading a .MOV from a phone, the video conversion is quick and manageable.

    Uploading a .mp4 from a Samsung Galaxy S3, the video conversion to webm is also quick. But, the conversion to another mp4 takes FOREVER - literally hours. Why ? Is anyone able to shed light on the problem ?

    My avconv output is below.

    avconv -i /var/www/dev_jackpine/ottawa2017/temp_videos/37a949071acaee714dae829ca8df9b29.mp4 -c:v libx264 -vf transpose=1,transpose=1,transpose=1 -s 640x480 /var/www/dev_jackpine/ottawa2017/spinnies/test.mp4
    avconv version 0.8.17-4:0.8.17-0ubuntu0.12.04.1, Copyright (c) 2000-2014 the Libav developers
    built on Mar 16 2015 13:26:50 with gcc 4.6.3
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/dev_jackpine/ottawa2017/temp_videos/37a949071acaee714dae829ca8df9b29.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 0
       compatible_brands: isom3gp4
       creation_time   : 2015-09-04 15:08:21
    Duration: 00:00:07.76, start: 0.000000, bitrate: 11756 kb/s
    Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1280x720, 11967 kb/s, 29.81 fps, 90k tbr, 90k tbn, 180k tbc
    Metadata:
     creation_time   : 2015-09-04 15:08:21
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 119 kb/s
    Metadata:
     creation_time   : 2015-09-04 15:08:21
    File '/var/www/dev_jackpine/ottawa2017/spinnies/test.mp4' already exists. Overwrite ? [y/N] y
    [buffer @ 0xc3d580] w:1280 h:720 pixfmt:yuv420p
    [scale @ 0xc3dac0] w:1280 h:720 fmt:yuv420p -> w:640 h:480 fmt:yuv420p flags:0x4
    [transpose @ 0xc3e280] w:640 h:480 dir:1 -> w:480 h:640 rotation:clockwise vflip:0
    [transpose @ 0xc3e7c0] w:480 h:640 dir:1 -> w:640 h:480 rotation:clockwise vflip:0
    [transpose @ 0xc3ede0] w:640 h:480 dir:1 -> w:480 h:640 rotation:clockwise vflip:0
    [libx264 @ 0xc2b100] MB rate (108000000) > level limit (983040)
    [libx264 @ 0xc2b100] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [libx264 @ 0xc2b100] profile Main, level 5.1
    [libx264 @ 0xc2b100] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
    Output #0, mp4, to '/var/www/dev_jackpine/ottawa2017/spinnies/test.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 0
       compatible_brands: isom3gp4
       creation_time   : 2015-09-04 15:08:21
       encoder         : Lavf53.21.1
       Stream #0.0(eng): Video: libx264, yuv420p, 480x640, q=-1--1, 180k tbn, 90k tbc
       Metadata:
         creation_time   : 2015-09-04 15:08:21
       Stream #0.1(eng): Audio: libvo_aacenc, 48000 Hz, stereo, s16, 200 kb/s
       Metadata:
         creation_time   : 2015-09-04 15:08:21
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
     Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Press ctrl-c to stop encoding

    Here’s an example frame output :

    frame=124398 fps=142 q=33.0 size=   16885kB time=1.38 bitrate=100110.2kbits/s dup=124356 drop=0

    I’ve had the process running the whole time I’ve been writing this question, and so far it’s done... 22 frames.

    What could be the problem ?

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