Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (95)

  • Les sons

    15 mai 2013, par
  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (10269)

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

  • Background Video Processing with Rails

    23 octobre 2013, par Matthew Snyder

    I am trying to get uploaded videos to be converted in the background, running windows. Some of what I am using :

    gem 'paperclip'
    gem 'delayed_job_active_record'
    gem 'ffmpeg'

    I have edited the registry to allow the ffmpeg command to be ran from anywhere, I get a popup that I assume is ffmpeg because it goes away too quickly, guess the command is wrong so if anyone knows what's wrong with it please let me know. But the real problem is that it just hangs there, it says :

    [2012-12-09 22:47:03] ERROR invalid body size.
    [2012-12-09 22:47:03] ERROR Errno::ECONNABORTED: An established connection was a
    borted by the software in your host machine.
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `write'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `<<'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `_write_data'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:368:i
    n `send_body_string'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:249:i
    n `send_body'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:152:i
    n `send_response'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:110:in
    `run'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `blo
    ck in start_thread'

    Does anyone know how to properly get this working ? I've went through a few tutorials that have bits and pieces of what I need but I can't get them working together. Here's what I have so far, lemme know if you need more :

    Model :

    class Video < ActiveRecord::Base

     belongs_to :user
     has_many :comments, dependent: :destroy
     attr_accessible :video, :user_id, :video_file_name, :title, :public, :description, :views

     has_attached_file :video, url: "/users/:user_id/videos/:id/:basename_:style.:extension"

     #process_in_background :video #causes death

     validates :video, presence: true
     validates :description, presence: true, length: { minimum: 5, maximum: 100}
     validates :title, presence: true, length: { minimum: 1, maximum: 15 }

     validates_attachment_size :video, less_than: 1.gigabytes
     validates_attachment :video, presence: true

     default_scope order: 'created_at DESC'

     Paperclip.interpolates :user_id do |attachment, style|attachment.instance.user_id
     end

     #before_post_process do |video|
      # false if video.status == "converting"
     #end

     def perform
       command = <<-end_command
         start ffmpeg -i #{ '/public/users/:user_id/videos/:id/:basename_:style.:extension' }  -ar 22050 -ab 32 -s 1280x720 -vcodec webm -r 25 -qscale 8 -f webm -y #{ '/public/users/:user_id/videos/:id/:basename_.webm' }

       end_command
       success = system(command)
       logger.debug 'Converting File: ' + success.to_s
       if success && $?.exitstatus.to_i == 0
         #self.converted!
         self.status = "converted"
       else
         #self.failure!
         self.status = "failed"
       end
     end

     handle_asynchronously :perform

     def self.search(search)
       if search
         find(:all, conditions: ["public = 't' AND title LIKE ?", "%#{search}%"], order: "created_at DESC")
       else
         find(:all, conditions: ["public = 't'"], order: "created_at DESC")
       end
     end

     def self.admin_search(search)
       if search
         find(:all, conditions: ['title LIKE ?', "%#{search}%"], order: "created_at DESC")
       else
         find(:all, order: "created_at DESC")
       end
     end

     private

       # This updates the stored filename with the new flash video file
       def set_new_filename
         #update_attribute(:filename, "#{filename}.#{id}.webm")
         update_attribute(:content_type, "video/x-webm")
       end

    end

    Controller :

    class VideosController < ApplicationController
       before_filter :signed_in_user, only: [:upload, :update, :destroy]
       before_filter :admin_user, only: :admin_index

       def upload
           @video = Video.new
           # generate a unique id for the upload
           @uuid = (0..29).to_a.map {|x| rand(10)}
       end

       def create
           @video = Video.new(params[:video])
           @video.user_id = current_user.id

           if @video.save
               @video.delay.perform
               flash[:success] = "Uploaded Succefully!"
               redirect_to @video.user
               Delayed::Worker.new.start
           else
               render 'upload'
           end
       end

       def show
           @video = Video.find(params[:id])
           @comments = @video.comments.paginate(page: params[:page], per_page: 6)
           if !@video.public
               if !signed_in? || current_user.id != @video.user_id  && !current_user.admin && !current_user.approved?(@video.user)
               flash[:notice] = "Video is private"
               redirect_to root_path
           end
       end
       end

       def update
           @video = Video.find(params[:id])
           if @video.update_attributes(params[:video])
         flash[:success] = "Video preferences saved"
       else
           flash[:fail] = "Failed to update video preferences"
       end
       redirect_to :back
     end

       def destroy
           @video = Video.find(params[:id])
           @video.destroy
           flash[:deleted] = "Deleted Succefully!"
           redirect_to :back
       end

       def index
           @videos = Video.paginate(page: params[:page], per_page: 6).search(params[:search])
       end

       def admin_index
           @videos = Video.paginate(page: params[:page], per_page: 6).admin_search(params[:search])
       end

       def ajax_video_comments
           @video = Video.find(params[:id])
           @comments = @video.comments.paginate(page: params[:page], per_page: 6)

           respond_to do |format|
           format.js   { render partial: 'shared/comments', content_type: 'text/html' }
       end
       end

       def ajax_video_watched
           @video = Video.find(params[:id])
           @video.views += 1
           @video.save
       end

       private

       def signed_in_user
           redirect_to root_path, notice: "Please Login." unless signed_in?
       end

       def admin_user
           redirect_to(root_path) unless current_user.admin?
       end

    end
  • lavf/riff : Fix a comment.

    18 octobre 2013, par Carl Eugen Hoyos
    lavf/riff : Fix a comment.
    

    FourCC aivx refers to (Sony) XAVC, not (Panasonic) AVC-Intra.
    Spotted by Kieran Kunhya and Vincent Olivier.

    • [DH] libavformat/isom.c