Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (55)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • 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

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (6026)

  • Rails 4.2.8 Using Paperclip With Resque

    27 mars 2017, par AntonioMarquis

    My application uploads training videos to a S3 bucket. I need the transcoding videos to be processed in the background so they don’t tie up the application. I want to use Resque on my dev machine and Heroku. But my jobs continue to fail.

    Model

    has_attached_file :video

    process_in_background :video

    Gems

    gem 'aws-sdk', '< 2.0'
    gem 'paperclip'
    gem 'paperclip-av-transcoder'
    gem "paperclip-ffmpeg"
    gem "ffmpeg"
    gem 'daemons'
    gem 'delayed_paperclip'
    gem 'nokogiri'#, '~> 1.5.9'
    gem 'rmagick'
    gem 'resque', "~> 1.22.0"

    Output from Failed Jobs

    Class ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper

    Arguments {"job_class"=>"DelayedPaperclip::Jobs::ActiveJob", "job_id"=>"111e4f9d-942d-4613-b3cb-0e884581249f", "queue_name"=>"paperclip", "arguments"=>["Video", 30, "source"], "locale"=>"en"}

    Exception NoMethodError

    Error undefined method `call' for "result == false":String

    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:165:in `block in halting'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `block in call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `each'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_source_post_process_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:419:in `block in post_process'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_post_process_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:418:in `post_process'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:112:in `assign'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:322:in `reprocess!'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip/attachment.rb:68:in `process_delayed!'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip.rb:36:in `process_job'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip/jobs/active_job.rb:10:in `perform'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:32:in `block in perform_now'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/i18n-0.8.1/lib/i18n.rb:257:in `with_locale'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/translation.rb:7:in `block (2 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `instance_exec'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `block in make_lambda'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `block in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:23:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:23:in `block (4 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:22:in `block (3 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:43:in `block in tag_logger'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in `tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:43:in `tag_logger'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:19:in `block (2 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `instance_exec'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `block in make_lambda'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `block in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_perform_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:31:in `perform_now'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:21:in `execute'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/queue_adapters/resque_adapter.rb:46:in `perform'
    Powered by Resque v1.22.0
    Connected to Redis namespace resque on redis://127.0.0.1:6379/0
  • No such file or directory Error with custom FFMPEG + CarrierWave method

    10 juillet 2013, par dodgerogers747

    I am using AWS CORS to upload videos to my site, all of which works as planned.

    I have the following model method which runs as an after_create callback (for speed) to take a screenshot from the video file on AWS. I plan to move this out into a delayed job but I don't think this will solve this particular issue. Please advise if mistaken.

    I use FFMPEG to take a screenshot from the AWS self.file location, I then send the file to CarrierWave by saving the file to self.screenshot where it is uploaded to AWS.

    Approx. 50% of the time it errors out with Errno::ENOENT - No such file or directory for the location of the screenshot image.

    How can I rectify my code to remove this error and how come it only occurs around 50% of the time ? If anyone needs more code just shout.

    video.rb

    after_create :take_screenshot

    mount_uploader :screenshot, ImageUploader

     def take_screenshot
       location = "#{Rails.root}/public/uploads/tmp/screenshots/#{unique}_#{File.basename(file)}.jpg"
       system `ffmpeg #{log_level} -i #{self.file} -ss 00:00:0#{time_frame} -vframes 1 #{location}`
       logger.debug "Trying to take screenshot from #{self.file}"
       #pass the actual file to CarrierWave to handle the image upload
       self.screenshot = File.open(location)
       self.save
       logger.debug "Deleting tmp file: #{location}: #{File.delete(location)}" if self.screenshot.present?
     end

    def unique
       (0..6).map{(65+rand(26)).chr}.join
     end

    def log_level
       "-loglevel panic"
     end

     def time_frame
       rand(0..3)
     end

    Stack trace :

    Started POST "/videos" for 127.0.0.1 at 2013-07-10 03:58:49 +0800
    Processing by VideosController#create as JS
     Parameters: {"utf8"=>"✓", "authenticity_token"=>"6M1Ia+Ag2E3HVKH2PO/p7jewxSpMPdWeVHGA933Bzjw=", "video"=>{"file"=>"http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v"}}
     User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 9 LIMIT 1
      (0.1ms)  BEGIN
     SQL (0.2ms)  INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-07-09 19:58:49', 'http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v', NULL, NULL, '2013-07-09 19:58:49', 9)
    Trying to take screenshot from http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v
      (0.8ms)  ROLLBACK
    Completed 500 Internal Server Error in 3550ms

    Errno::ENOENT - No such file or directory - /Users/me/rails/project/public/uploads/tmp/screenshots/WCACLIC_Good_7iron.m4v.jpg:
     app/models/video.rb:24:in `initialize'
     app/models/video.rb:24:in `open'
     app/models/video.rb:24:in `take_screenshot'
  • No such file or directory Error with FFMPEG + CarrierWave screenshot method

    10 juillet 2013, par dodgerogers747

    I am using AWS CORS to upload videos to my site, all of which works as planned.

    I have the following model method which runs as an after_create callback (for speed) to take a screenshot from the video file on AWS. I plan to move this out into a delayed job but I don't think this will solve this particular issue. Please advise if mistaken.

    I use FFMPEG to take a screenshot from the AWS self.file location, I then send the file to CarrierWave by saving the file to self.screenshot where it is uploaded to AWS.

    Approx. 50% of the time it errors out with Errno::ENOENT - No such file or directory for the location of the screenshot image.

    How can I rectify my code to remove this error and how come it only occurs around 50% of the time ? If anyone needs more code just shout.

    video.rb

    after_create :take_screenshot

    mount_uploader :screenshot, ImageUploader

     def take_screenshot
       location = "#{Rails.root}/public/uploads/tmp/screenshots/#{unique}_#{File.basename(file)}.jpg"
       system `ffmpeg #{log_level} -i #{self.file} -ss 00:00:0#{time_frame} -vframes 1 #{location}`
       logger.debug "Trying to take screenshot from #{self.file}"
       #pass the actual file to CarrierWave to handle the image upload
       self.screenshot = File.open(location)
       self.save
       logger.debug "Deleting tmp file: #{location}: #{File.delete(location)}" if self.screenshot.present?
     end

    def unique
       (0..6).map{(65+rand(26)).chr}.join
     end

    def log_level
       "-loglevel panic"
     end

     def time_frame
       rand(0..3)
     end

    Stack trace :

    Started POST "/videos" for 127.0.0.1 at 2013-07-10 03:58:49 +0800
    Processing by VideosController#create as JS
     Parameters: {"utf8"=>"✓", "authenticity_token"=>"6M1Ia+Ag2E3HVKH2PO/p7jewxSpMPdWeVHGA933Bzjw=", "video"=>{"file"=>"http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v"}}
     User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 9 LIMIT 1
      (0.1ms)  BEGIN
     SQL (0.2ms)  INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-07-09 19:58:49', 'http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v', NULL, NULL, '2013-07-09 19:58:49', 9)
    Trying to take screenshot from http://bucketname.s3.amazonaws.com/uploads/video/file/671a87fb-91de-4eaf-a38a-1b25c51798e5/Good_7iron.m4v
      (0.8ms)  ROLLBACK
    Completed 500 Internal Server Error in 3550ms

    Errno::ENOENT - No such file or directory - /Users/me/rails/project/public/uploads/tmp/screenshots/WCACLIC_Good_7iron.m4v.jpg:
     app/models/video.rb:24:in `initialize'
     app/models/video.rb:24:in `open'
     app/models/video.rb:24:in `take_screenshot'