
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (12)
-
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 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (4618)
-
H264/MP4 live stream from ffmpeg gets delayed
1er octobre 2018, par paunescuionicaI’m transcoding a MJPEG stream to H264/MP4 using ffmpeg. As client I’m using VLC.
I use this command line :
ffmpeg \
-use_wallclock_as_timestamps 1 \
-f mjpeg \
-i "http://127.0.0.1:4100/getMjpegStream=L" \
-f mp4 \
-vcodec libx264 \
-movflags frag_keyframe+empty_moov+faststart \
-tune zerolatency \
-crf 30 \
-preset ultrafast \
-g 1 \
-reset_timestamps 1 \
-vsync 1 \
-flags global_header \
-r 15 \
-listen 1 \
-fflags flush_packets \
-avioflags direct \
-flush_packets 1 \
*output_URL*If I set the output_URL to this :
udp://127.0.0.1:5000?pkt_size=1316
it works just fine. I start ffmpeg, then after some time I start VLC with this URL
udp://@127.0.0.1:5000
, and it plays (almost) real time. The delay is 1-2 seconds, which is acceptable. And this delay is constant, it does not depend on when I start VLC. I can stop and reopen VLC and it keeps going realtime.But I need this stream to also be viewed in browser (in a HTML5 video), so I normally use this for output_URL :
http://127.0.0.1:5000
In VLC I use this URL
http://127.0.0.1:5000
and it also works fine, but only if I start VLC immediately after I start ffmpeg. If there is a significant delay between the start of ffmpeg and the start of VLC, then that delay will be noticeable in the playback. Let’s say that I start ffmpeg at time T then after 10 seconds (at T+10) I start VLC. I have this behavior in VLC :- It starts, and it displays the frame at time T and then the stream freezes
- After 10 seconds, the streaming resumes in VLC and it starts playing, but the image is 10 second behind ‘realtime’
- This delays is constant, it does not recover from it
Is there a way to solve this ?
- Instruct ffmpeg to start transcoding only when the client connects ?
- Instruct ffmpeg to not buffer transcoded stream until the client connects ? (with current command line, it clearly buffers because when VLC starts at T+10, the first frame displayed is from time T) ?
Thank you !
-
Stream real-time video flux in HTML video tag
26 septembre 2018, par c.censierI want to stream a real-time video flux that come from udp into a HTML
video
tag.
I made some research but I got a lot of informations and I struggle to have a clear overview of what I can do and what I can’t.The video flux use H.264 and AAC codecs, MP4 container and has a 3840x2160 (4K) resolution. I’d like to play it on Chrome (latest version).
As I understand from now, HTML
video
tag can natively read H.264/AAC videos. I made it work with the video direclty on my server (I’m using Meteor JS + React).I learnt to use FFmpeg to stream an udp flux read by VLC player, and then I used FFserver (I know it’s deprecated) to create an HTTP flux also read by VLC but not by the HTML
video
tag.So... my question is : is HTML
video
can natively read video stream from HTTP ?I’ve seen a lot of discussions about HLS and DASH, but I didn’t understand if (and why) they’re mandatory.
I read a post about someone creating a HLS
m3u8
using only FFmpeg, is it a viable solution ?FFserver configuration
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 20
MaxClients 10
MaxBandwidth 100000
<feed>
File /tmp/feed.ffm
FileMaxSize 1g
ACL allow 127.0.0.1
</feed>
<stream>
Feed feed.ffm
Format mpeg
AudioCodec aac
AudioBitRate 256
AudioChannels 1
VideoCodec libx264
VideoBitRate 10000 // Total random here
VideoBitRateRange 5000-15000 // And here...
VideoFrameRate 30
VideoQMin 1
VideoQMax 50
VideoSize 3840x2160
VideoBufferSize 20000 // Not sure either
AVOptionVideo flags +global_header
</stream>I had to specify QMin and QMax to avoid error message but I don’t really understand what is it.
FFmpeg command line
ffmpeg -re -i bbb_sunflower_2160p_30fps_normal.mp4 -strict -2 -r 30 -vcodec libx264 http://localhost:8090/feed.ffm
This work with VLC. I’m working with a file on my computer before moving to an udp stream.
-
H264/MP4 live stream from ffmpeg does not work in browser
22 septembre 2018, par paunescuionicaI cannot visualize a H264/MP4 stream generated by ffmpeg in Chrome, IE, Edge. It works only in Firefox.
My testing environment is Windows 10, all updates done, all browsers up to date.
I have a source MJPEG stream, which I need to transcode to H264/MP4 and show it in browser in a HTML5 element.
In order to provide a working example, I use here this MJPEG stream : http://200.36.58.250/mjpg/video.mjpg?resolution=320x240. In my real case I have MJPEG input from different sources like IP cameras.
I use the following command line :ffmpeg.exe -use_wallclock_as_timestamps 1 -f mjpeg -i "http://200.36.58.250/mjpg/video.mjpg?resolution=320x240" -f mp4 -c:v libx264 -an -preset ultrafast -tune zerolatency -movflags frag_keyframe+empty_moov+faststart -reset_timestamps 1 -vsync 1 -flags global_header -r 15 "tcp ://127.0.0.1:5000 ?listen"
If I try to visualize the output in VLC, I use this link : tcp ://127.0.0.1:5000 and it works.
Then I try to visualize the stream in browser, so I put this into a html document :<video autoplay="autoplay" controls="controls">
<source src="http://127.0.0.1:5000" type="video/mp4">
</source></video>If I open the document in Firefox it works just fine.
But it does not work when trying to open in Chrome, IE or Edge. It seems that the browser tries to connect to the TCP server exposed by ffmpeg, but something happens because ffmpeg exits after few seconds.In ffmpeg console I can see this :
av_interleaved_write_frame(): Unknown error
Error writing trailer of tcp://127.0.0.1:5000?listen: Error number -10053 occurredIf I inspect the video element in Chrome is can see this error :
Failed to load resource: net::ERR_INVALID_HTTP_RESPONSE
As far as I know all these browsers should support H264 encoded streams transported in MP4 containers. If in the element I replace the link http://127.0.0.1:5000 with a local link to a mp4/H264 encoded file, it is played just fine in each browser. The problem seems to be related to live streaming.
Does anyone know why this happens and how it can be solved ?
Thank you !