
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (100)
-
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 (...) -
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" (...)
Sur d’autres sites (15761)
-
NodeJs : How to pipe two streams into one spawned process stdin (i.e. ffmpeg) resulting in a single output
20 juin 2018, par Keyne VianaIn order to convert PCM audio to MP3 I’m using the following :
function spawnFfmpeg() {
var args = [
'-f', 's16le',
'-ar', '48000',
'-ac', '1',
'-i', 'pipe:0',
'-acodec', 'libmp3lame',
'-f', 'mp3',
'pipe:1'
];
var ffmpeg = spawn('ffmpeg', args);
console.log('Spawning ffmpeg ' + args.join(' '));
ffmpeg.on('exit', function (code) {
console.log('FFMPEG child process exited with code ' + code);
});
ffmpeg.stderr.on('data', function (data) {
console.log('Incoming data: ' + data);
});
return ffmpeg;
}Then I pipe everything together :
writeStream = fs.createWriteStream( "live.mp3" );
var ffmpeg = spawnFfmpeg();
stream.pipe(ffmpeg.stdin);
ffmpeg.stdout.pipe(/* destination */);The thing is... Now I want to merge (overlay) two streams into one. I already found how to do it with ffmpeg : How to overlay two audio files using ffmpeg
But, the ffmpeg command expects two inputs and so far I’m only able to pipe one input stream into the
pipe:0
argument. How do I pipe two streams in the spawned command ? Would something likeffmpeg -i pipe:0 -i pipe:0...
work ? How would I pipe the two incoming streams with PCM data (since the command expects two inputs) ? -
How does ffmpeg read stdin pipe ?
17 novembre 2017, par ciclopezI’m working on a Python script that generates an image sequence based on user real time remote interaction, and uses ffmpeg to compress and stream this image sequence over the network for the user to watch it.
As soon as an image is generated the script writes it to ffmpeg’s stdin and this action is repeated inside a loop to form a video.I was wondering what happens when ffmpeg is busy processing the previous image when I write to stdin.
- Does the .stdin.write() command block execution until ffmpeg finishes processing the previous image ? (Consequence of the pipe buffer filling up)
- What’s the buffer size of subprocess.PIPE ?
- Is it editable ?
- Is it possible to overwrite this buffer if it’s full, instead of blocking execution ?
- Does ffmpeg continually read it’s input in a parallel process and buffers it until it’s free to take care of it ?
- If that’s the case, what’s the size of ffmpeg’s input buffer and how can I change it ?
I’m asking this because I want to fully understand how the data travels between Python and ffmpeg to reduce the latency to its minimum.
Here is the part of the code I’m using to start ffmpeg :
cmd = ['ffmpeg',
'-f', 'rawvideo',
'-s', '%dx%d'%(width, height),
'-pix_fmt', 'rgba',
'-r', '%d'%fps,
'-i', '-',
'-an',
'-vcodec', 'libx264',
'-tune', 'zerolatency',
'-preset', 'ultrafast',
'-bf', '0',
'-f', 'mpegts',
'udp://xxx.xxx.xxx.xxx:xxxxx']
proc = subprocess.Popen(cmd, stdin=subprocess.PIPE)And this is what I call inside a loop when I want to pass an image to ffmpeg :
proc.stdin.write(image)
-
make fifo pipe in java(windows), write some data into it, let other process read the pipe
9 novembre 2017, par vs93My objective is to create a named pipe(fifo) in windows(java), write some data(coming from camera) into that and invoke ffmpeg command to make mp4 from that data. But I suspect that it is not opening a fifo pipe, rather it is opening a file. How can I make it open a fifo pipe ?
Here is the code :public void run () {
String mp4Folder = "C://Users/user_2/Desktop/streamDestination"; // Where the MP4 is to be kept
VFrame frame = null;
int actualPipeValLen = 0;
FileOutputStream requestStream = null;
long lastProcessedTS = 0;
final String FIFOPATH = "D://FIFO//";
final String PIPE_NAME = FIFOPATH + "myfifo";
final String MKFIFOCOMMAND = "mkfifo -m=rw " + PIPE_NAME;
final String DELFIFOCOMMAND = "rm -r " + PIPE_NAME;
String mp4FileName = mp4Folder + File.separator + "1.mp4";
mp4FileName = mp4FileName.replace("\\", "/");
long firstTimeStamp = 0;
try {
Runtime.getRuntime().exec(MKFIFOCOMMAND);
} catch (IOException e1) {
e1.printStackTrace();
}
if(firstTimeStamp == 0) {
firstTimeStamp = frame.getTimestamp();
}
if((frame.getTimestamp() - firstTimeStamp) > (15 * 1000)) {
if(requestStream != null) {
requestStream.close();
requestStream = null;
}
if(actualPipeValLen > 0) {
String[] ffmpeg = new String[] {"ffmpeg", "-i", PIPE_NAME , "-vcodec", "copy", mp4FileName };
Process ffmpegProcess = Runtime.getRuntime().exec(ffmpeg);
actualPipeValLen = 0;
firstTimeStamp = lastProcessedTS;
Thread.sleep(2 * 1000);
try {
Runtime.getRuntime().exec(DELFIFOCOMMAND);
} catch (IOException e1) {
e1.printStackTrace();
}
System.exit(0);
}
} else {
System.out.println("Writing into pipe : " + actualPipeValLen);
if(requestStream == null) {
requestStream = new FileOutputStream(PIPE_NAME);
}
requestStream.write(frame.getFrame());
actualPipeValLen += frame.getFrame().length;
lastProcessedTS = frame.getTimestamp();
}}