Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (46)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (6659)

  • php ming flash slideshow to mp4/avi

    19 août 2013, par Stefan

    After hours of searching and trying i finally got a nice script together that generates a good looking Flash .swf file with a nice transaction in between de images.
    It works great if you access the swf file directly in a browser, depending on the amount of images the flash created takes anywhere between 10 and 60 seconds.
    But when uploading to Youtube the movie created flashed by in one second.
    Because swf isnt really a accepted fileformat for Youtube we decided to convert the flash file to mp4 or avi using ffmpeg.
    Unfortunally that didnt work, it had the same effect as the youtube movie.
    We had a old version of ffmpeg and updated that to a recent version and tried to convert again with the same result.
    The main thing i see is that ffmpeg cant see the swf file duration and bitrate, they are both 'N/A' while were do set them in the php script.

    Now i have to admit i havent really tested with the new version because the commandline options are a little different but ill work on that after i post this.
    In the previous version we tried setting the framerate of the source swf file, but that didnt work either.

    Anyone here that can has a idea ? it would be greatly appriciated.

    PHP Ming Script :

         $fps = 30;
            foreach($objects as $objectId => $images){
                   // START FLASH MOVIE
                   $m = new SWFMovie();
                   $m->setDimension($width, $height);
                   $m->setBackground(0, 0, 0);
                   $m->setRate($fps);
                   $m->setFrames(count($images)*202); //count(images)* 2 breaks *($fps*$breakTime)+22(fadeOut))

                   $i = 0;
                   foreach($images as $image){

                       // REMOVE THE BACKGROUND IMAGE
                       if($behind){
                           $m->remove($behind);
                       }
                       // # REMOVE

                       // LOAD NEW IMAGE
                       $img = new SWFBitmap(fopen($image,"rb"));
                       $pic = $m->add($img);
                       $pic->setdepth(3);
                       // # LOAD

                       // BREAK TIME
                       for($j=1;$j<=($fps*$breakTime);$j++){
                           $m->nextFrame();
                       }
                       $m->remove($pic);
                       // # BREAK

                       // LOAD THE NEXT IMAGE AS BACKGROUND, IF LAST IMAGE, LOAD FIRST
                       $nextBackgrondImage =($images[$i+1]) ? $images[$i+1] : $images[0] ;
                       $img = new SWFBitmap(fopen($nextBackgrondImage,"rb"));
                       $behind = $m->add($img);
                       $behind->setdepth(2);
                       // # LOAD

                       // AND FADE OUT AGAIN
                       $img = fadeOut($image, $width, $height);
                       $pic = $m->add($img);
                       $pic->setdepth(3);
                       // # FADE OUT

                       // BREAK TIME
                       for($j=1;$j<=($fps*$breakTime);$j++){
                           $m->nextFrame();
                       }
                       $m->remove($pic);
                       # BREAK
                       $i++;
                   }      
                   $m->save('./flash/'.$nvmId.'_'.$objectId.'.swf');  
               unset($m);
               }
    }

    FFMPEG version :

    root@server:~# ffmpeg -version
    \FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
     built on Aug 15 2013 20:43:21 with gcc 4.4.5
     configuration: --enable-libmp3lame --enable-libtheora --enable-libx264
     --enable-libgsm --enable-postproc --enable-libxvid --enable-libfaac --enable-pthreads
     --enable-libvorbis --enable-gpl --enable-x11grab --enable-nonfree
     libavutil     50.36. 0 / 50.36. 0
     libavcore      0.16. 1 /  0.16. 1
     libavcodec    52.108. 0 / 52.108. 0
     libavformat   52.93. 0 / 52.93. 0
     libavdevice   52. 2. 3 / 52. 2. 3
     libavfilter    1.74. 0 /  1.74. 0
     libswscale     0.12. 0 /  0.12. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    FFmpeg SVN-r26402
    libavutil     50.36. 0 / 50.36. 0
    libavcore      0.16. 1 /  0.16. 1
    libavcodec    52.108. 0 / 52.108. 0
    libavformat   52.93. 0 / 52.93. 0
    libavdevice   52. 2. 3 / 52. 2. 3
    libavfilter    1.74. 0 /  1.74. 0
    libswscale     0.12. 0 /  0.12. 0
    libpostproc   51. 2. 0 / 51. 2. 0

    FFMPEG command

    root@server:~# ffmpeg -r 30  -i '/pathTo/public_html/flash/73003_8962011.swf' -vcodec libx264 /pathTo/public_html/flash/out.mp4

    [swf @ 0x16c2510] Estimating duration from bitrate, this may be inaccurate
    Input #0, swf, from '/pathTo/public_html/flash/73003_8962011.swf':
     Duration: N/A, bitrate: N/A
       Stream #0.0: Video: mjpeg, yuvj420p, 360x480, 30 fps, 30 tbr, 30 tbn, 30 tbc
    [buffer @ 0x16d5850] w:360 h:480 pixfmt:yuvj420p
    [libx264 @ 0x16d4d80] broken ffmpeg default settings detected
    [libx264 @ 0x16d4d80] use an encoding preset (e.g. -vpre medium)
    [libx264 @ 0x16d4d80] preset usage: -vpre <speed> -vpre <profile>
    [libx264 @ 0x16d4d80] speed presets are listed in x264 --help
    [libx264 @ 0x16d4d80] profile is optional; x264 defaults to high
    Output #0, mp4, to &#39;/pathTo/public_html/out.mp4&#39;:
       Stream #0.0: Video: libx264, yuvj420p, 360x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    </profile></speed>
  • GStreamer x264 on Linux (ARM)

    8 septembre 2017, par Tõnu Samuel

    Trying to get streaming work with x264 encoding.

    I am doing some black magic with stitching two images which is known to work :

    gst-launch-1.0 -e \
       v4l2src device=/dev/video0 ! \
           video/x-raw,framerate=90/1,width=640,height=480 ! m.sink_0 \
       v4l2src device=/dev/video1 ! \
           video/x-raw,framerate=90/1,width=640,height=480 ! m.sink_1 \
       videomixer name=m sink_1::xpos=640 ! \
       video/x-raw,framerate=90/1,width=1280,height=480 ! \
       xvimagesink

    Now I am trying to get same thing over x264 stream with help of internet :

    gst-launch-1.0 -e \
       v4l2src device=/dev/video0 ! \
           video/x-raw,framerate=90/1,width=640,height=480 ! m.sink_0 \
       v4l2src device=/dev/video1 ! \
           video/x-raw,framerate=90/1,width=640,height=480 ! m.sink_1 \
       videomixer name=m sink_1::xpos=640 ! \
       video/x-raw,framerate=90/1,width=1280,height=480 ! \
       x264enc tune=zerolatency byte-stream=true bitrate=3000 threads=2 ! \
       h264parse config-interval=1 ! \
       rtph264pay ! \
       udpsink host=127.0.0.1 port=5000

    And seems to work because no errors appear. But I see no way to receive image.

    I have tried

    gst-launch-1.0 udpsrc port=5000 ! application/x-rtp ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink

    which does not provide anything useful. Also attempted to use VLC with SDP file :

    c=IN IP4 127.0.0.1
    m=video 5000 RTP/AVP 96
    a=rtpmap:96 H264/3000

    I must be doing something wrong but unsure what.

    EDIT : Question about version of GStreamer. Probably this is information needed :

    ubuntu@tegra-ubuntu:~$  gst-launch-1.0 --version
    gst-launch-1.0 version 1.2.4
    GStreamer 1.2.4
    https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
    ubuntu@tegra-ubuntu:~$



    $ dpkg -l | grep gstreamer
    ii  gir1.2-gstreamer-1.0                                  1.2.4-0ubuntu1.1                                    armhf        Description: GObject introspection data for the GStreamer library
    ii  gstreamer-tools                                       0.10.36-1.2ubuntu3                                  armhf        Tools for use with GStreamer
    ii  gstreamer0.10-alsa:armhf                              0.10.36-1.1ubuntu2                                  armhf        GStreamer plugin for ALSA
    ii  gstreamer0.10-fluendo-mp3:armhf                       0.10.23.debian-3                                    armhf        Fluendo mp3 decoder GStreamer 0.10 plugin
    ii  gstreamer0.10-nice:armhf                              0.1.4-1                                             armhf        ICE library (GStreamer 0.10 plugin)
    ii  gstreamer0.10-plugins-bad:armhf                       0.10.23-7.2ubuntu1.3                                armhf        GStreamer plugins from the "bad" set
    ii  gstreamer0.10-plugins-bad-multiverse                  0.10.21-1ubuntu3                                    armhf        GStreamer plugins from the "bad" set (Multiverse Variant)
    ii  gstreamer0.10-plugins-base:armhf                      0.10.36-1.1ubuntu2                                  armhf        GStreamer plugins from the "base" set
    ii  gstreamer0.10-plugins-base-apps                       0.10.36-1.1ubuntu2                                  armhf        GStreamer helper programs from the "base" set
    ii  gstreamer0.10-plugins-good:armhf                      0.10.31-3+nmu1ubuntu5.2                             armhf        GStreamer plugins from the "good" set
    ii  gstreamer0.10-plugins-ugly:armhf                      0.10.19-2ubuntu5                                    armhf        GStreamer plugins from the "ugly" set
    ii  gstreamer0.10-pulseaudio:armhf                        0.10.31-3+nmu1ubuntu5.2                             armhf        GStreamer plugin for PulseAudio
    ii  gstreamer0.10-tools                                   0.10.36-1.2ubuntu3                                  armhf        Tools for use with GStreamer
    ii  gstreamer0.10-x:armhf                                 0.10.36-1.1ubuntu2                                  armhf        GStreamer plugins for X11 and Pango
    ii  gstreamer1.0-alsa:armhf                               1.2.4-1~ubuntu2                                     armhf        GStreamer plugin for ALSA
    ii  gstreamer1.0-clutter                                  2.0.8-1build1                                       armhf        Clutter PLugin for GStreamer 1.0
    ii  gstreamer1.0-fluendo-mp3:armhf                        0.10.23.debian-3                                    armhf        Fluendo mp3 decoder GStreamer 1.0 plugin
    ii  gstreamer1.0-libav:armhf                              1.2.4-1~ubuntu1                                     armhf        libav plugin for GStreamer
    ii  gstreamer1.0-nice:armhf                               0.1.4-1                                             armhf        ICE library (GStreamer plugin)
    ii  gstreamer1.0-plugins-bad:armhf                        1.2.4-1~ubuntu1.1                                   armhf        GStreamer plugins from the "bad" set
    ii  gstreamer1.0-plugins-bad-faad:armhf                   1.2.4-1~ubuntu1.1                                   armhf        GStreamer faad plugin from the "bad" set
    ii  gstreamer1.0-plugins-bad-videoparsers:armhf           1.2.4-1~ubuntu1.1                                   armhf        GStreamer videoparsers plugin from the "bad" set
    ii  gstreamer1.0-plugins-base:armhf                       1.2.4-1~ubuntu2                                     armhf        GStreamer plugins from the "base" set
    ii  gstreamer1.0-plugins-base-apps                        1.2.4-1~ubuntu2                                     armhf        GStreamer helper programs from the "base" set
    ii  gstreamer1.0-plugins-good:armhf                       1.2.4-1~ubuntu1.3                                   armhf        GStreamer plugins from the "good" set
    ii  gstreamer1.0-plugins-ugly:armhf                       1.2.3-2build1                                       armhf        GStreamer plugins from the "ugly" set
    ii  gstreamer1.0-pulseaudio:armhf                         1.2.4-1~ubuntu1.3                                   armhf        GStreamer plugin for PulseAudio
    ii  gstreamer1.0-tools                                    1.2.4-0ubuntu1.1                                    armhf        Tools for use with GStreamer
    ii  gstreamer1.0-x:armhf                                  1.2.4-1~ubuntu2                                     armhf        GStreamer plugins for X11 and Pango
    ii  libgstreamer-plugins-bad0.10-0:armhf                  0.10.23-7.2ubuntu1.3                                armhf        GStreamer shared libraries from the "bad" set
    ii  libgstreamer-plugins-bad1.0-0:armhf                   1.2.4-1~ubuntu1.1                                   armhf        GStreamer development files for libraries from the "bad" set
    ii  libgstreamer-plugins-base0.10-0:armhf                 0.10.36-1.1ubuntu2                                  armhf        GStreamer libraries from the "base" set
    ii  libgstreamer-plugins-base1.0-0:armhf                  1.2.4-1~ubuntu2                                     armhf        GStreamer libraries from the "base" set
    ii  libgstreamer-plugins-good1.0-0:armhf                  1.2.4-1~ubuntu1.3                                   armhf        GStreamer development files for libraries from the "good" set
    ii  libgstreamer0.10-0:armhf                              0.10.36-1.2ubuntu3                                  armhf        Core GStreamer libraries and elements
    ii  libgstreamer1.0-0:armhf                               1.2.4-0ubuntu1.1                                    armhf        Core GStreamer libraries and elements
    $
  • FFMpeg + Beanstalk : How to pass the processes to it

    14 juillet 2012, par Ilia Rostovtsev

    I'm working around on the video web site ! I have a simple PHP function that is used to start complicated conversion processes. The problem is that FFMpeg and Mencoder are extremely resourceful and having one process of it is something that makes httpd slow down but multiple processes just hang it completely. I want to my conversion processes with Beanstalk (or anything else). Everything is working well right now : converting, logging and etc.

    My concrete question is : How to transfer my current jobs to Beanstalk ?

    I have very simple PHP code :

    RunInBackground(&#39;convert.php&#39;, array($initial_file_name, $vid), $LogFilePath);

    And the function looks also quite clear :

    function RunInBackground($sPHPFile, $aParam = array(), $sLogFile = &#39;&#39;)
    {
       global $config;

       $sCmd = $config[&#39;phppath&#39;] . &#39; &#39; . $config[&#39;BASE_DIR&#39;] . &#39;/&#39; . $sPHPFile;
       foreach ($aParam as $s)
       {
           $sCmd .= &#39; &#39; . $s;
       }


           $sCmd .= &#39; > &#39; . ($sLogFile != &#39;&#39; ? $config[&#39;BASE_DIR&#39;] . &#39;/&#39; . $sLogFile : &#39;/dev/null&#39;);

           if ( iBgProc($sCmd) )
           {
               return true;
           }
           else
           {
               return false;
           }

    }

    function iBgProc($sCmd, $iPrio = 0)
    {
       if ($iPrio)
       {
           $iPID = shell_exec("nohup nice -n $iPrio $sCmd 2> /dev/null &amp; echo $!");
       }
       else
       {
           $iPID = shell_exec("nohup $sCmd 2> /dev/null &amp; echo $!");
       }

       return($iPID);
    }

    Now what would Beanstalk correct code would look like so these processes would NOT start all at the same time if multiple videos are uploaded ?

    If you believe that for my needs is better to use something else but Beanstalk and you know how to implement it, I would be still happy to see it !

    Thanks !