
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
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 (44)
-
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 -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (6163)
-
How do I exit or kill a running OS process (FFMPEG) started with Node.js without crashing my app ?
18 novembre 2022, par Alula LeakemariamI am developing an express application that starts FFMPEG through nodejs's child_process. The process starts, but when I try deleting specific processes by pid, the whole app crashes and has to be restarted.


I start the stream with this :


const { spawn, exec } = require("child_process");
const execFile = require("child_process").execFile;

function startStream(foo, url, bar) {
 const ls = spawn(`mkdir`, [`$foo`], {
 cwd: `path/to/working/dir`,
 stdio: "inherit",
 });

 const child = execFile(
 "ffmpeg",
 ["-i", url, "-hls_flags", "delete_segments", "-c", "copy", `path/to/file.m3u8`],
 { maxBuffer: Infinity },
 (error, stdout, stderr) => {
 if (error) {
 console.error("stderr: =============================", stderr);
 throw error;
 }
 console.log("stdout: ==========================", stdout);
 }
 );

 const checkProcesses = exec(`ps`, (error, stdout, stderr) => {
 if (error) {
 console.error("stderr: =============================", stderr);
 throw error;
 }
 console.log("stdout: ==========================", stdout);
 });

 return child.pid;
}

module.exports = startStream;



The code below is the results of running the ps command to list the running processes, which lists ffmpeg as one of them. This will also show ffmpeg again for each time I run the function above.


6394 pts/3 00:00:00 bash
 110129 pts/3 00:00:28 npm run start
 110140 pts/3 00:00:00 sh
 110141 pts/3 00:00:38 node
 136730 pts/3 00:00:00 node
 137148 pts/3 00:00:00 ffmpeg
 137358 pts/3 00:00:00 sh
 137359 pts/3 00:00:00 ps




This will also start copying the FFMPEG files to the directory as expected. Afterwards, another endpoint will use the function below to delete the files created and (attempt to) kill the process :


const { spawn, exec } = require("child_process");
const kill = require("tree-kill");

async function endStream(foo, bar, pid) {
 kill(pid, "SIGKILL");

 // Also tried this commented out code below with spawn and exec
 // const killProcessByPid = spawn("kill", ["-9", `${pid}`]);
 
 const ls = exec(`rm -rf ${foo}`, {
 cwd: `./path/to/working/dir`,
 });
}
module.exports = endStream;




I've tried a few variations but the result I get is usually along the lines of this :


Exiting normally, received signal 15.

 at ChildProcess.exithandler (node:child_process:402:12)
 at ChildProcess.emit (node:events:513:28)
 at maybeClose (node:internal/child_process:1100:16)
 at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
 code: 255,
 killed: false,
 signal: null,
 cmd: 'ffmpeg -i <url>.m3u8 -hls_flags delete_segments -c copy path/to/file.m3u8'
}
[nodemon] app crashed - waiting for file changes before starting..

</url>


I only started using exec/execFile/spawn after failing with libraries like fluent-ffmpeg and a few others, though it doesn't look like starting the process causes the same issues that exiting them do.


If there's anything else I can optimize while my code is up, i'd love to hear it. I'm not even sure if this code will have success with many ffmpeg processes running concurrently.


I am running this on linux (ubuntu) right now and eventually plan to deploy the server.


-
avcodec/pictordec : Remove mid exit branch
25 novembre 2022, par Michael Niedermayeravcodec/pictordec : Remove mid exit branch
This causes the RLE decoder to exit before applying the last RLE run
All images i tested with are unchanged, this makes the special case
for handling the last run unused for non truncated images.Reviewed-by : Peter Ross <pross@xvid.org>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
Flutter - FFmpeg Kit exit with code 1 when creating video but not converting video
30 août 2023, par NasirI'm working on simple flutter video converting app, its returning with 'Conversion Failed'. here is my code.


Directory tempDir = await getTemporaryDirectory();
 String timestamp = DateTime.now().millisecondsSinceEpoch.toString();
 String outputPath = "${tempDir.path}/$timestamp.mp4";

 String command =
 '-i $_videoPath -vf "scale=$vidWidth:$vidHeight" -c:v libx264 -crf 23 $outputPath';

 await FFmpegKit.executeAsync(command, (session) async {
 final returnCode = await session.getReturnCode();
 print('................... $returnCode');
 if (returnCode == 1) {
 ScaffoldMessenger.of(context)
 .showSnackBar(SnackBar(content: Text('Video Saved')));
 await GallerySaver.saveVideo(outputPath);
 } else {
 ScaffoldMessenger.of(context)
 .showSnackBar(SnackBar(content: Text('Conversion Failed')));
 }
 });



I use flutter_ffmpeg which was working fine. but its not working with FFmpegKit,