
Recherche avancée
Autres articles (62)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (6464)
-
How to http stream FFMPEG encoded frames with VLC
8 octobre 2020, par paolooI have a python script that write images (numpy arrays) on the standard output.
I want to keep this frames and encode them h264 with FFMPEG, using GPU, then give it to vlc to expose a stream over http.


Here there's a working example of my apporach, without the part of h264 encoding :


python3 script.py | ffmpeg -r 24 -s 1920x1080 -f rawvideo -i - -vcodec copy -f avi - | cvlc --demux=rawvideo --rawvid-fps=25
--rawvid-width=1920 --rawvid-height=1080 --rawvid-chroma=RV24 - --no-audio --sout '#transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{user=pippo,pwd=pluto,mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:10001/}'



Now, I'm having troubles in writing working pipes to do what I need.
Here the pipe I'm actually working on, FFMPEG process is managed by GPU, but VLC cannot correctly manage the flow, I suppose, in fact I can connect to VLC from another VLC instance used as client, but then I got an error in which VLC client cannot open MRL.


Here the pipe :


python3 script.py | ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -f rawvideo -s 1920x1080 -i - -c:a copy -c:v h264_nvenc -f h264 - | cvlc --demux=rawvideo --rawvid-fps=25 --rawvid-width=1920 --rawvid-height=1080 --rawvid-chroma=RV24 - --no-audio --sout '#transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{user=pippo,pwd=pluto,mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:10001/}'



I don't understand how to set vlc parameters in order to manage the incoming stream. I also could have made errors in ffmpeg pipe, any suggestion is welcome.


-
Streaming live image with HLS
20 février 2019, par kababI have a stream of images that come from a live video (RTP), the images pass through a pipeline of transformations, and I would like to stream the video again using HLS to the enduser, How can I take the buffer of images and stream it live using HLS ?
The current solution that I m using is returning the frames using http which is too slow and not scalable.
@app.route("/")
def main():
return Response(gen(),
mimetype='multipart/x-mixed-replace; boundary=frame')
def gen():
while True:
time.sleep(.04)
data = get()
yield (b'--frame\r\n'
b'Content-Type: image/jpeg\r\n\r\n' + data.tobytes() + b'\r\n\r\n') -
Queuing multiple video files as a single live video stream with nodejs and ffmpeg
24 avril 2016, par bomtempii would like to stream a video with node nodejs using multiple little video sequences that are created on the fly.
It means that the server queues multiple files, but the client must see it as only one single stream.Why would i need such feature ?
I have an application that creates images on the fly on the server, and i need to send them as a single video to the client, as if it was on a live source.
I cannot use ffmpeg to concatenate these files and convert them to a single video because i don’t have the complete sequence.I can do the trick with images sequences, using "multipart/x-mixed-replace" content-type, in a mjpeg format. Here is how i do :
http.createServer(function(req, stream) {
stream.writeHead(200, {
'Content-Type': 'multipart/x-mixed-replace;boundary=myboundary',
'Cache-Control': 'no-cache',
'Expires': '-1',
'Connection': 'close',
'Pragma': 'no-cache'
});
setInterval(function() {
var data = ... // here launch the function to get the binary data from the latest image created on the server
stream.write("--myboundary\r\n");
stream.write("Content-Type: image/jpeg\r\n");
stream.write("Content-Length: " + data.length + "\r\n");
stream.write("\r\n");
stream.write(data);
stream.write("\r\n");
}, 300);
}).listen(port, function() {
});The problem with this format is that it has no sound.
I tried to serve the sound from a different endpoint, and use ffmpeg to assemble them in live and send them back to the server where it will be forwarded to a new endpoint containing the sound and video, but after just a few seconds the video becomes more and more laggy and freezes.So that is why i thought that i should start by generating small videos on the server, by taking the 24 or 30 latest images created on the fly, concatenate them with ffmpeg and queue them on nodejs. That would just add approximately 1 second delay to the client.
Thanks for your help !