Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (105)

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

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

Sur d’autres sites (12958)

  • exec function not working as expected

    6 mars 2016, par Albert

    I am running a shell function from php to convert a video file to flash once it is uploaded. The exec function is like this :

    exec("ffmpeg -i " . WWW_ROOT . "files" . DS . "videos" . DS . $id . $ext . " -ar 22050 -r 32 -f flv -s 640x480 " . WWW_ROOT . "files" . DS . "videos" . DS . $id . ".flv");

    // if I echo the string it returns:
    // ffmpeg -i /home/vceroot/public_html/example.com/test/intraweb/app/webroot/files/videos/516c1203-0484-417a-b047-5488c40293e9.mpg -ar 22050 -r 32 -f flv -s 640x480 /home/vceroot/public_html/example.com/test/intraweb/app/webroot/files/videos/516c1203-0484-417a-b047-5488c40293e9.flv
    // the locations are correct

    However, it does not convert the video.

    After it uploaded the file, it just goes back to the index action. There is no converted file although the uploaded file is there.

    My permissions on the folder is 755. And the folder owner is apache. I don’t know what else to do. Can anyone assist me ?

    UPDATE

    So I’ve changed my exec query a bit and echoed the output :

    exec("ffmpeg -i " . WWW_ROOT . "files" . DS . "videos" . DS . $id . $ext . " -ar 22050 -r 32 -f flv -s 640x480 " . WWW_ROOT . "files" . DS . "videos" . DS . $id . ".flv 2>&1", $output, $return);
    die(print_r($output));

    This returned the following error :

    Array ( [0] => sh: ffmpeg: command not found ) 1

    So I changed it a bit to this :

    exec("/usr/local/bin/ffmpeg -i " . WWW_ROOT . "files" . DS . "videos" . DS . $id . $ext . " -ar 22050 -r 32 -f flv -s 640x480 " . WWW_ROOT . "files" . DS . "videos" . DS . $id . ".flv 2>&1", $output, $return);
    die(print_r($output));

    And now it returns :

    Array ( [0] => /usr/local/bin/ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory ) 1

    Where do I go from here ?

  • Where i made mistake - FFMPEG (LINUX) PROBLEM - basic

    22 mars 2019, par Fejor

    I just start learing ffmpeg, i have code (like bellow), but it’s doing nothing. Where i make mistake ? What wrong with that ?
    Sory for my language mistakes, i am not realy fluent in english

    fmpeg -i videoplayback.mp4 -filter_complex "[1:v]trim=start=0:end=1,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[intro1];
    [1:v]trim=start=1:end=123.39,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[main1];
    [1:v]trim=start=123.39:end=124.39,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[end1];
    [intro1]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[intro1];
    [end1]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[end1];
    [intro1][main1][end1][output];
    [a:1][audio]; -vcodec libx264 -map "[output]" -map"[audio]" "output.mp4"
  • ffmpeg php video basic uses and types [theoritical]

    15 mai 2014, par HackerManiac

    Can anyone give a code on how do i covert a video using ffmpeg.

    As thought currently i have only uploading system.

    vu.php(only a part is shown)

    define('UPLOAD','../../videos/');
       $fileName = time().$file['name'];
       $target = UPLOAD.$fileName;

     if(move_uploaded_file($file['tmp_name'],$target)){                
         exec("ffmpeg -i ".UPLOAD." ".UPLOAD.$filename.".flv");
     }

    This pice of code block just uploads the video on video folder but does not converts it to .flv.
    I am not sure how to use ffmpeg.

    My diretory looks like this

    www[localhost]->videos[videos folder]
    www[localhost]->pictures[pictures folder]
    www[localhost]->resources[folder]->php[folder]->vu.php

    I also want to return a .jpg image of any frame of video through json by converting via ffmpeg and uploading it to pictures folder.

    return json_encode(array("thumbnail"=>$image_src));

    UPDATE 1

    The above stuff was solved but now i have a question regarding video conversion.
    Suppose i have a file.avi and i want to convert it in 3 sizes of .flv format -> Low(320p) ,Medium (720p)and HD(1080p)

    what commands will i have to send to shell_exec(); and will that be fast enough ?
    CUrrently what i have is

    $vidSize = "640x480";
    $ffmpeg -i $videoFile -ar 22050 -ab 32 -f flv -s $vidSize $vidFile

    And i am not sure what -ar and -ab means and what value will be good for all those 3 sized videos ?