Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (36)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (6019)

  • ffmpeg : Render a two-pass MP4 timelapse video from a glob of JPEG images

    20 mai 2024, par algalg

    In bash on an Ubuntu 22 LTS system, I have this line to make a timelapse video file from hundreds of collected JPEG images in a folder.

    


    ffmpeg -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  "/some/path/output/render.mp4"


    


    The input JPEGs are 4K, so the resulting video file in that same resolution, and at high quality (which is desired), renders to a very large video file ( 250GB).

    


    Through trial and error, I've needed to add the -vf padding to avoid potential "height not divisible by 2" crashes, and set the pixel format to explicitly use jpeg full colour range yuvj420p because some of the original JPEG images were making ffmpeg complain about that.

    


    And since the goal is to eventually use these renders for streaming, -movflags +faststart was also added.

    


    It's all seeming to work very well, but just producing very large high quality video files :

    


    So to try address the filesize problem, but sticking to h264, I started reading some tutorials/docs (this one for example) that mentioned running two passes to compress the video more effectively.

    


    This sounded promising, and so to do this all in one step, rather than rendering a video and re-rendering that in two passes to better compress it) I tried this :

    


    ffmpeg -y -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  -pass 1 -f null /dev/null &&
ffmpeg -r 25 \
  -pattern_type glob -i "/some/path/input/*.jpg" \
  -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" \
  -pix_fmt yuvj420p -preset veryslow -qp 0 \
  -movflags +faststart \
  -pass 2 -f mp4 "/some/path/output/render.mp4"


    


    But ffmpeg seems to freak out about the inputs then :

    


    [image2 @ 0x55674a3bc440] Could not open file : /some/path/input/*.jpg
[image2 @ 0x55674a3bc440] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, image2, from '/some/path/input/*.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to '/dev/null':
Output file #0 does not contain any stream


    


    I've tried searching around a bit for if it's even possible to do two passes with the globbing input method, but haven't had much luck in finding any documentation or help about it.

    


    So asking here if anyone has any insights ? What am I doing wrong ? Is this possible ?

    


  • Unable to upload/convert videos using Paperclip-FFMPEG gem in Rails

    31 juillet 2012, par Graeme

    FIXED : It's due to a typo in the relevant lib file that I hadn't spotted ! See this issue for more details.


    I'm still a bit of a Ruby on Rails newbie (running Rails 3.2.6 and Ruby 1.9.3p194), but I'm finding it very difficult to convert video files using the paperclip-ffmpeg gem. No matter what I do, an error message is displayed on the page after attempting to upload the video :

    "cannot load such file : /[...My info...]/lib/paperclip_processors/ffmpeg.rb"

    I'm trying to test using .mov files for the moment.

    I'm trying to follow the instructions on the gem's github page, but without much success.

    Firstly, I'm using a Mac (Snow Leopard) and ffmpeg is installed (running which ffmpeg tells me it's in /user/local/bin/ffmpeg)

    In my application, I've added the following lines to the gemfile :

    gem 'paperclip'
    gem 'paperclip-ffmpeg'

    I've also added Paperclip.options[:command_path] = "/usr/local/bin/" to config/environments/development.rb as per the instructions :

    Myapp::Application.configure do

    ...

    Paperclip.options[:command_path] = "/usr/local/bin/"
    end

    (The instructions also suggest "in your environment config file, let Paperclip know to look there by adding that directory to its path", but I don't know what this means - maybe this is the problem ?).

    My class is structured as follows :

    class Myvideo > ActiveRecord::Base

     attr_accessible :description, :title, :video

     has_attached_file :video, :styles => {
         :medium => { :geometry => "640x480", :format => 'flv' }
       }, :processors => [:ffmpeg]


    end

    My understanding is that the above code converts the uploaded movie from .mov (or whatever) to .flv format.

    However, the error I describe above appears whenever the user clicks on the Upload button (save for a few seconds while the video appears to be uploading).

    Note that I can upload a video via the standard Paperclip gem without converting with no problems. Therefore, this code works (i.e. the video is uploaded but no conversion occurs) :

    attr_accessible :description, :title, :video

     has_attached_file :video

    Any ideas where I might be going wrong ? Thanks !


    EDIT - the original error message ("Cannot load such file...") appears to have arisen because I hadn't included the relevant ffmpeg.rb file from Github within the /lib directory. Thanks to @wehal3001 for pointing this out !

    However, while I now have this file in my application, I still get the following error when trying to upload a video :

    uninitialized constant Paperclip::Ffmpeg::PaperclipError
    ...
    lib/paperclip_processors/ffmpeg.rb:123:in

    rescue in make'
    lib/paperclip_processors/ffmpeg.rb:120:in

    make'
    app/controllers/videos_controller.rb:43:in

    new'
    app/controllers/videos_controller.rb:43:in

    create'

    Any help would be much appreciated !

  • FFmpeg : concatenate video files (containing audio) without filter_complex

    28 décembre 2016, par DSalenga

    I have a problem when trying to concatenate multiple files in FFmpeg ; my goal is to create a video presentation by concatenating different types of slides :

    (a) Image slides, which are converted into videos by looping the frame for a while. These type of slides do not have audio, so I add a silent audio track to them :

    ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -loop 1 -i inputFile.png -c:v libx264 -shortest -c:a aac -pix_fmt yuv420p -movflags faststart -profile:v high -r 30 -t 3 -level 4.0 -preset veryfast -crf 23 outputA.mp4

    (b) Video slides, which have an overlaid watermark and last until the video is over. If the file does not contain audio, this is added in the same way as in the previous case :

    -y -i inputFile.mp4 -i Watermark.jpg -filter_complex "[0]scale=1280:720,setsar=sar=1/1[0b]; [1]scale=1280:720[1b]; [0b][1b]overlay=0:0[ov]"  -c:v libx264 -shortest -c:a aac -pix_fmt yuv420p -movflags faststart -profile:v high -r 30 -t 2.8400055 -level 4.0 -preset veryfast -crf 23 outputB.mp4

    -y -i inputFile.mp4 -i Watermark.jpg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0]scale=1280:720,setsar=sar=1/1[0b]; [1]scale=1280:720[1b]; [0b][1b]overlay=0:0[ov]"  -c:v libx264 -shortest -c:a aac -pix_fmt yuv420p -movflags faststart -profile:v high -r 30 -t 2.8400055 -level 4.0 -preset veryfast -crf 23 outputC.mp4

    So, once I have all the generated files and a .txt file with all filenames, I want to concatenate using the simple command :

    -y -f concat -safe 0 -i textfile.txt -c copy  outputConcat.mp4

    Unfortunately, the result I obtain is far from perfect, as the audio screw everything up ; I know that audio is the problem because calling the same instruction without taking audio into account (that is, with -c:v copy -an instead of -c copy) works fine.

    One solution I’ve been testing is to use the concat filter inside filter_complex (transcoding both audio and video again), but I am concerned about speed, and this process is slow enough to be discarded.

    -y  -i Slide1.mp4 -i Slide2.mp4 -i Slide3.mp4 -filter_complex " [0:v:0][0:a:0] [1:v:0][1:a:0] [2:v:0][2:a:0] concat=n=3:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264 -c:a aac -pix_fmt yuv420p -movflags faststart -profile:v high -r 30 -level 4.0 -preset veryfast -crf 23 Report.mp4

    Another idea I had was to : (1) concatenate only audio tracks inside the filter_complex (much faster), (2) concatenate only video without using filter_complex (using a .txt file and -c:v copy -an), (3) add the audio obtained in (1) in the result obtained in (2). However, the duration of the resulting audio obtained in (1) is shorter than duration of the video obtained in (2).
    Knowing that all audio tracks are encoded with aac and have the same sampling frequency, the only parameter that changes from one to another is the number of kb/s.

    Can you please help me finding out a way to concatenate these video slides without having to use filter_complex ?

    Thank you very much !