Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (19)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

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

Sur d’autres sites (5706)

  • AWS : Best way to generate a thumbnail for every frame of a s3 uploaded video

    4 janvier 2018, par danielfranca

    I need to process a video file, transcode it and generate a thumbnail for every frame.

    It should happen every time there’s a new video on a specific AWS bucket.

    I found out that AWS Lambda should be the best service for that

    However, it is not working as expected and I’ll explain why

    I’ve created a simple Python2.7 file using FFVideo
    It seems that this library doesn’t support Python3.

    It is a nice abstraction on top of ffmpeg

    To deploy the package I had run lld on the FFVideo shared object, and then copied everything to my project directory, as described in their documentation.
    Zipped it and upload to AWS Lambda

    Yet it doesn’t work, I keep getting errors as if the /usr/lib64/libstdc++ is missing, even after copied it to the projecct dir, also tried /usr/lib64 and /lib64

    Then as a second thought I wonder if just running ffmpeg wouldn’t be easier...
    So I just copied ffmpeg to the project dir and did a simple Python script to call it.

    Missing shared objects, ok, lld again and copied everything to the directory.

    Then AWS Lambda seems to be completely broken, I can’t save it anymore and it just says "Fix errors before saving"
    But no error message, nothing

    I even have attempted to write inline a simple code, but now AWS Lambda don’t even open the online editor.
    I also tried to remove all the shared objects I have added, returning to the original state, but still same generic error.
    Same thing if I just create a new lambda function with same old code.

    Doesn’t matter what I do it never even enable the Save button anymore.
    I thought it might be just some AWS unstability, but it been a while.

    I’ve looked to a similar project using Node
    and it doesn’t seem to include anything except ffmpeg

    My other idea is to use SQS to trigger a python script somewhere else to create the thumbnails

    Any idea how is the best approach for that ?

  • FFMPEG H264 with custom overlay per frame

    4 octobre 2020, par La bla bla

    We have a stream that is stored in the cloud (Amazon S3) as individual H264 frames. The frames are stored as framexxxxxx.264, the numbering doesn't start from 0 but rather from some larger number, say 1000 (so, frame001000.264)

    


    The goal is to create a mp4 clip which is either timelapse or just faster for inspection and other checking (much faster, compressing around 3 hours of video down to < 20 minutes), this also requires we overlay the frame number (the filename) on the frame itself

    &#xA;

    At first I was creating a timelapse by pulling from S3 only the keyframes (i-frames ? still rather new to codecs & stuff) and overlaying the filename on them and saving as png (which probably isn't needed, but that's what I did) using (this command is used inside a python script)

    &#xA;

    ffmpeg -y -i {h264_name} -vf \"scale=1920:-1, &#xA;drawtext=fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf:fontsize=34:text={txt}:fontcolor=white:x=50:y=50:bordercolor=black:borderw=2\" &#xA;-c:a copy -pix_fmt yuv420p {basename}.png&#xA;

    &#xA;

    after this I combined all the frames by using python to convert the lowest numbered frame to 0.png and incrementing (so it would be continuous, because I only used keyframes the numbers originally weren't sequential) and running

    &#xA;

    ffmpeg -y -f image2 -i %d.png -r {self.params.fps} -vcodec libx264 -crf {self.params.crf} -pix_fmt yuv420p {out_file}&#xA;

    &#xA;

    and this worked great, but the difference between keyframes was too long to allow for proper inspection

    &#xA;

    so now for the question(s)

    &#xA;

    since I know frames that are not keyframes (p-frames ?) can't be used alone by ffmpeg, the method of overlaying the file name and converting it to png (or keep as h264, same thing) won't work, or at least, I couldn't find a way for it to work, maybe there's a way to specify a frame's keyframe ?, how can one overlay the filename (and not the frame number as shown here for example)

    &#xA;

    Also, is it possible to skip some p-frames between the keyframes ? (so if a keyframe is every 30 frames, we would take a keyframe, a frame 15 frames later, and next another keyframe)

    &#xA;

    I thought about using ffmpeg's pipe option to feed it with the files as they're being downloaded, but I'm not sure if I can specify drawtext this way

    &#xA;

    Also, if there's another alternative that can achieve that (at first I was converting to png, using python and OpenCV to add the filename and then merging the pngs to mp4, but then I found drawtext can do that in a single command so I used it)

    &#xA;

  • How to QUICKLY batch scan video files to check for integrity (corrupt / valid)

    9 juillet 2024, par nhershy

    This question has been asked several times on this forum, with the accepted answer using ffmpeg to assess the integrity of the file with these example commands :

    &#xA;

    # scan a single file&#xA;ffmpeg.exe -v error -i C:\to\path\file.avi -f null - >error.log 2>&amp;1&#xA;&#xA;# batch scan&#xA;find C:\to\path\ -name "*.mp4" -exec sh -c "ffmpeg -v error -i &#x27;{}&#x27; -map 0:1 -f null - 2>&#x27;{}.log&#x27;" \;&#xA;

    &#xA;

    The Problem :

    &#xA;

    The above commands work without issue, taking anywhere between 2-20 mins to assess a single video file. But when running the above batch command on a large number of video files (1000+) (assuming an average of 5 minutes per file), the process could take over a week to finish.

    &#xA;

    The Objective :

    &#xA;

    Looking for a faster solution to verify integrity of my files. Either to modify the ffmpeg command, or to use as a different binary entirely. Anything is accepted as long as I can run the new command in the terminal/bash. Would like to get the processing time down from a few days, to a few hours.

    &#xA;

    References :

    &#xA;

    https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4

    &#xA;

    Quickly check the integrity of video files inside a directory with ffmpeg

    &#xA;

    How can I tell if a video file is corrupted ? FFmpeg ?

    &#xA;

    https://gist.github.com/ridvanaltun/8880ab207e5edc92a58608d466095dec

    &#xA;

    Update

    &#xA;

    I never did find a "quick" way of scanning the video files. I just accepted that for the sake of thoroughness it will take some time. However, I made a GUI Python program that may benefit others :

    &#xA;

    https://github.com/nhershy/CorruptVideoFileInspector

    &#xA;