
Recherche avancée
Autres articles (63)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...)
Sur d’autres sites (5562)
-
FFmpeg child process closed, code null, signal SIGSEGV
22 novembre 2022, par AMRITESH GUPTAI have been working on a project where I am trying to get users' audio and video and stream it to youtube live. I tested my code on my windows machine, and everything is working fine, but when I deploy my server code on Heroku, I get this error
FFmpeg child process closed, code null, signal SIGSEGV
.

I used https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git for Heroku buildpack.


Code snippet :


const inputSettings = ['-i', '-', '-v', 'error'];

const youtubeSettings = () => {
 
 return [
 // video codec config: low latency, adaptive bitrate
 '-c:v',
 'libx264',
 '-preset',
 'veryfast',
 '-tune',
 'zerolatency',
 '-g:v',
 '60',
 
 // audio codec config: sampling frequency (11025, 22050, 44100), bitrate 64 kbits
 '-c:a',
 'aac',
 '-strict',
 '-2',
 '-ar',
 '44100',
 '-b:a',
 '64k',
 
 //force to overwrite
 '-y',
 
 // used for audio sync
 '-use_wallclock_as_timestamps',
 '1',
 '-async',
 '1',
 
 '-f',
 'flv',
 youtubeURL,
 ]
 
}

const ffmpegInput = inputSettings.concat(youtubeSettings());


