
Recherche avancée
Autres articles (22)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (5392)
-
Rtsp streaming on nodejs - Blank screen
17 juillet 2024, par theplaceofburakI am currently working on a Node.js project where I need to implement streaming using ffmpeg. However, I am facing an issue with the streaming process, as I am getting an empty blank screen instead of the expected video stream.


Here's a brief overview of what I have done so far on the server-side :


Installed ffmpeg and made sure it is accessible in the environment.
Configured the server-side code for the streaming process.
However, despite these efforts, the stream is not working correctly, and I am unable to see the video stream on the client-side.


Server-side code :
app.js


const express = require('express');
const Stream = require('node-rtsp-stream');

const app = express();
const port = 4000;

// Start the RTSP stream
const stream = new Stream({
 name: 'rtsp_server_name',
 streamUrl: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4',
 wsPort: 3000,
 ffmpegOptions: {
 '-stats': '', // an option with no necessary value uses a blank string
 '-r': 30, // options with required values specify the value after the key
 },
});

stream.on('data', data => {
 console.log(data);
});

app.get('/', (req, res) => {
 res.send('Hello World');
});

app.listen(port, () => {
 console.log(`Server running at http://localhost:${port}/`);
});



index.html



 
 <canvas></canvas>
 
 <h1>Test rtsp video</h1>
 <code class="echappe-js"><script type="text/javascript" src='http://stackoverflow.com/feeds/tag/js/jsmpeg.min.js'></script>

<script type="text/javascript">&#xA; player = new JSMpeg.Player(&#x27;ws://localhost:3000&#x27;, {&#xA; canvas: document.getElementById(&#x27;canvas&#x27;), // Canvas should be a canvas DOM element&#xA; });&#xA; </script>




I got no console error when I open index.html but only get blank black screen



-
error of streaming video using fluent-ffmpeg node.js module
23 mai 2013, par user824624I am running the fluent-ffmpeg sample to stream the video, which works well. Now in contract show the video in flashe version based flowplayer, I am now using html5 version flowplayer, but it said the video file not found.
app.get('/video2/abc', function(req, res) {
console.log('/video/:filename');
res.contentType('mp4');
var pathToMovie = 'public/flowplayer/470x250.mp4' ;
var proc = new ffmpeg({ source: pathToMovie, nolog: true })
.writeToStream(res, function(retcode, error){
if(error) console.error('error',error);
else console.log('file has been converted succesfully');
});
});here is my html template.
<code class="echappe-js"><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"> </script><script src="http://releases.flowplayer.org/5.4.0/flowplayer.min.js"></script>
<script><br />
// global configuration (optional)<br />
flowplayer.conf = {<br />
rtmp: "rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st",<br />
swf: "http://releases.flowplayer.org/5.4.0/flowplayer.swf"<br />
};<br />
<br />
// force flash with query - only for testing, do not use this switch in production!<br />
if (/flash/.test(location.search)) flowplayer.conf.engine = "flash";<br />
<br />
// install player manually<br />
$(function() {<br />
$(".player").flowplayer({<br />
// reverse fraction of video aspect ratio<br />
// video dimensions: 470px / 250px<br />
ratio: 25/47<br />
});<br />
});<br />
</script> -
Building a livestream page where the user will input an rtsp streaming source through an ip address
7 décembre 2020, par Antax MdI am building a livestream page where the streaming source is streamed through rtsp. Currently, I am using ffmpeg to convert the incoming rtsp stream to a .m3u8 file and it is played back on the webpage through HLS.


The problem i am trying to solve now, is loading an rtsp stream based on the user's input. How do i go about solving this ? It is a requirement to able to view the stream on iOS and android.
The ffmpeg command :


ffmpeg -i "rtsp://10.193.79.185:5554" -hls_time 3 -hls_wrap 10 "C:\wamp64\www\hls\output.m3u8"



Code of what I have at the moment that loads a hard coded rtsp stream




 
 <code class="echappe-js"><script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>


 RTSP Stream

 
 


 


 


<script>&#xA; if(Hls.isSupported()) &#xA; {&#xA; var video = document.getElementById(&#x27;video&#x27;);&#xA; var mystring = "http://192.168.43.79/hls/output.m3u8";&#xA; var hls = new Hls({&#xA; debug: true&#xA; });&#xA; hls.loadSource(mystring);&#xA; hls.attachMedia(video);&#xA; hls.on(Hls.Events.MEDIA_ATTACHED, function() {&#xA; video.muted = true;&#xA; video.play();&#xA; });&#xA; }&#xA; // hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.&#xA; // When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element throught the `src` property.&#xA; // This is using the built-in support of the plain video element, without using hls.js.&#xA; else if (video.canPlayType(&#x27;application/vnd.apple.mpegurl&#x27;)) {&#xA; video.src = &#x27;http://192.168.43.79/hls/output.m3u8&#x27;;&#xA; video.addEventListener(&#x27;canplay&#x27;,function() {&#xA; video.play();&#xA; });&#xA; }&#xA; </script>