
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (61)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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
Sur d’autres sites (8305)
-
pgssubdec : fix subpicture output colorspace and range
24 avril 2016, par Jan Ekströmpgssubdec : fix subpicture output colorspace and range
Functionality used before didn’t widen the values from limited to
full range. Additionally, now the decoder uses BT.709 where it
should be used according to the video resolution.Default for not yet set colorimetry is BT.709 due to most observed
HDMV content being HD.BT.709 coefficients were gathered from the first two parts of BT.709
to BT.2020 conversion guide in ARIB STD-B62 (Pt. 1, Chapter 6.2.2).
They were additionally confirmed by manually calculating values.Fixes #4637
-
avfilter/af_headphone : increase max ir length
25 septembre 2017, par Paul B Mahol -
How to duplicate an audio file or trim it to a specific length in ffmpeg ?
21 octobre 2023, par Руслан ЛысенкоI want to combine a video file (with audio) and an audio file together to get one output file.


Most importantly, I need to do the following.


If the length of the video file is longer, then you need to increase the length of the audio file to this length.


If the audio file is longer than the video file, then make the audio file shorter to match the length of the video.


Example :


Video 2 minutes 5 seconds


Audio 1 minute -> duplicated to 2 minutes 5 seconds.


If


Video 1 minute


Audio 2 minutes 5 seconds -> trimmed to 1 minute.


But, I can't even increase the length of the audio file.


export async function overlayAudio(id: number, music: Music) {
 console.log('start')
 const videoPath = path.join(__dirname, `../../../uploads/movie/${id}/result/movie/predfinal.mp4`);
 
 if (music === null) {
 return videoPath.match(/\\uploads(.*)/)[0];
 } else {
 const audioPath = path.join(__dirname, `../../../${music.audio}`);
 const outputVideoPath = path.join(__dirname, `../../../uploads/movie/${id}/result/movie/output.mp4`);
 const matchPath = outputVideoPath.match(/\\uploads(.*)/);
 const cmd = `ffmpeg -i ${videoPath} -i ${audioPath} -filter_complex "[0:a]volume=1[a];[1:a]volume=0.2[b];[b]apad[looped_audio];[a][looped_audio]amix=inputs=2:duration=longest" -c:v copy -c:a aac -strict experimental -shortest ${outputVideoPath}`;

 try {
 await execPromise(cmd);
 console.log('end!')
 return matchPath[0];
 } catch (error) {
 console.error('Error:', error);
 throw error;
 }
 }
}