Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (17)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

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

Sur d’autres sites (5190)

  • "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
  • Meteor edit audio files on the server

    28 décembre 2015, par Mohammed Hussein

    I am building a Meteor application to split uploaded audio files
    I upload the audio files and store them using GridFS

    child = Npm.require(’child_process’) ;

    var fs = Npm.require('fs');


    storagePath= fs.realpathSync(process.env.PWD+'/audio');
    StaticServer.add('/audio', clipsPath);

    and then using a method i split the audio file using
    child.exec(command) ;

    the command is the ffmpeg command used to cut the source audio file and store it on the storagePath

    the application worked fine locally but when I tried to deploy it to digital ocian i got errors , stating that the file /audio doesnot exist
    I use mupx to deploy and the error appears after "verifying deployment"

    here is the error

       -----------------------------------STDERR-----------------------------------
       eteor-dev-bundle@0.0.0 No README data
       => Starting meteor app on port:80

       /bundle/bundle/programs/server/node_modules/fibers/future.js:245
                                                       throw(ex);
                                                             ^
       Error: ENOENT, no such file or directory '/bundle/bundle/audio'
           at Object.fs.lstatSync (fs.js:691:18)
           at Object.realpathSync (fs.js:1279:21)
           at server/startup.js:10:20
           at /bundle/bundle/programs/server/boot.js:249:5
       npm WARN package.json meteor-dev-bundle@0.0.0 No description
       npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
       npm WARN package.json meteor-dev-bundle@0.0.0 No README data
       => Starting meteor app on port:80

       /bundle/bundle/programs/server/node_modules/fibers/future.js:245
                                                       throw(ex);
                                                             ^
       Error: ENOENT, no such file or directory '/bundle/bundle/audio'
           at Object.fs.lstatSync (fs.js:691:18)
           at Object.realpathSync (fs.js:1279:21)
           at server/startup.js:10:20
           at /bundle/bundle/programs/server/boot.js:249:5

       => Redeploying previous version of the app

       -----------------------------------STDOUT-----------------------------------

       To see more logs type 'mup logs --tail=50'

       ----------------------------------------------------------------------------

    the main quistion is , how to i generate an output file using ffmpeg command and store it in a place where I can access it and display it on the browser

  • avutil/mem : Handle fast allocations near UINT_MAX properly

    5 juillet 2022, par Andreas Rheinhardt
    avutil/mem : Handle fast allocations near UINT_MAX properly
    

    av_fast_realloc and av_fast_mallocz ? store the size of
    the objects they allocate in an unsigned. Yet they overallocate
    and currently they can allocate more than UINT_MAX bytes
    in case a user has requested a size of about UINT_MAX * 16 / 17
    or more if SIZE_MAX > UINT_MAX (and if the user increased
    max_alloc_size via av_max_alloc). In this case it is impossible
    to store the true size of the buffer via the unsigned* ;
    future requests are likely to use the (re)allocation codepath
    even if the buffer is actually large enough because of
    the incorrect size.

    Fix this by ensuring that the actually allocated size
    always fits into an unsigned. (This entails erroring out
    in case the user requested more than UINT_MAX.)

    Reviewed-by : Tomas Härdin <tjoppen@acc.umu.se>
    Reviewed-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavutil/mem.c