io.on('connection', (socket) => {
 console.log(`socket connected to ${socket.id}`)
 
 try{

 const ffmpg = child_process.spawn('ffmpeg',ffmpegInput)

 ffmpg.on('close', (code, signal) => {
 console.log(
 'FFmpeg child process closed, code ' + code + ', signal ' + signal
 );
 // ws.terminate()
 })

 ffmpg.stdin.on('error', (e) => {
 console.log('FFmpeg STDIN Error', e)
 })

 // FFmpeg outputs all of its messages to STDERR. Let's log them to the console.
 ffmpg.stderr.on('data', (data) => {
 console.log('FFmpeg STDERR:', data.toString());
 })

 socket.on('message', (msg) => {
 console.log('DATA', msg)
 ffmpg.stdin.write(msg);
 })

 // If the client disconnects, stop FFmpeg.
 socket.conn.on('close', (e) => {
 console.log('kill: SIGINT')
 ffmpg.kill('SIGINT')
 })
}
catch(err){
 console.log(err);
}



Heroku logs




-
Ffmpeg HLS conversion error on AWS Lambda - ffmpeg was killed with signal SIGSEGV
20 octobre 2023, par RtiM0I'm trying to convert video files into HLS streams on a AWS Lambda. The ffmpeg configuration I have setup works for normal (Non HLS) transcoding, but in case of HLS it throws the following error :


stderr:
frame= 341 fps= 84 q=34.0 q=32.0 q=28.0 size=N/A time=00:00:12.52 bitrate=N/A speed= 3.1x 
frame= 385 fps= 85 q=34.0 q=31.0 q=27.0 size=N/A time=00:00:13.97 bitrate=N/A speed=3.08x 
frame= 433 fps= 86 q=33.0 q=30.0 q=27.0 size=N/A time=00:00:15.55 bitrate=N/A speed=3.08x 
[hls @ 0x702c480] Cannot use rename on non file protocol, this may lead to races and temporary partial files
[hls @ 0x702c480] Opening '/tmp/stream_0.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/stream_1.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/stream_2.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/master.m3u8' for writing
ffmpeg was killed with signal SIGSEGV



And I error thrown by fluent-ffmpeg is this :


2023-03-06T10:21:44.555Z 15a0a43b-5e24-42ac-ae72-fe04f0c72a3e ERROR Invoke Error 
{
 "errorType": "Error",
 "errorMessage": "ffmpeg was killed with signal SIGSEGV",
 "stack": [
 "Error: ffmpeg was killed with signal SIGSEGV",
 " at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:180:22)",
 " at ChildProcess.emit (node:events:513:28)",
 " at ChildProcess._handle.onexit (node:internal/child_process:291:12)"
 ]
}
</anonymous>


This is the code I run on AWS Lambda to convert video files into HLS :


export const compressToHLS = (sourcePath, outputFolder) =>
 new Promise((resolve, reject) => {
 Ffmpeg(sourcePath)
 .complexFilter([
 {
 filter: "split",
 options: "3",
 inputs: "v:0",
 outputs: ["v1", "v2", "v3"],
 },
 {
 filter: "scale",
 options: {
 w: 1280,
 h: 720,
 },
 inputs: "v1",
 outputs: "v1out",
 },
 {
 filter: "scale",
 options: {
 w: 960,
 h: 540,
 },
 inputs: "v2",
 outputs: "v2out",
 },
 {
 filter: "scale",
 options: {
 w: 640,
 h: 360,
 },
 inputs: "v3",
 outputs: "v3out",
 },
 ])
 .outputOptions([
 "-map [v1out]",
 "-c:v:0",
 "libx264",
 "-b:v 3000000",
 "-map [v2out]",
 "-c:v:1",
 "libx264",
 "-b:v 2000000",
 "-map [v3out]",
 "-c:v:2",
 "libx264",
 "-b:v 1000000",
 ])
 .outputOptions([
 "-map a:0",
 "-c:a:0 aac",
 "-b:a:0 96000",
 "-ar 48000",
 "-ac 2",
 "-map a:0",
 "-c:a:1 aac",
 "-b:a:1 96000",
 "-ar 48000",
 "-ac 2",
 "-map a:0",
 "-c:a:2 aac",
 "-b:a:2 96000",
 "-ar 48000",
 "-ac 2",
 ])
 .outputOptions([
 "-f hls",
 "-hls_time 10",
 "-hls_playlist_type vod",
 "-hls_flags independent_segments",
 "-hls_segment_type mpegts",
 `-hls_segment_filename ${outputFolder}/%v_%d.ts`,
 "-master_pl_name master.m3u8",
 ])
 .outputOption("-var_stream_map", "v:0,a:0 v:1,a:1 v:2,a:2")
 .outputOption("-preset veryfast")
 .output(`${outputFolder}/stream_%v.m3u8`)
 .on("start", (cmdline) => console.log(cmdline))
 .on("progress", (progress) => {
 let prog = Math.floor(progress.percent * 10) / 10;
 if (Math.round(prog) % 10 == 0) {
 console.log(`${prog}% complete`);
 }
 })
 .on("error", (err, stdout, stderr) => {
 if (err) {
 console.log(err.message);
 console.log("stdout:\n" + stdout);
 console.log("stderr:\n" + stderr);
 reject(err);
 }
 })
 .on("end", () => resolve())
 .run();
 });



In this code the sourcePath is usually a presigned URL from S3 (But I have also tried to download a file on /tmp and setting sourcePath as the path to the downloaded file) and outputFolder is
tmpdir()
which is/tmp
.

I have the lambda settings configured to have 10GB of memory and 10GB of ephemeral storage (the maximum allowed).


-
Error : ffmpeg was killed with signal SIGSEGV - error when deploying to server
9 novembre 2023, par ZippytyroI've built a telegram bot using
telegraf
, I'm usingfluent-ffmpeg
and@ffmpeg-installer/ffmpeg
packages for converting OGG audio to WAV.

Works fine locally, but when I deploy to railway.app platform, it throws an error at runtime.

node:events:491 throw er; // unhandled 'error' event ^ Error: ffmpeg was killed with signal SIGSEGV



Someone told to add
ffmpeg
binary via nixpkgs or aptPkgs like so :
[phases.setup] aptPkgs = ["...", "ffmpeg"]


Since the platform uses nixpacks buildpack.
However, the same error persists.