Advanced search

Medias (1)

Tag: - Tags -/musée

Other articles (111)

  • Le profil des utilisateurs

    12 April 2011, by

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 November 2010, by

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 May 2011, by

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

On other websites (11759)

  • Pydub FFMPEG issue [closed]

    14 January, by Nikolai van den Hoven

    I am attempting to use FFMPEG with Pydub to create a program that chops .mp3 files into different words, each contained in their own .mp3 file, but when I run the script I am getting the following error:

    


    PS C:\Users\nik> & C:/Users/nik/AppData/Local/Microsoft/WindowsApps/python3.12.exe "d:/Python/Word Splitter.py"
C:\Users\nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)


    


    This is the code I am using.

    


    import os
from pydub import AudioSegment
from pydub.silence import split_on_silence
import speech_recognition as sr
AudioSegment.ffmpeg = r"D:\Python\ffmpeg\bin\ffmpeg.exe"
def mp3_to_words(mp3_file, output_folder):
    # Ensure output folder exists
    os.makedirs(output_folder, exist_ok=True)

    # Load MP3 file
    print("Loading audio file...")
    audio = AudioSegment.from_mp3(mp3_file)

    # Split audio into chunks using silence detection
    print("Splitting audio into chunks...")
    chunks = split_on_silence(
        audio,
        min_silence_len=200,  # Minimum silence duration in ms to consider as a split point
        silence_thresh=audio.dBFS - 14,  # Silence threshold relative to average loudness
        keep_silence=100  # Retain some silence in chunks
    )

    recognizer = sr.Recognizer()

    for i, chunk in enumerate(chunks):
        print(f"Processing chunk {i + 1}/{len(chunks)}...")

        # Save the chunk temporarily
        temp_file = os.path.join(output_folder, f"chunk_{i}.wav")
        chunk.export(temp_file, format="wav")

        # Recognize words in the chunk
        with sr.AudioFile(temp_file) as source:
            audio_data = recognizer.record(source)
            try:
                text = recognizer.recognize_google(audio_data)
                words = text.split()

                # Export each word as its own MP3
                word_start = 0
                for j, word in enumerate(words):
                    word_duration = len(chunk) // len(words)  # Approximate duration per word
                    word_audio = chunk[word_start:word_start + word_duration]
                    word_file = os.path.join(output_folder, f"word_{i}_{j}.mp3")
                    word_audio.export(word_file, format="mp3")
                    word_start += word_duration

            except sr.UnknownValueError:
                print(f"Could not understand chunk {i + 1}.")
            except sr.RequestError as e:
                print(f"Could not request results; {e}")

        # Clean up temporary file
        os.remove(temp_file)

    print(f"Processed {len(chunks)} chunks. Word MP3s saved in {output_folder}.")

if __name__ == "__main__":
    input_file = input("Enter the path to the MP3 file: ").strip()
    output_dir = input("Enter the output folder path: ").strip()

    mp3_to_words(input_file, output_dir)


    


    I have added the Base FFMPEG folder and the bin folder within it to Windows PATH
My PATH variable on Windows 11,
But it does not show up in the variable when I typed PATH into cmd

    


  • ffmpeg is making my audio and video frozen and I don't know why

    17 April 2024, by Sdpro

    I'm using bunjs runtime to execute ffmpeg as terminal code but I don't know if my code is typescript code is wrong or ffmpeg is wrong
and I'm using json file to get the clips correctly

    


        let videos = 0;
    let stepsTrim = "";
    let concatInputs = "";

    for (let i = 0; i < 40; i++) {
        if (unwantedWords[i].keepORdelete === true) {
            stepsTrim += `[0:v]trim=0:${
                unwantedWords[i].start
            },setpts=PTS[v${i}];[0:a]atrim=0:${
                unwantedWords[i].start
            },asetpts=PTS-STARTPTS[a${i}];[0:v]trim=${unwantedWords[i].start}:${
                unwantedWords[i].end
            },setpts=PTS[v${unwantedWords.length + i + 1}];[0:a]atrim=${
                unwantedWords[i].start
            }:${unwantedWords[i].end},asetpts=PTS-STARTPTS[a${
                unwantedWords.length + i + 1
            }];`;

            concatInputs += `[v${i}][a${i}][v${unwantedWords.length + i + 1}][a${
                unwantedWords.length + i + 1
            }]`;
            videos += 2; 
        }
    }

    stepsTrim = stepsTrim.slice(0, -1);

    await $`ffmpeg -hide_banner -i ${videoRequirements.output} -filter_complex "${stepsTrim},${concatInputs} concat=n=${videos}:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" -c:v libopenh264 -preset slow -c:a mp3 -vsync 1 -y ${removedUnwantedWords}/fastAf.mp4`;


    


    at the end after everything was done:

    


    warning
[vost#0:0/libopenh264 @ 0x558f80ea1dc0] More than 1000 frames duplicated.9kbits/s dup=110 drop=1 speed=0.831x    
[out_0_0 @ 0x558f8100a880] 100 buffers queued in out_0_0, something may be wrong. dup=1064 drop=1 speed=1.43x    
[out_0_1 @ 0x558f8100af80] 100 buffers queued in out_0_1, something may be wrong.
[out_0_1 @ 0x558f8100af80] 1000 buffers queued in out_0_1, something may be wrong.
I can't figure out why ffmpeg is sometimes making the audio + video work and sometimes not
[enter image description here](https://i.stack.imgur.com/PicaA.png)


    


    [
  {
    "word": "Hello",
    "id": 0,
    "keepORdelete": false,
    "start": 0,
    "end": 9.06
  },
  {
    "word": "guys,",
    "id": 1,
    "keepORdelete": false,
    "start": 9.06,
    "end": 10.2
  },
  {
    "word": "there",
    "id": 2,
    "keepORdelete": false,
    "start": 11.76,
    "end": 12.06
  },
...


    


    I have tried commands from many types of ffmpeg commands changing the code and I can't seem to get the audio and video right

    


  • FFmpeg - EXRs to MOV, repeating first 24 frames

    16 May 2015, by JGazlyVFX

    I’m trying to convert EXRs to h264:MOV, in their native resolution. It will create the QT, but when I play back it back, it is looping the first 24 frames, over and over for what seems to be the duration of the frame sequence.

    Below is the command I’m running, Along with Output:

    /usr/bin/ffmpeg_build2/ffmpeg -start_number 001001 -r 24 -i /Volumes/storage/ff/plates/BC/BC0535/BC0535_ref2_20150408/2880x2160/EXR/BC0535_ref2.%06d.exr -vcodec libx264 -pix_fmt yuv420p -r 24 /Volumes/vfx_sftp/ff/ff_prod/TO_PROD/Fan4_BC_QT_PT2_20150515/BC0535_ref2_fr_20.mov