Recherche avancée

Médias (91)

Autres articles (69)

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

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (5049)

  • 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
  • "File doesn't exist" - streamio FFMPEG on screenshot after create method

    3 mai 2013, par dodgerogers747

    I have videos being directly uploaded to S3 using Amazon's CORS configuration. Videos are uploaded via a dedicated S3 form, once they have been uploaded successfully the URL of the video is appended to the @video.file hidden_field via javascript and then the video saves.

    I can't get this after_save method to work which takes a screenshot of the video and saves it to S3 via carrierwave after the video has been saved as a rails object. ( It was previously working using a carrierwave video upload instance )

    It errors out withErrno::ENOENT - No such file or directory - the file 'http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video_name.m4v' does not exist: I have tried running this method as a class method to call it from the console but it always comes back with the same error, even though the video exists.

    My bucket is set to public, read and write. How come it doesn't think the file exists ?

    If anyone needs more code just shout, thanks in advance.

    application trace

    Started POST "/videos" for 127.0.0.1 at 2013-05-03 10:48:07 -0700
    Processing by VideosController#create as JS
     Parameters: {"utf8"=>"✓", "authenticity_token"=>"MAHxrVcmPDtVIMfDWZBwL0YnzaAaAe1PTGip5M4OVoY=", "video"=>{"user_id"=>"5", "file"=>"http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v"}}
     User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1
      (0.1ms)  BEGIN
     SQL (20.5ms)  INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-05-03 17:48:07', 'http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v', NULL, NULL, '2013-05-03 17:48:07', 5)
      (44.0ms)  ROLLBACK
    Completed 500 Internal Server Error in 71ms

    Errno::ENOENT - No such file or directory - the file 'http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v' does not exist:
     (gem) streamio-ffmpeg-0.9.0/lib/ffmpeg/movie.rb:10:in `initialize'
     app/models/video.rb:25:in `new'
     app/models/video.rb:25:in `take_screenshot'

    video.rb

     attr_accessible :user_id, :question_id, :file, :screenshot
     belongs_to :question
     belongs_to :user

     default_scope order('created_at DESC')

     after_create :take_screenshot

     mount_uploader :screenshot, ImageUploader

     validates_presence_of :user_id, :file

     def take_screenshot
       FFMPEG.ffmpeg_binary = '/opt/local/bin/ffmpeg'
       movie = FFMPEG::Movie.new("#{self.file}")
       self.screenshot = movie.screenshot("#{Rails.root}/public/uploads/tmp/screenshots/#{File.basename(self.file)}.jpg", seek_time: 2 )
       self.save!
     end

    videos/_form.html.erb

    <form action="http://bucket-name.s3.amazonaws.com" data-remote="true" class="direct-upload" enctype="multipart/form-data" method="post">
     <input type="hidden" />
     <input type="hidden" value="ACCESS_KEY" />
     <input type="hidden" value="public-read" />
     <input type="hidden" />
     <input type="hidden" />
     <input type="hidden" value="201" />
     <input type="file" />
    </form>

    &lt;%= form_for @video, html: { multipart: true, id: "new_video" }, remote: true do |f| %>
           &lt;% if @video.errors.any? %>
       <div>
       <h2>&lt;%= pluralize(@video.errors.count, "error") %> prohibited this post from being saved:</h2>

     <ul>
       &lt;% @video.errors.full_messages.each do |msg| %>
           <li>&lt;%= msg %></li>
           &lt;% end %>
       </ul>
       </div>
    &lt;% end %>

       &lt;%= f.hidden_field :user_id, value: current_user.id %>
       &lt;%= f.hidden_field :file %><br />

       &lt;% end %>

    ImageUploader

    class ImageUploader &lt; CarrierWave::Uploader::Base

     include CarrierWave::RMagick

      include Sprockets::Helpers::RailsHelper
      include Sprockets::Helpers::IsolatedHelper

     storage :fog

     before :store, :remember_cache_id
     after :store, :delete_tmp_dir

       def cache_dir
         Rails.root.join(&#39;public/uploads/tmp/&#39;)
       end

       def remember_cache_id(new_file)
         @cache_id_was = cache_id
       end

       def delete_tmp_dir(new_file)
         if @cache_id_was.present? &amp;&amp; @cache_id_was =~ /\A[\d]{8}\-[\d]{4}\-[\d]+\-[\d]{4}\z/
           FileUtils.rm_rf(File.join(root, cache_dir, @cache_id_was))
         end
       end

     process resize_and_pad: [306, 150, &#39;#000&#39;]

     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end

     def extension_white_list
       %w(jpg)
       # %w(ogg ogv 3gp mp4 m4v webm mov)
     end
  • How to broadcast a stream of Buffered Images to another computer over LAN network by using Java Core

    12 janvier 2017, par Trung Thanh Ngo

    I am working with raspberry pi 3 acting as a server which controls a Sony camera (HX400V model). I am able to use Sony Remote API to control the Pi to extract buffered images in the Sony camera’s liveview stream.

    I want to create and broadcast a stream of those buffered images to another computer over LAN network.

    I succeeded in sending those buffered images by using java socket but there was a delay of 2 seconds which is not good. The Pi acts as a socket client and the other computer acts as a socket server.

    Is there any way to create a stream and broadcast smoothly to another computer by using Java or anything else ?