Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (30)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (4944)

  • avcodec/vc1_block : Fix mqaunt check for negative values

    28 juin 2018, par Michael Niedermayer
    avcodec/vc1_block : Fix mqaunt check for negative values
    

    Fixes : out of array access
    Fixes : ffmpeg_bof_4.avi
    Fixes : ffmpeg_bof_5.avi
    Fixes : ffmpeg_bof_6.avi

    Found-by : Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
    Reviewed-by : Jerome Borsboom <jerome.borsboom@carpalis.nl>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/vc1_block.c
  • Pydub FFMPEG issue [closed]

    14 janvier, par 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 :

    &#xA;

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

    &#xA;

    This is the code I am using.

    &#xA;

    import os&#xA;from pydub import AudioSegment&#xA;from pydub.silence import split_on_silence&#xA;import speech_recognition as sr&#xA;AudioSegment.ffmpeg = r"D:\Python\ffmpeg\bin\ffmpeg.exe"&#xA;def mp3_to_words(mp3_file, output_folder):&#xA;    # Ensure output folder exists&#xA;    os.makedirs(output_folder, exist_ok=True)&#xA;&#xA;    # Load MP3 file&#xA;    print("Loading audio file...")&#xA;    audio = AudioSegment.from_mp3(mp3_file)&#xA;&#xA;    # Split audio into chunks using silence detection&#xA;    print("Splitting audio into chunks...")&#xA;    chunks = split_on_silence(&#xA;        audio,&#xA;        min_silence_len=200,  # Minimum silence duration in ms to consider as a split point&#xA;        silence_thresh=audio.dBFS - 14,  # Silence threshold relative to average loudness&#xA;        keep_silence=100  # Retain some silence in chunks&#xA;    )&#xA;&#xA;    recognizer = sr.Recognizer()&#xA;&#xA;    for i, chunk in enumerate(chunks):&#xA;        print(f"Processing chunk {i &#x2B; 1}/{len(chunks)}...")&#xA;&#xA;        # Save the chunk temporarily&#xA;        temp_file = os.path.join(output_folder, f"chunk_{i}.wav")&#xA;        chunk.export(temp_file, format="wav")&#xA;&#xA;        # Recognize words in the chunk&#xA;        with sr.AudioFile(temp_file) as source:&#xA;            audio_data = recognizer.record(source)&#xA;            try:&#xA;                text = recognizer.recognize_google(audio_data)&#xA;                words = text.split()&#xA;&#xA;                # Export each word as its own MP3&#xA;                word_start = 0&#xA;                for j, word in enumerate(words):&#xA;                    word_duration = len(chunk) // len(words)  # Approximate duration per word&#xA;                    word_audio = chunk[word_start:word_start &#x2B; word_duration]&#xA;                    word_file = os.path.join(output_folder, f"word_{i}_{j}.mp3")&#xA;                    word_audio.export(word_file, format="mp3")&#xA;                    word_start &#x2B;= word_duration&#xA;&#xA;            except sr.UnknownValueError:&#xA;                print(f"Could not understand chunk {i &#x2B; 1}.")&#xA;            except sr.RequestError as e:&#xA;                print(f"Could not request results; {e}")&#xA;&#xA;        # Clean up temporary file&#xA;        os.remove(temp_file)&#xA;&#xA;    print(f"Processed {len(chunks)} chunks. Word MP3s saved in {output_folder}.")&#xA;&#xA;if __name__ == "__main__":&#xA;    input_file = input("Enter the path to the MP3 file: ").strip()&#xA;    output_dir = input("Enter the output folder path: ").strip()&#xA;&#xA;    mp3_to_words(input_file, output_dir)&#xA;

    &#xA;

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

    &#xA;

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

    17 avril 2024, par 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&#xA;and I'm using json file to get the clips correctly

    &#xA;

        let videos = 0;&#xA;    let stepsTrim = "";&#xA;    let concatInputs = "";&#xA;&#xA;    for (let i = 0; i &lt; 40; i&#x2B;&#x2B;) {&#xA;        if (unwantedWords[i].keepORdelete === true) {&#xA;            stepsTrim &#x2B;= `[0:v]trim=0:${&#xA;                unwantedWords[i].start&#xA;            },setpts=PTS[v${i}];[0:a]atrim=0:${&#xA;                unwantedWords[i].start&#xA;            },asetpts=PTS-STARTPTS[a${i}];[0:v]trim=${unwantedWords[i].start}:${&#xA;                unwantedWords[i].end&#xA;            },setpts=PTS[v${unwantedWords.length &#x2B; i &#x2B; 1}];[0:a]atrim=${&#xA;                unwantedWords[i].start&#xA;            }:${unwantedWords[i].end},asetpts=PTS-STARTPTS[a${&#xA;                unwantedWords.length &#x2B; i &#x2B; 1&#xA;            }];`;&#xA;&#xA;            concatInputs &#x2B;= `[v${i}][a${i}][v${unwantedWords.length &#x2B; i &#x2B; 1}][a${&#xA;                unwantedWords.length &#x2B; i &#x2B; 1&#xA;            }]`;&#xA;            videos &#x2B;= 2; &#xA;        }&#xA;    }&#xA;&#xA;    stepsTrim = stepsTrim.slice(0, -1);&#xA;&#xA;    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`;&#xA;

    &#xA;

    at the end after everything was done :

    &#xA;

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

    &#xA;

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

    &#xA;

    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

    &#xA;