Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (103)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (13327)

  • ffmpeg : using the returned data in php

    4 décembre 2013, par user1503606

    I have started using ffmpeg and I am very new to it, so please bear with me.

    I have installed ffmpeg on my server and it works great ; I can run certain commands and get output data when logged in via ssh

    For example I can run

    ffmpeg -i Sleep\ Away.mp3

    Which returns the following :

    ffmpeg version 0.8.5, Copyright (c) 2000-2011 the FFmpeg developers
     built on Aug 20 2012 09:28:43 with clang 3.1 (tags/Apple/clang-318.0.61)
     configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang
     libavutil    51.  9. 1 / 51.  9. 1
     libavcodec   53.  7. 0 / 53.  7. 0
     libavformat  53.  4. 0 / 53.  4. 0
     libavdevice  53.  1. 1 / 53.  1. 1
     libavfilter   2. 23. 0 /  2. 23. 0
     libswscale    2.  0. 0 /  2.  0. 0
     libpostproc  51.  2. 0 / 51.  2. 0
    [mp3 @ 0x7f9694011a00] Header missing
       Last message repeated 13 times
    [mp3 @ 0x7f9694007c00] max_analyze_duration 5000000 reached at 5007020
    [mp3 @ 0x7f9694007c00] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from 'Sleep Away.mp3':
     Metadata:
       track           : 3
       album           : Bob Acri
       artist          : Bob Acri
       title           : Sleep Away
       genre           : Jazz
       album_artist    : Bob Acri
       composer        : Robert R. Acri
       date            : 2004
     Duration: 00:03:21.77, start: 0.000000, bitrate: 192 kb/s
       Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
    At least one output file must be specified

    The question I am asking is, how can I use the output data above ? I am developiong a music website ; say I want to loop through all the MP3 files and save the info about them into a database, so that the above would result in :

    Sleep Away.mp3    mp3    3:21    Jazz    2004     Bob Acri ...

    obviously in a table

    I have tried to use the php backtick operator with no success so far. I just thought I would put a question up here to get some advice from people that have done something similar.

    Thanks

    Update : I have tried the following

    &lt;?php $output = `ffmpeg -i Sleep\ Away.mp3`; echo "<pre>$output</pre>"; ?>
    &lt;?php $output = shell_exec(&#39;ffmpeg -i Sleep\ Away.mp3&#39;); echo "<pre>$output</pre>"; ?>

    both don't appear to return anything.

  • Chiptune Database and API

    14 septembre 2012, par Multimedia Mike — General

    So I set out to create a website that allows people to easily listen to video game music directly through their web browser. I succeeded in that goal. However, I must admit that the project has limited appeal since the web player is delivered via Chrome’s Native Client technology, somewhat limiting its audience. I’m not certain if anyone really expects NaCl to take off in any serious way, but I still have a few other projects in mind.

    I recently realized that, as a side effect of this project, I accidentally created something of significant value to fans of old video games and associated music– a searchable database of chiptune music and metadata. To my knowledge, no one else has endeavored to create such a thing. I figured that I might as well make the database easily accessible with an API and see where it leads.

    To that end, I created 2 API entry points. First, there is the search API located at http://gamemusic.multimedia.cx/api/search/. This can be exercised by ending the URL with a URL-encoded search string, e.g. : http://gamemusic.multimedia.cx/api/search/super+mario. This returns JSON data containing an array of results in decreasing order of relevance. Each result has a game title, database ID, media URL, system type, and an SHA-1 hash. This is the same API that the site’s own search page uses.

    The database ID can be plugged into http://gamemusic.multimedia.cx/api/metadata/ to retrieve the song’s metadata in JSON format. E.g., the ID for Super Mario Bros. 3 on the NES is 161 : http://gamemusic.multimedia.cx/api/metadata/161.

    I recently read an article about sins against true RESTful API principles which led me to believe I’m almost certainly doing this web API stuff wrong. I don’t think it’s a huge deal, though, since I don’t think anyone actually listens to chiptunes any more. But if there are offline chiptune music players that are still in service and actively maintained, perhaps the authors would like to implement this API. It would require some type of HTTP networking library, a JSON parser, the embedded XZ decoder, and some new code to parse through my .gamemusic and .psfarchive formats.

    This database could be a significant value-add to chiptune playback software, and could help people experience classic game music much more easily.

  • PHP Run FFMPEG in background, and find out when it's done [closed]

    27 septembre 2012, par toms900

    Possible Duplicate :
    Run a ffmpeg process in the background

    I was wondering if there's any easy way to runn and ffmpeg process in the background so people can leave the page. And if you do that, then tell if the ffmpeg process is running, and when it's done, update the database to "finished". I'll post my code if I need to. Thanks !
    Here's the code on the processing page :

    &lt;?php
    $name = $_FILES[&#39;upload_file&#39;][&#39;name&#39;];
    $type = $_FILES[&#39;upload_file&#39;][&#39;type&#39;];
    $size = $_FILES[&#39;upload_file&#39;][&#39;size&#39;];
    $tmpname = $_FILES[&#39;upload_file&#39;][&#39;tmp_name&#39;];

    if (!$title) {
       $title = $name;
    }

    if (!$description) {
       $description = "No description available.";
    }

    $string = substr(str_shuffle(str_repeat(&#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&#39;,10)),0,10);
    $videoname = "$string.mp4";
    $date = date("F d, Y"); // October 09, 2010
    $srcFile = $tmpname;
    mkdir("users/$usercode/uploads/$string");
    mkdir("users/$usercode/uploads/$string/HD");
    mkdir("users/$usercode/uploads/$string/regular");
    mkdir("users/$usercode/uploads/$string/mobile_upload");
    mkdir("users/$usercode/uploads/$string/thumbnails");
    $destFile1 = "/users/$usercode/uploads/$string/HD/$string.mp4";
    $destFile2 = "/users/$usercode/uploads/$string/regular/$string.mp4";
    $destFile3 = "/users/$usercode/uploads/$string/mobile_upload/$string.mp4";
    $ffmpegPath = "/usr/local/bin/ffmpeg";
    $flvtool2Path = "/usr/bin/flvtool2";
    $yamdiPath = "/usr/bin/yamdi";
    $mp4boxPath = "/usr/local/bin/MP4Box";
    // Create our FFMPEG-PHP class
    $ffmpegObj = new ffmpeg_movie($srcFile);
    // Save our needed variables
    $srcWidth = $ffmpegObj->getFrameWidth();
    $srcHeight = $ffmpegObj->getFrameHeight();
    $srcFPS = $ffmpegObj->getFrameRate();
    $srcAB = $ffmpegObj->getAudioBitRate();  
    $srcAR = $ffmpegObj->getAudioSampleRate();
    $res = $srcWidth . "x" . $srcHeight;
    // Call our convert using exec()
    $iphone1 = getcwd().$destFile1;
    $iphone2 = getcwd().$destFile2;
    $iphone3 = getcwd().$destFile3;
    $low = "854x480";
    $local_img = "/users/$usercode/uploads/$string/thumbnails/$string.jpg";
    $img = getcwd().$local_img;
    $img = preg_replace(&#39;/ /&#39;,&#39;\ &#39;,$img);
    $thumb = "$string.jpg";
    $cmd = "$ffmpegPath -i $tmpname 2>&amp;1";  
    if (preg_match(&#39;/Duration: ((\d+):(\d+):(\d+))/s&#39;, `$cmd`, $time)) {  
       $total = ($time[2] * 3600) + ($time[3] * 60) + $time[4];  
       $interval = rand(0, $total);  
    }  

    $img = shell_exec("$ffmpegPath -ss $interval -i $tmpname 2>&amp;1 -s 120x90 -f mjpeg -vframes 1 $img");


    if ($srcWidth >= 1280 &amp;&amp; $srcHeight >= 720) {
       $out1 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab $srcAB -ar $srcAR -b 5000k -r $srcFPS -s $res -acodec libfaac $iphone1");
       $out2 = shell_exec("$mp4boxPath -inter 0.5 $iphone1");
       $out3 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab $srcAB -ar $srcAR -b 2000k -r $srcFPS -s $low -acodec libfaac $iphone2");
       $out4 = shell_exec("$mp4boxPath -inter 0.5 $iphone2");
       $out5 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre slow -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone3");
       $out6 = shell_exec("$mp4boxPath -inter 0.5 $iphone3");
       echo 1;
    }
    else {
       $out3 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone2");
       $out4 = shell_exec("$mp4boxPath -inter 0.5 $iphone2");
       $out5 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre slow -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone3");
       $out6 = shell_exec("$mp4boxPath -inter 0.5 $iphone3");          
       echo 1;
    }
    function generate_random($number_of_characters)
    {
           $characters = array();
           $randomchar = "";
           $x = 0;
           for($i = 48; $i &lt; 123; $i++)
           {
                   if(ctype_alnum(chr($i)))
                   {
                           $characters[$x] = chr($i);
                           $x++;
                   }
           }
           for($i = 0; $i &lt; $number_of_characters; $i++)
           {
                   $randomchar .= $characters[rand(0, count($characters) - 1)];
           }
           return $randomchar;
    }
    ?>