
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (87)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (14930)
-
NodeJS - How to pipe same video stream to multiple clients ?
6 mai 2019, par SergioBRWe have a situation trying to serve a video stream.
Since HTML5 video tag does not support udp to multicast, we are trying to re-use an already converted ffmpeg stream and send it to more than one response. But that does not work.
The first response gets the stream alright, but the second one does not.
It seems that the stream cannot be piped out to another response, neither can it be cloned.Has anyone done that before ? Any ideas ?
Thanks in advance !
Here’s the code :
var request = require('request');
var http = require('http');
var child_process = require("child_process");
var n = 1;
var stdouts = {};
http.createServer(function (req, resp) {
console.log("***** url ["+req.url+"], call "+n);
if (req.url != "/favicon.ico" && req.url != "/")
{
var params = req.url.substring(1).split("/");
switch (params[0])
{
case "VIEW":
if (params[1] == "C2FLOOR1" || params[1] == "C2FLOOR2" || params[1] == "C2PORFUN" || params[1] == "C2TESTCAM")
var camera = "rtsp://192.168.16.19:554/Inter/Cameras/Stream?Camera="+params[1];
else
var camera = "http://192.168.16.19:8609/Inter/Cameras/GetStream?Camera="+params[1];
// Write header
resp.writeHead(200, {'Content-Type': 'video/ogg', 'Connection': 'keep-alive'});
if (stdouts.hasOwnProperty(params[1]))
{
console.log("Getting stream already created for camera "+params[1]);
var newStdout = Object.create(stdouts[params[1]]);
newStdout.pipe(resp);
}
else
{
// Start ffmpeg
var ffmpeg = child_process.spawn("ffmpeg",[
"-i",camera,
"-vcodec","libtheora",
"-qscale:v","7", // video quality
"-f","ogg", // File format
"-g","1", // GOP (Group Of Pictures) size
"-" // Output to STDOUT
]);
stdouts[params[1]] = ffmpeg.stdout;
// Pipe the video output to the client response
ffmpeg.stdout.pipe(resp);
console.log("Initializing camera at "+camera);
}
// Kill the subprocesses when client disconnects
/*
resp.on("close",function(){
ffmpegs[params[1]].kill();
console.log("FIM!");
});
*/
break;
}
}
else
{
resp.writeHeader(200, {"Content-Type": "text/html"});
resp.write("WRONG CALL");
resp.end();
}
n++;
}).listen(8088);
console.log('Server running at port 8088'); -
Unable to set thumbnail image to mp3 file using ffmpeg sending it's output to console (ffmpeg pipe:1) [duplicate]
3 mai 2019, par remortThis question already has an answer here :
I need to add thumbnails (album art) to mp3 (and other) files programmatically (using python) and save ffmpeg output in memory (to be able to send resulting bytes to another process).
Pay attention to
'-f', 'mp3', 'pipe:1'
in last example please. Ffmpeg breaks working with pipe unless you set format for resulting stream.What I have now :
1. This example bash oneliner works as expected making proper mp3 files with thimbnails (Telegram plays audio and shows thumbnail) :ffmpeg -i qwe.mp3 -i asd.png -acodec copy -map 0 -map 1 -disposition:v:1 attached_pic out.mp3
- This python code does the same with same result :
subprocess.run(['ffmpeg', '-i', 'qwe.mp3', '-i', 'asd.png', '-acodec', 'copy', '-map', '0', '-map', '1', '-disposition:v:1', 'attached_pic', 'out.mp3'])
- But I need bytes, not file on file system, so I do the following and get bytes. But then, if I save those bytes to file, it results to broken mp3 file. I cant play it with Deadbeef and Telegram.
audio_data = subprocess.run(['ffmpeg', '-i', 'qwe.mp3', '-i', 'asd.png', '-acodec', 'copy', '-map', '0', '-map', '1', '-disposition:v:1', 'attached_pic', '-f', 'mp3', 'pipe:1'], stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
len(audio_data.stdout)
2621690 # 2,6 Mbytes, it's ok
with open('out.mp3', 'wb') as f:
f.write(audio_data.stdout)Last example gives me a broken mp3 file. It can’t be played in deadbeef and Telegram.
I suggest that problem is somewhere around several streams (-map parameters) or/and with
-f mp3
directive (since I have an image inside an mp3 stream or something like that).I tried setting additional id2v3 tags and changing other options but no luck. Any suggestions in this ?
-
ffmpeg use pipe fails with : Unable to find a suitable output format for 'pipe:1 :'
2 mai 2019, par lin yuansenUsing pipe protocol
ffmpy can read input from STDIN and write output to STDOUT. This can be achieved by using the FFmpeg pipe protocol.The following example reads data from a file containing raw video frames in RGB format and passes it to ffmpy on STDIN ; ffmpy in its turn will encode raw frame data with H.264 and pack it in an MP4 container passing the output to STDOUT (note that you must redirect STDOUT of the process to a pipe by using
subprocess.PIPE
as stdout value, otherwise the output will get lost) :>>> import subprocess
>>> ff = FFmpeg(
... inputs={'pipe:0': '-f rawvideo -pix_fmt rgb24 -s:v 640x480'},
... outputs={'pipe:1': '-c:v h264 -f mp4'}
... )
>>> ff.cmd
'ffmpeg -f rawvideo -pix_fmt rgb24 -s:v 640x480 -i pipe:0 -c:v h264 -f mp4 pipe:1'
>>> stdout, stderr = ff.run(input_data=open('rawvideo', 'rb').read(), stdout=subprocess.PIPE)But the above code does not work for me.