
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (73)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (12124)
-
Permission denied when trying to call ffmpeg on heroku
1er décembre 2013, par chuck wI have a rails 3.1 web app on Heroku (cedar) that that allows users to post stories with photo and video attachments using the paperclip gem (3.5.1). Uploads are stored on s3. This has been working 100% for many months.
I have recently added video transcoding and thumbnailing to my dev machine with the paperclip-ffmpeg gem (1.0.1) and ffmpeg running locally. This is also working.
I've followed these instructions to build and install ffmpeg on heroku, and I've altered my Heroku app's path so that it reads as follows :
PATH: bin:vendor/ffmpeg/bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
and my app's LD_LIBRARY_PATH so that it reads as follows :
LD_LIBRARY_PATH: vendor/ffmpeg/lib:/usr/local/lib
Finally, I've vendored ffmpeg into my app with the following structure :
When I commit and push these changes to Heroku and POST a story that has a video I get the following output on Heroku logs :
2013-11-30T22:51:46.711010+00:00 app[web.1]: Started POST "/stories" for 71.80.218.93 at
2013-11-30 22:51:46 +0000
2013-11-30T22:51:47.023119+00:00 app[web.1]: Cocaine::ExitStatusError (Command 'ffprobe
"/tmp/sideways video20131130-2-14w1q4j.mp4" 2>&1' returned 126. Expected 0
2013-11-30T22:51:47.023119+00:00 app[web.1]: Here is the command output:
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023119+00:00 app[web.1]: app/controllers/stories_controller.rb:11:in
`create'
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.019228+00:00 heroku[router]: at=info method=POST path=/stories
host=myapp.herokuapp.com fwd="71.80.218.93" dyno=web.1 connect=1ms
service=3130ms status=500 bytes=754
2013-11-30T22:51:47.023119+00:00 app[web.1]:
2013-11-30T22:51:47.023600+00:00 app[web.1]: cache: [POST /stories] invalidate, pass
2013-11-30T22:51:47.023119+00:00 app[web.1]: sh: ffprobe: Permission denied
2013-11-30T22:51:47.023119+00:00 app[web.1]: ):Also, running the console command :
heroku run "ffmpeg -version" -a myapp
returns :Running ffmpeg -version attached to terminal... up, run.6591
bash: vendor/ffmpeg/bin/ffmpeg: Permission deniedHere is my Post model paperclip set-up :
class Post < ActiveRecord::Base
attr_accessible :contents, :photo, :video
belongs_to :story, :touch => true
belongs_to :user, :touch => true
has_attached_file :photo,
:styles => {
:thumb => ["100x140>", :jpg],
:medium => ["400x400>", :jpg],
:large => ["800x800>", :jpg]
},
:processors => [:thumbnail],
:storage => :s3,
:s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
:path => "/:style/:id/:filename"
has_attached_file :video,
:storage => :s3,
:s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
:path => "/video/:id/:filename",
:styles => {
:thumb => { :geometry => "140x100#", :format => 'jpg', :time => 10 },
:medium => { :geometry => "480x360", :format => 'mp4' },
}, :processors => [:ffmpeg]Why am I getting these "permission denieds" ? Any help would be greatly appreciated !!!
-
Paperclip with heroku and paperclip, migration fails
2 décembre 2013, par jdartlandI have a created ruby on rails application and I'm using paperclip to handle my file uploads.
Paperclip works just fine on my local machine. But my video upload stops working when I deploy to Heroku. Does anyone know whats going wrong. I also get an error when I try to upload a video which says that the video filename does not exist. The photo upload works but not the Video, I'm using paperclip iwth nested attributes and ffmpeg.Upload Error log :
Paperclip::Error (Asset model missing required attr_accessor for 'video_file_name')
2013-12-02T14:38:16.867747+00:00 app[web.1]: Paperclip::Error (Asset model missing required attr_accessor for 'video_file_name'):
2013-12-02T14:38:16.867747+00:00 app[web.1]: app/controllers/projects_controller.rb:60:in `block in update'
2013-12-02T14:38:16.867747+00:00 app[web.1]: app/controllers/projects_controller.rb:59:in `update'Here is my migration error :
Migrating to AddAttachmentPhotoToAssets (20131021134721)
== AddAttachmentPhotoToAssets: migrating =====================================
-- change_table(:assets)
-> 0.0273s
== AddAttachmentPhotoToAssets: migrated (0.0276s) ============================
Migrating to AddProjectIdToAssets (20131022082744)
-- add_column(:assets, :project_id, :integer)
PG::DuplicateColumn: ERROR: column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
-- add_column(:assets, :project_id, :integer)
PG::DuplicateColumn: ERROR: column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
rake aborted!
PG::DuplicateColumn: ERROR: column "project_id" of relation "assets" already exists
: ALTER TABLE "assets" ADD COLUMN "project_id" integer
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:360:in `add_column'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/schema_statements.rb:379:in `add_column'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:625:in `block in method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:597:in `block in say_with_time'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:597:in `say_with_time'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:617:in `method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:383:in `method_missing'
/app/db/migrate/20131022082744_add_project_id_to_assets.rb:2:in `'
/app/db/migrate/20131022082744_add_project_id_to_assets.rb:1:in `<top>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:718:in `load_migration'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:714:in `migration'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:708:in `disable_ddl_transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:1012:in `use_transaction?'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:922:in `rescue in block in migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:919:in `block in migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
</top></top>Here is my table :
create_table "assets", force: true do |t|
t.datetime "created_at"
t.datetime "updated_at"
t.string "photo_file_name"
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
t.integer "project_id"
t.string "video_file_name"
t.string "video_content_type"
t.integer "video_file_size"
t.datetime "video_updated_at"
end
add_index "projects", ["permalink"], name: "index_projects_on_permalink", using: :btree
create_table "settings", force: true do |t|
t.string "title"
t.text "description"
t.text "paragraph"
t.datetime "created_at"
t.datetime "updated_at"
t.string "photo_file_name"
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
t.string "video_file_name"
t.string "video_content_type"
t.integer "video_file_size"
t.datetime "video_updated_at"
endWould gladly need some help ! :)
-
Raising and Rescuing Custom Exception
24 décembre 2013, par cmwI'm using Rails 3 with Carrierwave and FFMPEG to handle video uploads and encoding.
In my uploader, I'm using FFMPEG to grab the duration of the video from cache before storing it.
I'd like to raise a custom exception if the video's duration exceeds a specific length and then route the user accordingly. I've spent quite a bit of time trying to figure out how to create, raise and rescue my own custom exceptions in Rails – but, I've had no luck.
Some posts I've used to try to piece this together include this stack overflow post and this article on customized exception handling in Rails 3. I've had no luck yet.
I'm hoping someone can offer guidance on the proper approach to this. My mind is blown.
Below is what my uploader looks like :
class VideoUploader < CarrierWave::Uploader::Base
before :store, :ffmpeg
# Set storage type
storage :fog
# Override the directory where uploaded files will be stored.
def store_dir
"#{model.class.to_s.underscore}/videos/#{model.id}"
end
# Add a white list of extensions which are allowed to be uploaded.
def extension_white_list
%w(mov avi mp4 mkv wmv mpg)
end
def full_cache_path
"#{::Rails.root}/public/#{cache_dir}/#{cache_name}"
end
private
def ffmpeg(*args)
@model.video.cache_stored_file!
movie = FFMPEG::Movie.new("#{model.video.full_cache_path}")
if movie.duration > 600
raise "my custom exception will go here one day"
end
end
end