Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (53)

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

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

Sur d’autres sites (10833)

  • Revision 3456 : On joue sur la gueule du bouton de volume en descendant / montant la ...

    21 mai 2010, par kent1 — Log

    On joue sur la gueule du bouton de volume en descendant / montant la valeur sonore

  • Realtime ffmpeg shell output PHP

    26 septembre 2013, par matthew johnston

    Alright, I've been fighting this problem for a few days. Works fine on my local windows machine but, can't seem to get it to work on my CentOS server. My script grabs the duration of the video being converted and also grabs the current seconds it has processed inside of ffmpeg. However, it is only grabbing the "input file" of the ffmpeg output and stopping there. I have tried using both pipes (STDOUT [1] & STDERR [2]) for some reason ffmpeg likes to output on the STDERR pipe. Weird.

    $filename = "somefilename.tmp";
    $descriptor = array(
       0 => array("pipe", "r"),
       1 => array("pipe", "w"),
       2 => array("pipe", "w")
    );

    $ffmpeg = "ffmpeg -i /var/www/spotloader/videos/flipped/tmp/".$file."_comb.ts -vcodec mpeg2video -acodec pcm_s16le -pix_fmt yuv422p -vtag xdvb -b:v 13000k -r 30000/1001 /var/www/spotloader/videos/flipped/tmp/".$file.".mov";

    //open the process
    $process = proc_open($ffmpeg, $descriptor, $pipes, NULL, $_ENV);

    //if the process opened
    if ( is_resource( $process ) == true )
    {
       //get process status
       $procStatus = proc_get_status( $process );

       //if its running, let node know
       if ( $procStatus['running'] )
       {
           //nodejs socket, nothing wrong here
           $this->_sendSocket('converting', array('filename' => str_replace('.tmp', '', $file)));
       }

       //while the process is running
       while( $procStatus['running'] === true )
       {
           //there is output in the pipe
           if ( !feof( $pipes[1] ) )
           {
               //get the output
               $data = fgets($pipes[1], 128);
               //match the outputs duration and save it.
               if(preg_match('/Duration:\s([0-9]{2}:[0-9]{2}:[0-9]{2})/', $data, $matches))
               {
                   static $duration;
                   $duration = $this->_convertToSeconds($matches[1]);
               }

               //match the outputs current encoding time
               if(preg_match('/time=([0-9]{2}:[0-9]{2}:[0-9]{2})/', $data, $matches))
               {
                   //convert to seconds works fine, so it is not included.
                   $curTime = $this->_convertToSeconds($matches[1]);
                   //nodejs socket, nothing wrong here
                   $this->_sendSocket('update', array('percent' => round( ($curTime / $duration) * 100), 'filename' => str_replace('.tmp', '', $file)));
               }
           }

           //update process status
           $procStatus = proc_get_status( $process );
       }

       //nodejs socket, nothing wrong here
       $this->_sendSocket('converted', array('percent' => 100, 'filename' => str_replace('.tmp', '', $file)));
    }

    FFMPEG output I receive using the PHP code above

    ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
    built on May 10 2013 15:14:14 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
    --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl
    --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads
    --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv
    --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut
    --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
    --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis
    --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
    --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
    -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC'
    --disable-stripping
    libavutil      52. 18.100 / 52. 18.100
    libavcodec     54. 92.100 / 54. 92.100
    libavformat    54. 63.104 / 54. 63.104
    libavdevice    54.  3.103 / 54.  3.103
    libavfilter     3. 42.103 /  3. 42.103
    libswscale      2.  2.100 /  2.  2.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  2.100 / 52.  2.100
    [mpegts @ 0x243c620] max_analyze_duration 5000000 reached at 5016000 microseconds
    Input #0, mpegts, from '/var/www/spotloader/videos/flipped/tmp/Wildlife10.tmp_comb.ts':
    Duration: 00:00:02.02, start: 1.389978, bitrate: 227018 kb/s
    Program 1
    Metadata:
     service_name    : Service01
     service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (4:2:2) ([2][0][0][0] / 0x0002), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 1 channels (FL+FR), s16p, 128 kb/s

    FFMPEG output I'm expecting the "time=00:00:00" towards the end is what I need to capture in realtime. This is taken by running the FFMPEG command directly in the shell.

    ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
    built on May 10 2013 15:14:14 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
    --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl
    --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads
    --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv
    --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut
    --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
    --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis
    --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
    --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
    -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC'
    --disable-stripping
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [mpegts @ 0x10c9620] max_analyze_duration 5000000 reached at 5016000 microseconds
    Input #0, mpegts, from '/var/www/spotloader/videos/flipped/tmp/Wildlife10.tmp_comb.ts':
     Duration: 00:00:02.02, start: 1.389978, bitrate: 227018 kb/s
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: mpeg2video (4:2:2) ([2][0][0][0] / 0x0002), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
       Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 1 channels (FL+FR), s16p, 128 kb/s
    Channel layout 'stereo' with 2 channels does not match specified number of channels 1: ignoring specified channel layout
    Output #0, mov, to '/var/www/spotloader/videos/flipped/tmp/Wildlife10.tmp.mov':
     Metadata:
       encoder         : Lavf54.63.104
       Stream #0:0: Video: mpeg2video (xdvb / 0x62766478), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 13000 kb/s, 30k tbn, 29.97 tbc
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg2video -> mpeg2video)
     Stream #0:1 -> #0:1 (mp2 -> pcm_s16le)
    Press [q] to stop, [?] for help
    Input stream #0:1 frame changed from rate:48000 fmt:s16p ch:1 chl:1 channels (FL+FR) to rate:48000 fmt:s16p ch:2 chl:stereo
    Input stream #0:1 frame changed from rate:48000 fmt:s16p ch:2 chl:stereo to rate:48000 fmt:s16p ch:1 chl:mono
    Input stream #0:1 frame changed from rate:48000 fmt:s16p ch:1 chl:mono to rate:48000 fmt:s16p ch:2 chl:stereo
    Input stream #0:0 frame changed from size:1920x1080 fmt:yuv422p to size:1280x720 fmt:yuv422p0
    Input stream #0:1 frame changed from rate:48000 fmt:s16p ch:2 chl:stereo to rate:44100 fmt:s16p ch:2 chl:stereo
    frame=  741 fps= 52 q=2.6 size=   43866kB time=00:00:24.65 bitrate=14573.5kbits/s dup=5 drop=0

    Any ideas ? What needs changing from the switch from Windows to CentOS ?

    EDIT :
    I got this to work using popen instead. It also reduced my code. If anyone else does have a solution go ahead and post it. Thanks !

  • Fun With Tablets And Amazon’s App Store

    24 décembre 2011, par Multimedia Mike — General, amazon, android, app store, cyanogenmod, ios, smurfs, tablet

    I bought an Android tablet a few months ago. It is less expensive than the best tablets but no where near the bottom end of the market. I think it’s pretty good. However, one downside is that it’s not “certified” to use Google’s official marketplace. That would seem to be somewhat limiting, however…

    Enter Amazon’s Android App Store
    Amazon got into the business of selling Android Apps some time ago. I started experimenting with this on a Nexus One phone that Google gave me. When I installed the App Store on the Android tablet and logged in, I was pleasantly surprised to see all of my Amazon apps ready for downloading onto the tablet.

    So I have an App Store for use with this Android tablet.

    Anyway, the reason I bring this up is because I managed to screw up this tablet in an unusual and humorous manner. You might be wondering if an app downloaded from the Amazon App Store requires the App Store to be present in order to run. The answer is : Oh yeah ! It works like this :



    This means that if — perhaps out of curiosity, for example — you login to the Amazon App Store, download an app, install it, and then subsequently log out of the App Store or uninstall it altogether, the downloaded app will decline to run until you log back into the store.

    Here’s the thing– I wanted to provide a minimal level of security for my Android tablet. At the very least, I wished to lock the Amazon App Store itself since Amazon is famously (and, let’s face it, understandably) reluctant to deliberately add any friction to their shopping processes. I.e., without any external protection app, the App Store app would allow anyone to purchase any app using my tablet.

    So I purchased App Protector Pro from the Amazon App Store and it worked quite well. By default, it also password protects against modifying any system settings as well as installing new apps.

    So, here’s where I screwed up : App Protector Pro was doing its faithful duty and I uninstalled the Amazon App Store as an experiment. Suddenly, no apps obtained from the App Store would work unless I reinstalled the App Store. Okay, fair enough, except for one thing– App Protector Pro wouldn’t run without the App Store. Well, it did, it started to, tried to, but then exited. So I couldn’t re-install the App Store :



    Oops

    I eventually learned how to perform a factory reset of the unit which solved the problem. And, as indicated earlier, all of my apps were available for me to re-download.

    Modding, Cyanogen-style
    Open source aficionados will likely point out that there are alternate firmware options which allow me to take control of my Android tablet in a free and open manner. Among these options is CyanogenMod. After I got stuck in the situation described above, I thought I would have to resort to such an option.

    On the plus side, researching alternative firmware options is what taught me to boot the device into a recovery mode and ultimately restore to a factory default setting. But if you’ll allow me to indulge in a mini-rant regarding accessibility of open source software : I was more than a little frustrated in trying to understand what CyanogenMod could possibly offer me. Their homepage says it’s “an aftermarket firmware”. I’m not entirely sure what that means or how it can benefit me. Fortunately, they have a full feature list linked from the front page. They are, in order : Lockscreen gestures, phone goggles, OpenVPN, incognito mode, themes support, and DSP equalizer. I can’t say that any of those really add any value for me. I’d love to know if CyanogenMod supports Google Android Market and various other Google apps (such as maps and GMail). That’s a question that I can’t seem to find the answer to.

    The themes feature opens another old wound for me. Back around 1999 when I was first getting into Linux in a serious way, I remember that themes were a big theme at the Linux User Groups I would attend. I also remember lots are online articles at the time that emphasized how highly customizable the Linux desktop was in comparison to Windows 9x. I was bothered for 2 reasons : First, I thought there were more pressing problems that needed to be addressed in Linux ; and second, none of these customization options seemed particularly straightforward ; many apparently required hours of compiling and tinkering.

    Small digression. Anyway, back to CyanogenMod, I was glad to see that they prominently display a button in order to “View Video Tour”. Ah, internet video has us so spoiled these days. I was eager to see this aftermarket firmware in action to see what it could do for me. However, the link leads to… a forum post ? The thread seems to discuss how it would be a cool idea if the community could put together a video tour. At this point, the investigation just seems bizarre. It feels like a bunch of kids doing their best to do things the grown-up way.

    Okay, sorry, rant over. I try to stay positive these days. I’m sure the CyanogenMod folks are doing great, fun, and interesting work on their project. The problems they choose to solve might lack mainstream appeal, however.

    Free iPad
    Ultimately, I recently unloaded the little Android tablet because, well… when a free iPad comes your way, lower spec tablets feel a little silly to keep around. Yeah, it’s great to play around with. Though here’s one unsettling thing I noticed about Apple’s App Store. While browsing for worthwhile games to indulge in, I noticed that they had a section for “Top Grossing Games”. This was a separate list from the “Top Apps” charts. I found the list weird for 2 reasons : 1) Why do I care which games are raking in the most cash ? How does this communicate value to me, personally ? Seriously, why would I base a purchasing decision around which vendor has earned the most money ?

    Anyway, let’s move on to reason #2 this was scary : Most of the games in this list had a price of FREE. One of them was that Capcom Smurfs game that stirred up controversy some months ago because of kids making unsupervised in-app purchases of virtual smurfberries. I tend to think that a top-grossing, free to play game is probably one that heavily encourages in-app purchases. Strange how this emerging trend actually encourages me to seek out games from the “top paid” list vs. “top free”.