Recherche avancée

Médias (91)

Autres articles (59)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9111)

  • 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'
  • Revision 8d3d2b76f3 : Tx size selection enhancements (1) Refines the modeling function and uses that

    22 juin 2013, par Deb Mukherjee

    Changed Paths :
     Modify /vp9/common/vp9_blockd.h


     Modify /vp9/encoder/vp9_encodeframe.c


     Modify /vp9/encoder/vp9_onyx_if.c


     Modify /vp9/encoder/vp9_onyx_int.h


     Modify /vp9/encoder/vp9_rdopt.c



    Tx size selection enhancements

    (1) Refines the modeling function and uses that to add some speed
    features. Specifically, intead of using a flag use_largest_txfm as
    a speed feature, an enum tx_size_search_method is used, of which
    two of the types are USE_FULL_RD and USE_LARGESTALL. Two other
    new types are added :
    USE_LARGESTINTRA (use largest only for intra)
    USE_LARGESTINTRA_MODELINTER (use largest for intra, and model for
    inter)

    (2) Another change is that the framework for deciding transform type
    is simplified to use a heuristic count based method rather than
    an rd based method using txfm_cache. In practice the new method
    is found to work just as well - with derf only -0.01 down.
    The new method is more compatible with the new framework where
    certain rd costs are based on full rd and certain others are
    based on modeled rd or are not computed. In this patch the existing
    rd based method is still kept for use in the USE_FULL_RD mode.
    In the other modes, the count based method is used.
    However the recommendation is to remove it eventually since the
    benefit is limited, and will remove a lot of complications in
    the code

    (3) Finally a bug is fixed with the existing use_largest_txfm speed feature
    that causes mismatches when the lossless mode and 4x4 WH transform is
    forced.

    Results on derf :
    USE_FULL_RD : +0.03% (due to change in the tables), 0% encode time reduction
    USE_LARGESTINTRA : -0.21%, 15% encode time reduction (this one is a
    pretty good compromise)
    USE_LARGESTINTRA_MODELINTER : -0.98%, 22% encode time reduction
    (currently the benefit of modeling is limited for txfm size selection,
    but keeping this enum as a placeholder) .
    USE_LARGESTALL : -1.05%, 27% encode-time reduction (same as existing
    use_largest_txfm speed feature).

    Change-Id : I4d60a5f9ce78fbc90cddf2f97ed91d8bc0d4f936

  • Sending per frame metadata with H264 encoded frames

    21 septembre 2013, par user2459280

    We're looking for a way to send per frame metadata (for example an ID) with H264 encoded frames from a server to a client.

    We're currently developing a remote rendering application, where both client and server side are actively involved.
    The server renders a high quality image with all effects, lighting etc.
    The client also has model-informations and renders a diffuse image that is used when the bandwidth is too low or the images have to be warped in order to avoid stuttering .

    So far we're encoding the frames on the server side with ffmpeg and streaming them with live555 to the client, who receives an rtsp-stream and decodes the frames again using ffmpeg.

    For our application, we now need to send per frame metadata.
    We want the client to tell the server where the camera is right now.
    Ideally we'd be able to send the client's view matrix to the server, render the corresponding frame and send it back to the client together with its view matrix. So when the client receives a frame, we need to know exactly at what camera position the frame was rendered.

    Alternatively we could also tag each view matrix with an ID, send it to the server, render the frame and tag it with the same ID and send it back. In this case we'd have to assign the right matrix to the frame again on the client side.

    After several attempts to realize the above intent with ffmpeg we came to the conclusion that ffmpeg does not provide the required functionality. ffmpeg only provides a fix, predefined set of fields for metadata, that either cannot store a matrix or can only be set for every key frame, which is not frequently enough for our purpose.

    Now we're considering using live555. So far we have an on demand Server, witch gets a VideoSubsession with a H264VideoStreamDiscreteFramer to contain our own FramedSource class. In this class we load the encoded AVPacket (from ffmpeg) and send its data-buffer over the network. Now we need a way to send some kind of metadata with every frame to the client.

    Do you have any ideas how to solve this metadata problem with live555 oder another library ?

    Thanks for your help !