Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (66)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (6652)

  • Start and end time of MoviePy's VideoClip not working

    21 mars 2024, par ernesto casco velazquez

    I'm trying to add captions to a video. The desired outcome is to show each word in the exact moment is being said.

    &#xA;

    I have a method that gives me the accurate time start and end per each word :

    &#xA;

    def get_words_per_time(audio_speech_file):&#xA;    model = whisper.load_model("base")&#xA;    transcribe = model.transcribe(&#xA;        audio=audio_speech_file, fp16=False, word_timestamps=True&#xA;    )&#xA;    segments = transcribe["segments"]&#xA;    words = []&#xA;&#xA;    for seg in segments:&#xA;        for word in seg["words"]:&#xA;            words.append(&#xA;                {&#xA;                    "word": word["word"],&#xA;                    "start": word["start"],&#xA;                    "end": word["end"],&#xA;                    "prob": round(word["probability"], 4),&#xA;                }&#xA;            )&#xA;    return words&#xA;

    &#xA;

    Then I have a code that uses MoviePy to create TextClip and assing a given start and end time per pair of words (I know there are redundant statements, srry) :

    &#xA;

    def generate_captions(&#xA;    words,&#xA;    font="Komika",&#xA;    fontsize=32,&#xA;    color="White",&#xA;    align="center",&#xA;    stroke_width=3,&#xA;    stroke_color="black",&#xA;):&#xA;    text_comp = []&#xA;    for i in track(range(0, len(words), 2), description="Creating captions..."):&#xA;        word1 = words[i]&#xA;        if i &#x2B; 1 &lt; len(words):&#xA;            word2 = words[i &#x2B; 1]&#xA;        text_clip = TextClip(&#xA;            f"{word1[&#x27;word&#x27;]} {word2[&#x27;word&#x27;] if i &#x2B; 1 &lt; len(words) else &#x27;&#x27;}",&#xA;            font=font,  # Change Font if not found&#xA;            fontsize=fontsize,&#xA;            color=color,&#xA;            align=align,&#xA;            method="caption",&#xA;            size=(660, None),&#xA;            stroke_width=stroke_width,&#xA;            stroke_color=stroke_color,&#xA;        )&#xA;        text_clip = text_clip.set_start(word1["start"])&#xA;        text_clip = text_clip.set_end(&#xA;            word2["end"] if i &#x2B; 1 &lt; len(words) else word1["end"]&#xA;        )&#xA;        text_comp.append(text_clip)&#xA;    return text_comp&#xA;

    &#xA;

    Finally, I concatenate the words into a single video :

    &#xA;

    vid_clip = CompositeVideoClip(&#xA;    [vid_clip, concatenate_videoclips(text_comp).set_position(("center", 860))]&#xA;)&#xA;

    &#xA;

    The output is this, but you can clearly see the words are not flowing with the speech. They somehow move faster as if the start/end time did not matter. Here's the video

    &#xA;

    The words with their respective start/end time, look like this :

    &#xA;

    [&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;This&#x27;,&#xA;        &#x27;start&#x27;: 0.0,&#xA;        &#x27;end&#x27;: 0.22,&#xA;        &#x27;prob&#x27;: 0.805&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;is&#x27;,&#xA;        &#x27;start&#x27;: 0.22,&#xA;        &#x27;end&#x27;: 0.42,&#xA;        &#x27;prob&#x27;: 0.9991&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;a&#x27;,&#xA;        &#x27;start&#x27;: 0.42,&#xA;        &#x27;end&#x27;: 0.6,&#xA;        &#x27;prob&#x27;: 0.999&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;test,&#xA;        &#x27;,&#xA;        &#x27;start&#x27;: 0.6,&#xA;        &#x27;end&#x27;: 1.04,&#xA;        &#x27;prob&#x27;: 0.9939&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;to&#x27;,&#xA;        &#x27;start&#x27;: 1.18,&#xA;        &#x27;end&#x27;: 1.3,&#xA;        &#x27;prob&#x27;: 0.9847&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;show&#x27;,&#xA;        &#x27;start&#x27;: 1.3,&#xA;        &#x27;end&#x27;: 1.54,&#xA;        &#x27;prob&#x27;: 0.9971&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;words&#x27;,&#xA;        &#x27;start&#x27;: 1.54,&#xA;        &#x27;end&#x27;: 1.9,&#xA;        &#x27;prob&#x27;: 0.995&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;does&#x27;,&#xA;        &#x27;start&#x27;: 1.9,&#xA;        &#x27;end&#x27;: 2.16,&#xA;        &#x27;prob&#x27;: 0.997&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;not&#x27;,&#xA;        &#x27;start&#x27;: 2.16,&#xA;        &#x27;end&#x27;: 2.4,&#xA;        &#x27;prob&#x27;: 0.9978&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;appear.&#x27;,&#xA;        &#x27;start&#x27;: 2.4,&#xA;        &#x27;end&#x27;: 2.82,&#xA;        &#x27;prob&#x27;: 0.9984&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;At&#x27;,&#xA;        &#x27;start&#x27;: 3.46,&#xA;        &#x27;end&#x27;: 3.6,&#xA;        &#x27;prob&#x27;: 0.9793&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;their&#x27;,&#xA;        &#x27;start&#x27;: 3.6,&#xA;        &#x27;end&#x27;: 3.8,&#xA;        &#x27;prob&#x27;: 0.9984&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;proper&#x27;,&#xA;        &#x27;start&#x27;: 3.8,&#xA;        &#x27;end&#x27;: 4.22,&#xA;        &#x27;prob&#x27;: 0.9976&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;time.&#x27;,&#xA;        &#x27;start&#x27;: 4.22,&#xA;        &#x27;end&#x27;: 4.72,&#xA;        &#x27;prob&#x27;: 0.999&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;Thanks&#x27;,&#xA;        &#x27;start&#x27;: 5.04,&#xA;        &#x27;end&#x27;: 5.4,&#xA;        &#x27;prob&#x27;: 0.9662&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;for,&#xA;        &#x27;,&#xA;        &#x27;start&#x27;: 5.4,&#xA;        &#x27;end&#x27;: 5.66,&#xA;        &#x27;prob&#x27;: 0.9941&#xA;    },&#xA;    {&#xA;        &#x27;word&#x27;: &#x27;watching.&#x27;,&#xA;        &#x27;start&#x27;: 5.94,&#xA;        &#x27;end&#x27;: 6.36,&#xA;        &#x27;prob&#x27;: 0.7701&#xA;    }&#xA;]&#xA;

    &#xA;

    What could be causing this ?

    &#xA;

  • ffmpeg silenceremove - hear what bits are removed

    7 avril 2020, par jimo

    ffmpeg silenceremove is pretty cool. im loving it. i can trim 3 second silences to 2 seconds and reduce a 1.5 hour file of spoken audio down 3 or 4 minutes (depending on the speaker).

    &#xA;&#xA;

    once in a while I do hear my choice for stop_threshold (ie-40dB on audio only analog file) does cause the end of a word to be clipped, just here and there when the speaker trails off softly at the end of the word.

    &#xA;&#xA;

    is there any way to output what is trimmed to a file ? so I can listen to it and get an idea of just how often this word clipping happens ?

    &#xA;&#xA;

    thanks !

    &#xA;

  • Anomalie #2244 : association fichiers zip - nom fichier long - css privé

    23 mars 2012, par cedric -

    #grml... c’est le word-wrap:break-word qui est pas appliqué chez toi, ou qui est pas pris en compte, ou qui fait rien sur ce cas là ? où alors un max-width manquant ? Parceque hein ça marchait au moment du patch... :(