
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (66)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (6173)
-
ffmpeg chains parameters and options while being used in a loop
10 janvier 2024, par Simon NazarenkoI got a code that generates videos from scratch (got gifs, captions and audio). It works amazing when done once, however, when put in a loop and it should create more than 1 video it freezes being caused by memory leak. Upon investigation I realized that ffmpeg (v1.1.0) chains the loop iterations carrying the parameters and options from the first iteration to the second. It then breaks (overwrites) the first video and infinitely writes the second.


This is my dependency


const ffmpeg = require("fluent-ffmpeg")()
 .setFfprobePath(ffprobe.path)
 .setFfmpegPath(ffmpegInstaller.path)



It looks like this


async function convertGifToVideo(
 gifFile,
 audioFile,
 subtitlesFile,
 tempDirectory
) {
 return new Promise((resolve, reject) => {
 const outputFile = `${tempDirectory}/video_${Date.now()}.mp4`
 
 ffmpeg
 .input(gifFile)
 .inputFormat("gif")
 .inputOptions("-stream_loop -1")
 .input(audioFile)
 .outputOptions("-shortest")
 .outputOptions(`-vf subtitles=${subtitlesFile}`)
 .outputOptions("-report")
 .output(outputFile)
 .on("end", () => {
 console.log(`Combined ${gifFile} and ${audioFile} into ${outputFile}`)
 resolve(outputFile)
 })
 .on("error", (err, stdout, stderr) => {
 console.error("Error combining GIF and audio:", err)
 console.error("ffmpeg stdout:", stdout)
 console.error("ffmpeg stderr:", stderr)
 reject(err)
 })
 .run()
 })
}



And it's called in a loop


for (const key in script) {
 if (script.hasOwnProperty(key)) {
 ...stuff

 const videoFileName = await convertGifToVideo(
 gifFileName,
 audioFileName,
 subtitlesFileName,
 tempDirectory
 )
 }
 }



Here is a piece of log from the first video generation




ffmpeg started on 2024-01-10 at 02:58:52
Report written to "ffmpeg-20240110-025852.log"
Command line :
/home/simon/Documents/AFYTUBE/node_modules/@ffmpeg-installer/linux-x64/ffmpeg -f gif -stream_loop -1 -i ./temp/gif_funny_frogs.gif -i ./temp/funny_frogs.mp3 -y -shortest -vf "subtitles=./temp/funny_frogs.srt" -report ./temp/video_1704880732780.mp4




Here is a piece of log from the second one




/home/simon/Documents/AFYTUBE/node_modules/@ffmpeg-installer/linux-x64/ffmpeg -f gif -stream_loop -1 -i ./temp/gif_funny_frogs.gif -i ./temp/funny_frogs.mp3 -f gif -stream_loop -1 -i ./temp/gif_leg_exercises.gif -i ./temp/leg_exercises.mp3 -y -shortest -vf "subtitles=./temp/funny_frogs.srt" -report -shortest -vf "subtitles=./temp/leg_exercises.srt" -report ./temp/video_1704880732780.mp4 ./temp/video_1704880750879.mp4




Any ideas what I am doing wrong ?


-
CRO Audit : Increase Your Conversions in 10 Simple Steps
25 mars 2024, par Erin -
libavformat : add RCWT closed caption muxex
14 janvier 2024, par Marth64libavformat : add RCWT closed caption muxex
Signed-off-by : Marth64 <marth64@proxyid.net>
Raw Captions With Time (RCWT) is a format native to ccextractor, a commonly
used open source tool for processing 608/708 closed caption (CC) sources.
It can be used to archive the original, raw CC bitstream and to produce
a source file file for later CC processing or conversion. As a result,
it also allows for interopability with ccextractor for processing CC data
extracted via ffmpeg. The format is simple to parse and can be used
to retain all lines and variants of CC.A free specification of RCWT can be found here :
https://github.com/CCExtractor/ccextractor/blob/master/docs/BINARY_FILE_FORMAT.TXT
This muxer implements the specification as of 01/05/2024, which has
been stable and unchanged for 10 years as of this writing.This muxer will have some nuances from the way that ccextractor muxes RCWT.
No compatibility issues when processing the output with ccextractor
have been observed as a result of this so far, but mileage may vary
and outputs will not be a bit-exact match.Specifically, the differences are :
(1) This muxer will identify as "FF" as the writing program identifier, so
as to be honest about the output's origin.(2) ffmpeg's MPEG-1/2, H264, HEVC, etc. decoders extract closed captioning
data differently than ccextractor from embedded SEI/user data.
For example, DVD captioning bytes will be translated to ATSC A53 format.
This allows ffmpeg to handle 608/708 in a consistant way downstream.
This is a lossless conversion and the meaningful data is retained.(3) This muxer will not alter the extracted data except to remove invalid
packets in between valid CC blocks. On the other hand, ccextractor
will by default remove mid-stream padding, and add padding at the end
of the stream (in order to convey the end time of the source video).