
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (107)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (10157)
-
How to save audio chunks from client to ffmpeg readable file ?
22 septembre 2023, par LuckOverflowI am live recording audio data from a TS React front-end and need to send it to the server, where it can be saved to a file so that ffmpeg can mix it. The front-end saves the mic data to a blob with type "mimeType : "audio/webm ; codecs=opus" when printed in the browser terminal. I send the exact object that I printed to the server, where logging it indicates it is a, or was passed as a, "Buffer" object.


I have tried saving that Buffer as a webm file, but when I pass that file as an input to ffmpeg ffprobe, I get the error "Format matroska,webm detected only with a low score of 1..." and "EBML header parsing failed.." "Invalid data found when processing input." I have tried several other formats to no success.


I need a way to transform this Buffer object to an audio file that can be mixed by ffmpeg. When I am finished, I also need to be able to do the reverse operation to send it in the same format to another client for playback, which is currently working.


Code that records and sends the audio (TS React) :




const startRecording = async function () {
 inputStream = await navigator.mediaDevices.getUserMedia({ audio: true });
 
 mediaRecorder.current = new MediaRecorder(inputStream, { mimeType: "audio/webm; codecs=opus" });

 mediaRecorder.current.ondataavailable = e => {
 console.log(e.data)
 if (e.data.size > 0) {
 socket.emit("recording", e.data);
 console.log("Audio data recorded. Transmitting to server via socketio...");
 }
 };

 mediaRecorder.current.start(1000);
 };




Code that receives and tries to save the Buffer to a file (JS Node.js) :




socket.on("recording", (chunk) => {
 console_log("Audio chunk recieved. Transmitting to frontend...");
 socket.broadcast.emit('listening', chunk);

 fs.writeFileSync('out.webm', chunk.toString());
 if (counter > 3) {
 console.log("Trying ffmpeg...");

 ffmpegInstance
 .input('out.webm')
 .complexFilter([
 {
 filter: 'amix'
 }])
 .save('./Music/FFMPEGSTREAM.mp3');
 }

 counter++;
 });



fluent-ffmpeg interface package is includued in the server code, but I have been using ffmpeg in the terminal (Pop OS) to debug. The goal is to save the file to a ram disk and use fluent ffmpeg to mix before sending to a different client for playback. Currently I am just trying to save it to disk and get ffmpeg command line to work on it.


Update :
Problem was that the chunk I was analyzing didn't have the header info. MediaRecorder encodes, then slices it up, not slices it up into your specified time slot and encodes. I have not found a good solution to this. Saving the file, without toString I believe, results in a playable webm when the header is properly included.


-
Capture & save MJPG CCTV stream to file w. FFMPEG
21 juin 2021, par GBanoI've been trying to record an IP-cam stream (Foscam, mjpg) via http with ffmpeg.
Can't get the rtsp stream for some reason, but the http/mjpg works fine (VLC IDed it as mjpg).


The stream URL looks like this :

http://192.168.1.123:456/videostream.cgi?user=USERNAME&pwd=PWD


So I created the string (w.o line wrap) :

ffmpeg -i -loglevel debug http://192.168.1.123:456/videostream.cgi?user=USERNAME&pwd=PWD /home/user/Videos/camera.mp4


Some examples I saw are using
-c
copy
andmap 0
options as well but I left this out since I defined source and destination clearly and this is just a video, no audio.
segment_time
andsegment_format
I also left out for now (I'd like segments later though- when it's working).

FFMPEG returns :
"bash: /home/user/Videos/camera.mp4: No such file or directory"


So I tried a random mjpg stream from the net (Insecam is a nice source for this...) :
http://58.69.178.54:80/mjpg/video.mjpg


Leading to :

ffmpeg copy -i -loglevel debug -hide_banner http://58.69.178.54:80/mjpg/video.mjpg /home/user/Videos/camera.mp4


Returns :
-loglevel: "No such file or directory"
(the same with segment options included, copy excluded).

Shouldn't FFMPEG create the destination file ?


One example mixed FFMPEG with CVLC (Save continuous RTSP stream to 5-10 minute long mp4 files) so I just tried with cvlc.

cvlc http://58.69.178.54:80/mjpg/video.mjpg copy /home/user/Videos/camera.mp4

This opens the stream in a VLC window (despite that I use Cvlc) but does not create a destination file.

I suspect I must have missed something simple & silly, but what ?


-
How to save (record) rtsp stream to the disk storage without artifacts and missing seconds ?
20 septembre 2019, par Bogdan RudnytskyiI need to save (record) rtsp stream to the disk storage.
I am using nginx-module and ffmpeg for it.
Here the config for enable recording :rtmp {
live on;
hls on;
hls_fragment 5s;
server {
listen 1935;
application cam1 {
hls_path /tmp/cam1;
}
exec_static ffmpeg -rtsp_transport tcp -i rtsp://... -c copy -f flv rtmp://.../cam1/stream;
}
}Config is creating the flv files, each duration of 5 second.
Then we need to merge all got files in one file by command :ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.flv
After concated files we are got a problem. When previous 5 seconds end and start next 5 seconds we have artifacts and missing 0.5-1 second.
Please, get me help with saving rtsp stream without artifacts and missing seconds.