
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 (103)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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
Sur d’autres sites (12642)
-
multipart/x-mixed-replace - MJPG video stream does not close in
18 janvier 2024, par karlcessI'm using Node.js and React.
In React I have a simple component that is displayed on the screen when a button is clicked. The component is as follows :


import React from 'react'

const Image = () => {
 return <img src="http://stackoverflow.com/api/mjpgStream/stream01" style='max-width: 300px; max-height: 300px' />;
}




Webpack redirects my requests (api=localhost:3456/mjpgStream/stream0).
In node I created an express server that when receiving the GET continuously sends JPEG images with multipart/x-mixed-replace. Below is the code :


const cb: RequestHandler = (req, res) => {
 const url = req.url.toString().slice(1);
 res.writeHead(200, {
 "Content-Type": "multipart/x-mixed-replace;boundary='stream'",
 Connection: "keep-alive",
 Expires: "Fri, 27 May 1977 00:00:00 GMT",
 "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
 Pragma: "no-cache",
 });
 let sub = PubSub.subscribe(url, function (msg: any, data: any) {
 res.write("--stream\r\n");
 res.write("Content-Type: image/jpeg\r\n");
 res.write("Content-Length: " + data.length + "\r\n");
 res.write("\r\n");
 res.write(data, "binary");
 res.write("\r\n");
 });

 req.on("close", () => {
 PubSub.unsubscribe(sub);
 res.end();
 });

 res.on("error", function (err) {
 console.error("Error in response:", err);
 });
};

router.get(/\/[a-z,0-9]*/, cb);



The video stream is published in the topic with PubSub and is correctly displayed in the Image component.
The problem is that when I click the button to close the Image component from the web page, the close event is not captured on the express server side and the mjpg flow continues to exist. I can't understand why.


-
avcodec/cbs : Mark init and close functions as av_cold
1er juillet 2022, par Andreas Rheinhardt -
Close FFMPEG if connection with ipcam lost
20 décembre 2023, par Gianlucathis is my scrit that transmit a live camera rtsp stream to youtube rtmp stream.



The Script before start verify if connection with camera is alive.



The problem is during the process, if network connection lost ffmpeg remain in locked state.



It's possibile to close ffmpeg or restart task if connection with camera lost ?



:LOOP
timeout /t 10
ping 192.168.1.11
IF ERRORLEVEL 1 goto exit
IF ERRORLEVEL 0 goto START
:START

ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://192.168.1.11:10554/tcp/av0_0 -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/(secret code)

goto LOOP