Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (75)

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

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (9919)

  • Script to cut video by silence part with FFMPEG

    11 février 2020, par fricadelle

    This is a question that is raised here How to split video or audio by silent parts or here How can I split an mp4 video with ffmpeg every time the volume is zero ?

    So I was able to come up with a straightforward bash script that works on my Mac.

    Here it is (only argument is the name of the video to be cut, it will generate a file start_timestamps.txt with the list of silence starts if the file does not exist and reuse it otherwise) :

    #!/bin/bash

    INPUT=$1

    filename=$(basename -- "$INPUT")
    extension="${filename##*.}"
    filename="${filename%.*}"

    SILENCE_DETECT="silence_detect_logs.txt"
    TIMESTAMPS="start_timestamps.txt"

    if [ ! -f $TIMESTAMPS ]; then
       echo "Probing start timestamps"
       ffmpeg -i "$INPUT" -af "silencedetect=n=-50dB:d=3" -f null - 2> "$SILENCE_DETECT"
       cat "$SILENCE_DETECT"| grep "silence_start: [0-9.]*" -o| grep -E '[0-9]+(?:\.[0-9]*)?' -o > "$TIMESTAMPS"
    fi

    PREV=0.0
    number=0

    cat "$TIMESTAMPS"| ( while read ts
    do
       printf -v fname -- "$filename-%02d.$extension" "$(( ++number ))"
       DURATION=$( bc <<< "$ts - $PREV")
       ffmpeg -y -ss "$PREV" -i "$INPUT" -t "$DURATION" -c copy "$fname"
       PREV=$ts
    done
    printf -v fname -- "$filename-%02d.$extension" "$(( ++number ))"
    ffmpeg -y -ss "$PREV" -i "$INPUT" -c copy "$fname" )

    Unfortunately it does not seem to work :

    I have a video that is basically a collection of clips, each clip being introduced by a 5 second silence with a static frame with a title on it. So I want to cut the original video so that each chunk is the 5 seconds "introduction" + video until the next introduction. Hope it’s clear.

    Anyway, in my script I first find all silence_start using ffmpeg silencedetect plugin. I get a start_timestamps.txt that read :

    141.126
    350.107
    1016.07
    etc.

    Then for example I would call (I don’t need to transcode again the video), knowing that (1016.07 - 350.107) = 665.963

    ffmpeg -ss 350.107 -i Some_video.mp4 -t 665.963 -c copy "Some_video02.mp4"

    The edge cases being the first chunk that has to go from 0 to 141.126 and the last chunk that has to go from last timestamp to end of the video.

    Anyway the start_timestamps seem legit. But my output chunks are completely wrong. Sometimes the video does not even play anymore in Quicktime. I don’t even have my static frame with the title in any of the videos...

    Hope someone can help. Thanks.

    EDIT Ok as explained in the comments, if I echo $PREV while commenting out the ffmpeg command I get a perfectly legit list of values :

    0.0
    141.126
    350.107
    1016.07
    etc.

    With the ffmpeg command I get :

    0.0
    141.126
    50.107
    016.07
    etc.

    bash variable changes in loop with ffmpeg shows why.

    I just need to append < /dev/null to the ffmpeg command or add -nostdin argument. Thanks everybody.

  • How to add watermark to the video part of this huge ffmpeg command that adds intro and outro with crossfade ?

    3 juillet 2017, par Jeflopo

    I wrote a command that crossfade merge an intro, an outro, with a video :

    enter image description here

    ffmpeg -i intro.mp4 -i video.mp4 -i outro.mp4 -filter_complex "
    [0:v]trim=start=0:end=9,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[intro];
    [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[firstfadeoutclip];
    [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[firstfadeinclip];
    [1:v]trim=start=1:end=24,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[video];
    [1:v]trim=start=24:end=25,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[secondfadeoutclip];
    [2:v]trim=start=0:end=1,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[secondfadeinclip];
    [2:v]trim=start=1:end=10,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[outro];
    [firstfadeoutclip]format=pix_fmts=yuva420p, fade=t=out:st=0:d=1:alpha=1[firstfadeoutalpha];
    [firstfadeinclip]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[firstfadeinalpha];
    [secondfadeoutclip]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[secondfadeoutalpha];
    [secondfadeinclip]format=pix_fmts=yuva420p, fade=t=in:st=0:d=1:alpha=1[secondfadeinalpha];
    [firstfadeoutalpha]fifo[firstfadeoutfifo];
    [firstfadeinalpha]fifo[firstfadeinfifo];
    [secondfadeoutalpha]fifo[secondfadeoutfifo];
    [secondfadeinalpha]fifo[secondfadeoinfifo];
    [firstfadeoutfifo][firstfadeinfifo]overlay[firstcrossfade];
    [secondfadeoutfifo][secondfadeoinfifo]overlay[secondcrossfade];
    [intro][firstcrossfade][video][secondcrossfade][outro]concat=n=5[output];
    [0:a][1:a] acrossfade=d=1 [audio]"
    -vcodec libx264 -map "[output]" -map "[audio]" "output.mp4"

    This huge command works fine.

    But now what I want to do is to add a watermark to the video part :

    [1:v]trim=start=1:end=24,setpts=PTS-STARTPTS,scale=480x360,setsar=sar=16/9[video];

    And I want to do it by merging this command (watermark) into that one above :

    ffmpeg -i "1080p.mp4" -filter_complex "
    movie=logo-wm.png[watermark];
    [watermark][0:V]scale2ref=(1917*iw/1920)/3.5:(322*iw/1920)/3.5[wm][v];
    [v][logo]overlay=main_w-overlay_w-20:20" "output.mp4"

    The whole (1917*iw/1920)/3.5:(322*iw/1920)/3.5 scales the watermark proportionally using the scale2ref= filter. The 1917 is the width of my watermark image, and 322 is the height

    It is overlayed in the top right corner with main_w-overlay_w-20:20

    But I can’t make it work I tried to add it by copying the parameters to the filter of [1:v] input. And by adding another input for the watermark that if I’m right it would be [3:v] instead of using the movie= filter. But I can’t.

    I know that I could do it in two steps, but I would like to do it at once, in just one command.

    May anyone help me to merge them ? Thank you in advance !

  • Revision f1781e86b7 : Refactoring of rate control - part 1 Moves all rate control variables to a sepa

    6 novembre 2013, par Deb Mukherjee

    Changed Paths :
     Modify /vp9/encoder/vp9_firstpass.c


     Modify /vp9/encoder/vp9_mbgraph.c


     Modify /vp9/encoder/vp9_onyx_if.c


     Modify /vp9/encoder/vp9_onyx_int.h


     Modify /vp9/encoder/vp9_ratectrl.c


     Modify /vp9/encoder/vp9_ratectrl.h


     Modify /vp9/encoder/vp9_temporal_filter.c



    Refactoring of rate control - part 1

    Moves all rate control variables to a separate structure,
    removes some currently unused variables,
    moves some rate control functions to vp9_ratectrl.c,
    and splits the encode_frame_to_data_rate function.

    Change-Id : I4ed54c24764b3b6de2dd676484f01473724ab52b