
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (59)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Emballe médias : à quoi cela sert ?
4 février 2011, parCe 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" ;
Sur d’autres sites (9322)
-
Script to cut video by silence part with FFMPEG
11 février 2020, par fricadelleThis 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.
-
Problem with streamcopy of a part of av1 video in ffmpeg
22 avril 2020, par vorromI'm trying to cut part of a video from av1-mp4 file with FFMmpeg command and I want do it withuout recompressing. But there is no result.
I try method with -ss -t or -to parameters with different combinations.



ffmpeg -ss 10 -i D:\in_av1.mp4 -t 5 -vcodec copy -acodec copy D:\out_av1.mp4




-ss from input file get me 15 seconds video from beginning instead 5 seconds from 10



ffmpeg -i D:\in_av1.mp4 -ss 10 -t 5 -vcodec copy -acodec copy D:\out_av1.mp4




this way get 5 seconds audio file without video data.
It seems to me that coder can not find start point for operation.



I make an av1.mp4 example file, you can find it here. https://pixeldrain.com/u/c8fbQgYK I understand that AV1 is new format and have experimental flag while converting with it. But nevertheless FFmpeg carrectly change result when I change -t parameter. If I use



ffmpeg -ss 10 -i D:\in_av1.mp4 -t 7 -vcodec copy -acodec copy D:\out_av1.mp4




it give me 17 seconds. So -t part working. Whats why I hope there is way to solve my problem.



I use ffmpeg-20200417-889ad93-win64-static for Windows.


-
All audios should be played after combing using ffmpeg. But there is only audio for the first part
6 mai 2020, par Eric ZThis code is combining 3 mp4 files using ffmpeg command. Each file has audio. 
After combining, I can listen audio for only first part. 
How can I solve this problem ?



===========================================================================



ffmpeg -y -i "tmp/titled-0c33a83dc70534c67f66.mp4" -i "tmp/titled-1c2fc9a95e644ab135a3.mp4" -i "tmp/titled-73c3fb1a3ea435cacdd2.mp4" -i "logo/logo.png" -filter_complex "
nullsrc=s=1280x720[bg];
[0:v]setpts=PTS-STARTPTS+0/TB[v0];
[1:v]setpts=PTS-STARTPTS+4.039/TB[v1];
[2:v]setpts=PTS-STARTPTS+8.078/TB[v2];
[bg][v0]overlay=x='if(lte(t,4.039),0,min(0,-w*min(1,max(0,0.98*(t-4.039)^2))))':y=0,trim=duration=13.145[bg];
[bg][v1]overlay=x='if(gte(t,8.078),-w*min(1,max(0,0.98*(t-8.078)^2)),max(0,1280*(1-min(1,max(0,0.69*(atan(8*(t-4.039)^2.7)))))))':y=0[bg];
[bg][v2]overlay=x='max(0,1280*(1-min(1,max(0,0.69*(atan(8*(t-8.078)^2.7))))))':y=0"
-y -vcodec h264 -crf 13 -acodec aac -strict -2 "out.mp4"