Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (43)

  • 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

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5612)

  • avcodec/sanm : SMUSH codec48 decoder

    16 décembre 2024, par Manuel Lauss
    avcodec/sanm : SMUSH codec48 decoder
    

    Adds a decoder for the SMUSH codec48 video encoding, as is used by
    the LucasArts game "Mysteries of the Sith".

    Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavcodec/sanm.c
  • Batch splitting large audio files into small fixed-length audio files in moments of silence

    26 juillet 2023, par Haldjärvi

    to train the SO-VITS-SVC neural network, we need 10-14 second voice files. As a material, let's say I use phrases from some game. I have already made a batch script for decoding different files into one working format, another batch script for removing silence, as well as a batch script for combining small audio files into files of 13-14 seconds (I used Python, pydub and FFmpeg). To successfully automatically create a training dataset, it remains only to make one batch script - Cutting audio files lasting more than 14 seconds into separate files lasting 10-14 seconds, cutting in places of silence or close to silence is highly preferable.

    &#xA;

    So, it is necessary to batch cut large audio files (20 seconds, 70 seconds, possibly several hundred seconds) into segments of approximately 10-14 seconds, however, the main task is to look for the quietest place in the cut areas so as not to cut phrases in the middle of a word (this is not very good for model training). So, is it really possible to do this in a very optimal way, so that the processing of a 30-second file does not take 15 seconds, but is fast ? Quiet zone detection is required only in the area of cuts, that is, 10-14 seconds, if counted from the very beginning of the file.

    &#xA;

    I would be very grateful for any help.

    &#xA;

    I tried to write a script together with ChatGPT, but all options gave completely unpredictable results and were not even close to what I needed... I had to stop at the option with a sharp cut of files for exactly 14000 milliseconds. However, I hope there is a chance to make a variant with cutting exactly in quiet areas.

    &#xA;

    import os&#xA;from pydub import AudioSegment&#xA;&#xA;input_directory = ".../RemSilence/"&#xA;output_directory = ".../Split/"&#xA;max_duration = 14000&#xA;&#xA;def split_audio_by_duration(input_file, duration):&#xA;    audio = AudioSegment.from_file(input_file)&#xA;    segments = []&#xA;    for i in range(0, len(audio), duration):&#xA;        segment = audio[i:i &#x2B; duration]&#xA;        segments.append(segment)&#xA;    return segments&#xA;&#xA;if __name__ == "__main__":&#xA;    os.makedirs(output_directory, exist_ok=True)&#xA;    audio_files = [os.path.join(input_directory, file) for file in os.listdir(input_directory) if file.endswith(".wav")]&#xA;    audio_files.sort(key=lambda file: len(AudioSegment.from_file(file)))&#xA;    for file in audio_files:&#xA;        audio = AudioSegment.from_file(file)&#xA;        if len(audio) > max_duration:&#xA;            segments = split_audio_by_duration(file, max_duration)&#xA;            for i, segment in enumerate(segments):&#xA;                output_filename = f"output_{len(os.listdir(output_directory))&#x2B;1}.wav"&#xA;                output_file_path = os.path.join(output_directory, output_filename)&#xA;                segment.export(output_file_path, format="wav")&#xA;        else:&#xA;            output_filename = f"output_{len(os.listdir(output_directory))&#x2B;1}.wav"&#xA;            output_file_path = os.path.join(output_directory, output_filename)&#xA;            audio.export(output_file_path, format="wav")&#xA;

    &#xA;

  • How to extract frames in sequence as PNG images from ffmpeg stream ?

    7 janvier, par JamesJGoodwin

    I'm trying to create a program that would capture my screen (a game to be precise) using ffmpeg and stream frames to NodeJS for live processing. So, if the game runs at 60 fps then I expect ffmpeg to send 60 images per second down to stdout. I've written a code for that

    &#xA;

        import { spawn as spawnChildProcess } from &#x27;child_process&#x27;;&#xA;&#xA;    const videoRecordingProcess = spawnChildProcess(&#xA;      ffmpegPath,&#xA;      [&#xA;        &#x27;-init_hw_device&#x27;,&#xA;        &#x27;d3d11va&#x27;,&#xA;        &#x27;-filter_complex&#x27;,&#xA;        &#x27;ddagrab=0,hwdownload,format=bgra&#x27;,&#xA;        &#x27;-c:v&#x27;,&#xA;        &#x27;png&#x27;,&#xA;        &#x27;-f&#x27;,&#xA;        &#x27;image2pipe&#x27;,&#xA;        &#x27;-loglevel&#x27;,&#xA;        &#x27;error&#x27;,&#xA;        &#x27;-hide_banner&#x27;,&#xA;        &#x27;pipe:&#x27;,&#xA;      ],&#xA;      {&#xA;        stdio: &#x27;pipe&#x27;,&#xA;      },&#xA;    );&#xA;&#xA;    videoRecordingProcess.stderr.on(&#x27;data&#x27;, (data) => console.error(data.toString()));&#xA;&#xA;    videoRecordingProcess.stdout.on(&#x27;data&#x27;, (data) => {&#xA;      fs.promises.writeFile(`/home/goodwin/genshin-repertoire-autoplay/imgs/${Date.now()}.bmp`, data);&#xA;    });&#xA;

    &#xA;

    Currently I'm streaming those images onto disk for debugging and it's almost working except that the image is cropped. Here's what's going on. I get 4 images saved on disk :

    &#xA;

      &#xA;
    1. Valid image that is 2560x1440, but only 1/4 or even 1/5 of the screen is present at the top, the remaining part of the image is empty (transparent)
    2. &#xA;

    3. Broken image that won't open
    4. &#xA;

    5. Broken image that won't open
    6. &#xA;

    7. Broken image that won't open
    8. &#xA;

    &#xA;

    This pattern is nearly consistent. Sometimes it's 3, sometimes 4 or 5 images between valid images. What did I do wrong and how do I fix it ? My guess is that ffmpeg is streaming images in chunks, each chunk represents a part of the frame that was already processed by progressive scan. Though I'm not entirely sure if I should try and process it manually. There's gotta be a way to get fully rendered frames in one piece sequentially.

    &#xA;