Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (37)

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

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

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

Sur d’autres sites (5280)

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

  • 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"
  • 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 ?