Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (77)

  • 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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

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

  • ffmpeg in bash only works on every second file

    5 août 2016, par kay

    EDIT :

    The Solution is to change the original ffmpeg-call below to the following :
    ffmpeg -nostdin -loglevel 16 -i "$dir/$var" -map_channel 0.0.0 "$left" -map_channel 0.0.1 "$right"
    where the -nostdin is the crucial thing.
    For reference see apply ffmpeg to many files (comment by macmichael01)


    I’m trying to convert all .wav-files in a given directory and it’s subdirectorys into two mono-files each with the following bash script. The crucial part is almost at the bottom - the ffmpeg call :

    #!/bin/bash
    # "[One] Stereo [file] to two mono [files] - stereo22mono"

    # Syntax ffmpeg siehe: https://trac.ffmpeg.org/wiki/AudioChannelManipulation


    ls -R $1 > .s22mtmp.txt

    while read -r line || [[ -n "$line" ]]; do

       var=$line
       tst=$var
       tst="${tst%:}"

       if [ -d "${tst%./}" ]       # is directory name
       then
           dir=$tst

       elif [ -f "$dir/$var" ]     # is file name
       then
           left=$dir/left_$var
           right=$dir/right_$var

           #loglevel 16 = only errors
           # -i ...-> input file
           # ffmpeg ... [SOURCE] ... [TARGET1] ... [TARGET2]
           ffmpeg -loglevel 16 -i "$dir/$var" -map_channel 0.0.0 "$left" -map_channel 0.0.1 "$right"
       fi

    done < .s22mtmp.txt


    rm .s22mtmp.txt

    It almost works - besides the fact, that it only does it’s job on only every second file, although the for-loop correctly goes through all files (watched it with echo) and calls ffmpeg.
    I thought it might be that ffmpeg has not finished it’s assigned work by the time it is asked to work on the next file and therefore just refuses, which seems to be true.
    Because I made one try with disowning every call of ffmpeg like so :

    ffmpeg -loglevel 16 -i "$dir/$var" -map_channel 0.0.0 "$left" -map_channel 0.0.1 "$right" & disown

    This worked almost, the problem was just that kind of hundreds of processes and multiple times more threads where starting to run and wouldn’t complete in a reasonable time, so I arborted. :D
    But at least it didn’t skip every second file anymore with that kind of call.

    Can anyone give me a hint, how to get this done ? Would be very thankful.. it’s actually the first time I’m trying with bash scripts.
    Thanks in advance !

  • FFmpeg Matching decibel level between two audio tracks when mixing ?

    9 août 2022, par JohnWick

    I have a collection of mp3 files for various frequencies (i.e. 528hz). I also have a collection of mp3's of ambient background music. So here is the scenario :

    


    I am mixing the tone frequency mp3's with the music mp3's. This works great using the amix filter, no problem. However, some of the ambient music is quiet, which makes the tones sound overpowering. Conversely, some of the ambient music is also fairly loud, making the tones inaudible.

    


    It seems to me, the solution would be to adjust the volume of the tone to match the decibel level of the associated music track. How can this be done programmatically ? Perhaps parsing the output of a ffprobe call, but at that point I wouldn't quite be sure how to proceed towards my goal. I figured reaching out on Super User might save me a ton of pain, by turning to more experienced ffmpeg users. Maybe my approach is also flawed, and would be happy if someone can suggest a better method to achieve what I am looking for.

    


    Here is my python code so far.

    


    import ffmpeg
import os

tones = os.listdir('tones')
songs = os.listdir('music')

for tone in tones:
    for song in songs:
        tone_in = ffmpeg.input(f'tones/{tone}', stream_loop=-1)
        music_in = ffmpeg.input(f'music/{song}')
        mixed = ffmpeg.filter([tone_in, music_in], 'amix', inputs=2, duration='shortest')
        out = ffmpeg.output(mixed, f'output/{tone} {song}.mp3')
        out.run()


    


  • Joining audio file and all frame picture to video format with Python ffmpeg

    29 septembre 2020, par muh.widad

    i have a tmp directory which contains a collection of image frames and audio files. i am using linux mint 19.3 and python3.8. in the terminal I type
ffmpeg -i tmp/%d.png -vcodec png tmp/output.mov -y
and ffmpeg -i tmp/output.mov -i tmp/audio.mp3 -codec copy output.mov -y
then the collection of images and audio in the directory will become a complete video. that I asked

    


      

    1. when I run it in python using the syntax
call(["ffmpeg", "-i", "tmp/%d.png" , "-vcodec", "png", "tmp/output.mov", "-y"],stdout=open(os.devnull, "w"), stderr=STDOUT)
and
call(["ffmpeg", "-i", "tmp/output.mov", "-i", "tmp/audio.mp3", "-codec", "copy", "output.mov", "-y"],stdout=open(os.devnull, "w"), stderr=STDOUT)
it does not merge into a video (without output error)
    2. 


    3. I tried the syntax
os.system("ffmpeg -i tmp/%d.png -vcodec png tmp/output.mov -y")
and
os.system("ffmpeg -i tmp/output.mov -i tmp/audio.mp3 -codec copy output.mov -y"), the video failed to merge with the error output tmp/output.mov : No such file or directory
    4. 


    


    Please help. thank you