Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (104)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (13028)

  • Normalizing audio of several wav snippets with ffmpeg

    17 mai 2023, par dick_kickem

    I searched the site and I figured that maybe ffmpeg-normalize could be part of my solution but I'm really not sure.

    


    In my free time me and my friends create quizzes for people to solve. One of these is a music quiz, where you hear audio snippets and have to guess the artist and song title. A few years back I did most of them using Audacity, which means recording snippets from existing videos, inserting fade in and fade out to every snippet, putting announcements like "Number x" before the x-th song and also making sure that all songs are fairly of equal loudeness (-6.0 dB).

    


    The result in Audacity looked like this.

    


    enter image description here

    


    Lazy as I am, I learned about ffmpeg and wrote a script, which does all these steps for me. The script is mostly written in bash. I use some audio files where I extract the audio in wav-format, add a fade in and fade out and then I try to set the volume to -6.0 dB as with Audacity. The part where this happens looks like this :

    


    ...[some code before]...

# write the audio details of temmp.wav into the "info" file
ffmpeg -i temp.wav -filter:a volumedetect -f null - 2> info

#check out the max volume of temp.wav
max_vol=$(grep "max_volume" info | cut -d ' ' -f5)

# determine the difference between the max volume and -6
vol_diff=$(expr "-6-($max_vol)" | bc -l)

# change temp.wav loudness by the determined difference
ffmpeg -y -i temp.wav -filter:a "volume=$vol_diff$db" $count.wav

...[some code after]...


    


    I do this with all snippets, leaving me with usually ten snippets in the format 1.wav, 2.wav and so on. Lastly, I concatenate them all with announcements in the form nr1.wav, 1.wav, nr2.wav, 2.wav and so on. Overall this works really great for me. Yet, the loudness is not quite as equal as in Audacity. Here is a screenshot of a generated music quiz using the described script (not the same music snippets as the example before) :

    


    enter image description here

    


    You can see some peaks pointing out. It's not bad and in fact, it works for me in most cases, but it's not like what I used to have with Audacity. Does anyone have any idea how to fix that to make it more equal ?

    


    Thank you in advance and kind regards

    


  • Change keyframe interval losslessly to produce mpeg-dash content

    25 mars 2023, par Eeel

    I have a case where i have a mkv file encoded to a 2.5 GB file with x264/CRF settings, in this file group of pictures are not of equal duration (i.e 2,4 or 6 seconds ...).

    


    Now i want to create a mpeg-dash version of the file by extracting the video track to mp4 and set the keyframe interval to 2sec losslessly preserving size (minus other audio and subtitle tracks)

    


    What i already have that work :

    


    Fix keyframe to 2s with x264 :

    


    -codec:v libx264 -force_key_frames 'expr:gte(t,n_forced*2)' -movflags faststart


    


    But it require also encoding settings that change the quality :

    


    -b:v 3500k -maxrate 6000k -bufsize 3500k


    


    In this case i don't need to change the quality from CRF encoding, just change keyframe interval and set faststart flag.

    


    note :
I have detailed bitrate informations about the file obtained by parsing output of ffprobe : average, min and max bitrate in kb/s.
Please avoid solution using -crf 0, mpeg-dash files are later crypted using MP4Box that crash with CRF encoded files.

    


    How can i do this using ffmpeg ?

    


    Edit :

    


    Sorry my question is not clear, i'm fine with re-encode, i want to preserve quality as much as possible.

    


    Using a little more than source mean bitrate for the -b:v parameter the resulting file size is almost same as source, metric test results are not as good i expect :

    


    PSNR 41.03 (expected 44+)
VMAF 76.32 (expected 92+)


    


    Is my bitrate approch good ? Is there anything i can try to improve metric results ?

    


  • ffmpeg : Is it possible to replace frames in a variable frame-rate video ?

    31 décembre 2022, par Arnon Weinberg

    Machine learning algorithms for video processing typically work on frames (images) rather than video.

    


    In my work, I use ffmpeg to dump a specific scene as a sequence of .png files, process them in some way (denoise, deblur, colorize, annotate, inpainting, etc), output the results into an equal number of .png files, and then update the original video with the new frames.

    


    This works well with constant frame-rate (CFR) video. I dump the images as so (eg, 50-frame sequence starting at 1:47) :

    


    ffmpeg -i input.mp4 -vf "select='gte(t,107)*lt(selected_n,50)'" -vsync passthrough '107+%06d.png'


    


    And then after editing the images, I replace the originals as so (for a 12.5fps CFR video) :

    


    ffmpeg -i input.mp4 -itsoffset 107 -framerate 25/2 -i '107+%06d.png' -filter_complex "[0]overlay=eof_action=pass" -vsync passthrough -c:a copy output.mp4


    


    However, many of the videos I work with are variable frame-rate (VFR), and this has created some challenges.

    


    A simple solution is to convert VFR video to CFR, which ffmpeg wants to do anyway, but I'm wondering if it's possible to avoid this. The reason is that CFR requires either dropping frames - since the purpose of ML video processing is usually to improve the output, I'd like to avoid this - or duplicating frames - but an upscaling algorithm that I'm working with right now uses the previous and next frame for data - if the previous or next frame is a duplicate, then ... no data for upscaling.

    


    With -vsync passthrough, I had hoped that I could simply remove the -framerate option, and preserve the original frames as-is, but the resulting command :

    


    ffmpeg -i input.mp4 -itsoffset 107 -i '107+%06d.png' -filter_complex "[0]overlay=eof_action=pass" -vsync passthrough -c:a copy output.mp4


    


    uses ffmpeg's default of 25fps, and drops a lot of frames. Is there a reliable way to replace frames in VFR video ?