Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (50)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (5349)

  • No such file or directory Error with FFMPEG screenshot and CarrierWave custom model method

    9 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'
  • Using ffmpeg in bash

    20 août 2013, par Benjamin King

    I'm trying to make a bash script to transcode .wav files to mp3 (with lame V0 preset) within a directory. Here's what I have so far

    #!/bin/bash
    #
    for abc in *.wav; do
     name=${abc%.*}
     echo "$name"
     ffmpeg -i "$abc" -ac 2 -f wav - | lame -V 0 - "$name.mp3"
    done
    #

    Where the first do line cuts out the extension so I can use the file name later.

    I've tested the ffmpeg command on a single file but once I include it in the for loop I get the following error (for the last track) :

    10 Artist - track
    lame: excess arg Artist
    ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
     built on Apr  2 2013 17:00:59 with gcc 4.6.3
    10: No such file or directory

    I'm not sure why there is an excess argument for the lame line, or why ffmpeg is looking only at a file named "10". Is there something I'm missing ?

    Many thanks for any help

  • FFmpeg encoding fails with codec - but works without

    7 juillet 2013, par Niels

    I have made an install with ffmpeginstaller..

    This is the version installed:

    ffmpeg version N-54523-ga71832f-syslint
    built on Jul  7 2013 12:16:34 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
    configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl    --enable-pthread              s --enable-libopencore-amrnb --enable-decoder=liba52 --enable-  libopencore-amrwb --enable-libfaac --enable-              libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/l              ocal/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
    libavutil      52. 38.100 / 52. 38.100
    libavcodec     55. 18.102 / 55. 18.102
    libavformat    55. 11.101 / 55. 11.101
    libavdevice    55.  2.100 / 55.  2.100
    libavfilter     3. 78.103 /  3. 78.103
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    libpostproc    52.  3.100 / 52.  3.100

    This works :

    ffmpeg -i FreeScreenVideoRecorderVideo.avi -ar 22050 -ab 32 -f mp4 -s 1280x720 video3.mp4

    Working with codec does not work :

    ffmpeg -y -i  FreeScreenVideoRecorderVideo.avi -r 30000/1001 -b 2M -bt 4M -vcodec libx264 -pass 1 -vpre fastfirstpass -an output.mp4

    What can i be doing wrong ?