
Recherche avancée
Autres articles (39)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5067)
-
Error with RTSP Stream in Node.js : Could not find codec parameters for stream 0 (Video : h264, none)
7 août 2023, par theplaceofburakI have a Node.js application that uses the node-rtsp-stream package to stream an RTSP video from an IP camera. However, when I run the application, I encounter the following errors in the console after a few minutes :


[rtsp @ 000002402795dd80] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://fake_test:jksdfhskhdfsomethingfake@111.111.11.1111:50213/cam/realmonitor?channel=1&subtype=1'(fake rtsp link used for privacy)':
 Metadata:
 title : Media Server
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264, none, 90k tbr, 90k tbn
Output #0, mpegts, to 'pipe:':
[out#0/mpegts @ 0000024027987b80] Output file does not contain any stream
Error opening output file -.
Error opening output files: Invalid argument
RTSP stream exited with error



I am certain that the RTSP stream from the camera is in H.264 - MPEG-4 AVC format, and I can play it in VLC without any issues. However, when I try to stream it using the node-rtsp-stream package, I encounter these errors.


Here is my Node.js code :


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

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


const stream = new Stream({
 name: 'rtsp_server_name',
 streamUrl: 'rtsp://fake_test:jksdfhskhdfsomethingfake@111.111.11.1111:50213/cam/realmonitor?channel=1&subtype=1'(fake rtsp link used for privacy),
 wsPort: 9999,
 ffmpegOptions: {
 '-stats': '', // an option with no necessary value uses a blank string
 '-r': 30, // options with required values specify the value after the key
 },
});

// Middleware to log each request
app.use((req, res, next) => {
 console.log(`${req.method} ${req.url}`);
 next();
});

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

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

// Event listener to check if the RTSP stream is ready
stream.on('data', (data) => {
 if (data.includes('frame=')) {
 console.log('RTSP stream is ready and streaming.');
 }
});



I have tried increasing the values for 'analyzeduration' and 'probesize' options, but the errors persist. How can I resolve these errors and successfully stream the RTSP video in H.264 format using the node-rtsp-stream package ? Any help or guidance would be appreciated. Thank you !


-
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



-
How to add watemark in a video with ffmpeg, Python ?
16 décembre 2023, par Mr.SlowI would like to add a .png watemark with 50% opacity over all my video. I would prefer using a ffmpeg filter over merging the watemark image with video-to-be images.


audio = f'{PROJECT_PATH}/data/ppt-elements/audio_{file_id}.txt'
images = f'{PROJECT_PATH}/data/ppt-elements/images_{file_id}.txt'

image_input = ffmpeg.input(images, f='concat', safe=0, t=seconds).video
audio_input = ffmpeg.input(audio, f='concat', safe=0, t=seconds).audio

additional_parameters = {'c:a': 'aac', 'c:v': 'libx264'}

audio_input = ffmpeg.filter(audio_input, "amix", inputs=2, duration="longest")

watermark_file = f"{PROJECT_PATH}/data/logo/logo.png"

# add watermark
watermark = ffmpeg.input(watermark_file)

inputs = [image_input, audio_input, watermark]

watermark_filter = '[0:v][2:v]overlay=10:10' 

command = ffmpeg.output(*inputs, f"{PROJECT_PATH}/data/final-{file_id}.mp4", vf=[watermark_filter, "fps=10,format=yuv420p"],
 preset="veryfast", shortest=None, r=10, max_muxing_queue_size=4000,
 **additional_parameters)
command.overwrite_output().run(capture_stdout=True, capture_stderr=True)



This code, however, creates a video without any watermark in it. Can you see any error ?