Recherche avancée

Médias (91)

Autres articles (71)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

Sur d’autres sites (6397)

  • Rails : Encoder error when converting video using FFMPEG on Heroku

    2 janvier 2013, par andmcgregor

    I'm trying to upload a video and convert the file to mp4 and reduce the file size using the paperclip-ffmpeg and paperclip gems. Everything works fine running a local server and I'm only getting this problem on heroku. I have ffmpeg installed in vendor/ffmpeg/ (I followed these steps : https://gist.github.com/3963576). Here is the code I've got and the error I'm getting :

    models/video.rb :

    class Video < ActiveRecord::Base
     attr_accessible :content, :user_id, :video
     has_attached_file :video , :styles => {
       :medium => { :geometry => "500x500", :format => 'mp4',
           :convert_options => { :output => { :vcodec => 'libx264',
           :b => '1000k', :bt => '200k',
           :acodec => 'libfaac', :ab => '56k', :ac => 2 } } }
     }, :processors => [:ffmpeg]

     belongs_to :user
    end

    when I run heroku logs :

    2013-01-02T00:38:20+00:00 app[web.1]: Started POST "/videos" for 101.170.255.251 at 2013-01-02 00:38:20 +0000
    2013-01-02T00:38:20+00:00 app[web.1]: Processing by VideosController#create as HTML
    2013-01-02T00:38:20+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"X0IKts46TF8aFvEb1I/szFo/28omlVBXIIyJ3APz3YA=", "video"=>{"content"=>"", "video"=>#quicktime\r\n", @tempfile=#tmp/RackMultipart20130102-2-1ch9zcp>>}, "commit"=>"Post"}
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] ffmpeg -i "/tmp/sample20130102-2-4j5sgh.mov" 2>&1
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Resize
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Command Success
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Making...
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Building Destination File: 'sample20130102-2-4j5sgh' + 'mp4'
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Destination File Built
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Adding Source
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Adding Geometry
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Convert Options: 500x280
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Adding Format
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] -i :source -y -vcodec libx264 -b 1000k -bt 200k -acodec libfaac -ab 56k -ac 2 -s 500x280 :dest
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Extracting Target Dimensions
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Building Parameters
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Target Size is Available
    2013-01-02T00:38:20+00:00 app[web.1]: [paperclip] [ffmpeg] Keeping Aspect Ratio
    2013-01-02T00:38:20+00:00 app[web.1]: Command :: ffmpeg -i '/tmp/sample20130102-2-4j5sgh.mov' -y -vcodec libx264 -b 1000k -bt 200k -acodec libfaac -ab 56k -ac 2 -s 500x280 '/tmp/sample20130102-2-4j5sgh20130102-2-1mr35ix.mp4'
    2013-01-02T00:38:20+00:00 app[web.1]: ffmpeg version git-2013-01-01-d079d1d Copyright (c) 2000-2012 the FFmpeg developers
    2013-01-02T00:38:20+00:00 app[web.1]:   built on Jan  1 2013 12:59:49 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
    2013-01-02T00:38:20+00:00 app[web.1]:   configuration: --enable-shared --disable-asm --prefix=/app/vendor/ffmpeg
    2013-01-02T00:38:20+00:00 app[web.1]:   libavfilter     3. 30.102 /  3. 30.102
    2013-01-02T00:38:20+00:00 app[web.1]:   libavcodec     54. 85.100 / 54. 85.100
    2013-01-02T00:38:20+00:00 app[web.1]:   libavdevice    54.  3.102 / 54.  3.102
    2013-01-02T00:38:20+00:00 app[web.1]:   libavutil      52. 13.100 / 52. 13.100
    2013-01-02T00:38:20+00:00 app[web.1]:   libswresample   0. 17.102 /  0. 17.102
    2013-01-02T00:38:20+00:00 app[web.1]:   libswscale      2.  1.103 /  2.  1.103
    2013-01-02T00:38:20+00:00 app[web.1]:   libavformat    54. 58.100 / 54. 58.100
    2013-01-02T00:38:21+00:00 app[web.1]:     creation_time   : 2013-01-02 00:36:58
    2013-01-02T00:38:21+00:00 app[web.1]:     minor_version   : 0
    2013-01-02T00:38:21+00:00 app[web.1]:     major_brand     : qt  
    2013-01-02T00:38:21+00:00 app[web.1]: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/sample20130102-2-4j5sgh.mov':
    2013-01-02T00:38:21+00:00 app[web.1]:     model           : iPhone 4
    2013-01-02T00:38:21+00:00 app[web.1]:     compatible_brands: qt  
    2013-01-02T00:38:21+00:00 app[web.1]:     model-eng       : iPhone 4
    2013-01-02T00:38:21+00:00 app[web.1]:     make-eng        : Apple
    2013-01-02T00:38:21+00:00 app[web.1]:     date-eng        : 2012-12-28T00:39:34+1100
    2013-01-02T00:38:21+00:00 app[web.1]:     encoder         : 6.0
    2013-01-02T00:38:21+00:00 app[web.1]:     encoder-eng     : 6.0
    2013-01-02T00:38:21+00:00 app[web.1]:   Duration: 00:00:00.03, start: 0.000000, bitrate: 9465 kb/s
    2013-01-02T00:38:21+00:00 app[web.1]:     Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 75 kb/s
    2013-01-02T00:38:21+00:00 app[web.1]:     date            : 2012-12-28T00:39:34+1100
    2013-01-02T00:38:21+00:00 app[web.1]:       creation_time   : 2013-01-02 00:36:58
    2013-01-02T00:38:21+00:00 app[web.1]:     make            : Apple
    2013-01-02T00:38:21+00:00 app[web.1]:   Metadata:
    2013-01-02T00:38:21+00:00 app[web.1]:     Metadata:
    2013-01-02T00:38:21+00:00 app[web.1]:       handler_name    : Core Media Data Handler
    2013-01-02T00:38:21+00:00 app[web.1]:     Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 8605 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc
    2013-01-02T00:38:21+00:00 app[web.1]:     Metadata:
    2013-01-02T00:38:21+00:00 app[web.1]:       handler_name    : Core Media Data Handler
    2013-01-02T00:38:21+00:00 app[web.1]: Unknown encoder 'libx264'
    2013-01-02T00:38:21+00:00 app[web.1]: Please use -b:a or -b:v, -b is ambiguous
    2013-01-02T00:38:21+00:00 app[web.1]:       creation_time   : 2013-01-02 00:36:58
    2013-01-02T00:38:21+00:00 app[web.1]: [paperclip] An error was received while processing: #
    2013-01-02T00:38:21+00:00 app[web.1]:   Rendered videos/new.html.erb within layouts/application (3.2ms)
    2013-01-02T00:38:21+00:00 heroku[router]: at=info method=POST path=/videos host=stark-sea-5654.herokuapp.com fwd=101.170.255.251 dyno=web.1 queue=0 wait=0ms connect=3ms service=3685ms status=200 bytes=1878
    2013-01-02T00:38:21+00:00 app[web.1]:   Rendered layouts/_footer.html.erb (0.0ms)
    2013-01-02T00:38:21+00:00 app[web.1]: Completed 200 OK in 342ms (Views: 124.8ms | ActiveRecord: 10.4ms)
    2013-01-02T00:38:21+00:00 app[web.1]:   Rendered layouts/_header.html.erb (1.2ms)

    Everything works fine until the message Unknown encoder 'libx264' so I'm thinking it's something to do with ffmpeg perhaps ?

  • Simulating TV noise

    16 février 2017, par Alexander Kulyakhtin

    I have googled a bit but was never able to find an answer. What should be my first approach to simulate a video and audio noise from TV on screen ? I mean, when my TV antenna is removed but the TV is still on (like they show in Japanese horror movies sometimes). I can use ffmpeg or any other technique but what is the simplest possible form of the signal ?

  • Run ffmpeg using shell_exec from a file called by AJAX

    20 décembre 2012, par user1255617

    Good morning,

    I will do my best to phrase a "thoughtful" and "helpful" question for all regarding running FFMPEG using shell_exec from a file called by AJAX. First I will start by listing my current code.

    AJAX script

           <code class="echappe-js">&lt;script&gt;<br />
               var xmlhttp;<br />
               if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari<br />
                 xmlhttp=new XMLHttpRequest();<br />
               }else{// code for IE6, IE5<br />
                 xmlhttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br />
               }<br />
               xmlhttp.onreadystatechange=function(){<br />
                 if (xmlhttp.readyState==4 &amp;amp;&amp;amp; xmlhttp.status==200){<br />
                     //Do something<br />
                 }<br />
               }<br />
               xmlhttp.open(&quot;GET&quot;,&quot;video_convert.php&quot;,true);<br />
               xmlhttp.setRequestHeader(&quot;Content-type&quot;,&quot;application/x-www-form-urlencoded&quot;);<br />
               xmlhttp.send(id=&amp;lt;?php echo $video_upload_result; ?&gt;);<br />
           &lt;/script&gt;

    PHP Code

    $destination = "files/videos/";
    $ffmpeg = &#39;/ffmpeg/ffmpeg&#39;;
    $videoid = mysql_clean($_GET[&#39;id&#39;]);

    $sql = "SELECT file_name FROM cb_video WHERE videoid = &#39;$videoid&#39; ";
    $result = mysql_query($sql);
    $row = mysql_fetch_assoc($result);

    $file_old = glob(&#39;files/videos/&#39;.$file_name.&#39;.*&#39;);

    shell_exec($ffmpeg." -i &#39;/var/www/html/".$file_old[0]."&#39; -ar 44100 /var/www/html/".$destination.$file_name.".flv");

    FFMPEG is installed and working properly as I have used it elsewhere on the site and have attempted a file conversion using PuTTY. I am able to run a PHP file called by AJAX as I have done it in a separate instance on this site. The only thing I can think of is that the shell_exec isn't running properly, which I have used elsewhere, since it is in a separate file called by ajax or else it is being closed pre-maturely. I have also tested this code in a main file and it works properly until I try to call the separate file with it in it.

    So, my question is can this code actually work and if so what steps should I take to get it working ?

    Also I would greatly appreciate it if before closing my questions I had a chance to defend or rephrase them to properly suit this boards high standards for questions if I have somehow failed it in any way.

    Thank you.