
Recherche avancée
Autres articles (56)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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" (...) -
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 (...)
Sur d’autres sites (7656)
-
How to get FFPLAY to stop/exit after set time of showing streaming ?
9 octobre 2022, par PiBer2I am playing streaming from an IP camera with FFPLAY, using a Raspberry Pi with an HDMI monitor connected to it. Everything goes well (window placing, resizing, etc), except that I need FFPLAY to stop afer N seconds.


I have tried a few things, including


env DISPLAY=:0 ffplay -rtsp_transport tcp -left 0 -top 0 -noborder -t 00:00:10 -i rtsp://user:pass@192.168.4.157:46449/live -vf scale=480:240 -an -autoexit



The issue is that at 10 seconds, the screen image freezes but FFPLAY does not exit. It keeps running and incrementing the time count, even when the image is frozen.


This is for instance 50 seconds after the start :




Input #0, rtsp, from 'rtsp ://user:pass@192.168.4.157:46449/live' :

Metadata :
title : RTSP Session/2.0 Duration : N/A, start : 0.000000, bitrate : N/A
Stream #0:0 : Video : h264 (Baseline), yuv420p(progressive), 1280x720, 25.08 tbr, 90k tbn, 180k tbc
Stream #0:1 : Audio : pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s





50.93 M-V : -4.542 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0




I have also tried to pipe from FFMPEG to FFPLAY, with exactly the same result :


ffmpeg -rtsp_transport tcp -t 00:00:10 -i rtsp://user:pass@192.168.4.157:46449/live -vf scale=480:240 -an -f matroska - | env DISPLAY=:0 ffplay -left 0 -top 0 -noborder -



FFPLAY keeps running ok, as I can stop it with Esc from the GUI.


-
Glitchy audio or broken video in fragmented MP4
6 septembre 2022, par PookyFanI'm working on small C++ library for muxing audio and video. This is basically a facade for FFMPEG functions and structures. The code is here with minimal reproduction testing code here and as of now it seems like it's working fine... almost.


For the record - my MP4 file is so-called "fragmented MP4", with headers moved at the beginning of the file in a way that would allow to stream that file (ie. play it in a browser while it's being buffered). That's what these
movflags
I'm setting inMp4Muxer::writeHeader()
are for.

While testing this library with raw H264 video stream and MP3 file (video is <1 min long, MP3 - a few minutes long), I observed that :


- 

- if I don't limit muxing audio stream when it's way "ahead" of the video (and it will be since MP3 is longer, so eventually video frames stop coming but audio frames still come in), all muxes just fine with no errors, but playing output MP4 with
ffplay
after just a few seconds results in the following log (and also frozen video, while audio keeps playing) :




[h264 @ 0x7f90a40ae2c0] Invalid NAL unit size (2162119 > 76779).0
[h264 @ 0x7f90a40ae2c0] Error splitting the input into NAL units.
[mp3float @ 0x7f90a4009540] Header missing 515KB sq= 0B f=0/0
[h264 @ 0x7f90a40cb0c0] Invalid NAL unit size (-860010620 > 17931).
[h264 @ 0x7f90a40cb0c0] Error splitting the input into NAL units.
[h264 @ 0x7f90a42bf440] Invalid NAL unit size (-168012642 > 8000).
[h264 @ 0x7f90a42bf440] Error splitting the input into NAL units.
[h264 @ 0x7f90a42fa780] Invalid NAL unit size (-1843711407 > 5683).
[ and it repeats...]



- 

- even if I limit how much a stream can be "ahead" of the other, limiting it too much results in no muxed data in the output
- any other intermediate level of limiting how much one stream can be buffered in muxer relative to the other stream results in glitchy audio, with the following errors popping out every now and then in
ffplay
(the more strict limit is, the more often they are printed) :






[mp3float @ 0x7f744c01b640] overread, skip -6 enddists: -1 -1=0/0 



Not limitting muxed audio (at all or enough) relative to muxed video also results in following messages in my muxing application :


[mp4 @ 0x55d0c6c21940] Delay between the first packet and last packet in the muxing queue is 10004898 > 10000000: forcing output



For now, the fix is quite ugly and I don't even understand why it works, but before writting MP4 header I manually set a limit for frames buffered by muxer, like so :


formatCtxt->max_interleave_delta = 10000000LL * 10LL;



This way the muxer can store more packets of one stream that's way "ahead" of the other (maximum difference between DTS of the packets at the beginning and at the end of queue is set to 10x larger than default ; it also gets rid of information log mentioned above). Obviously, I'd like to resolve it more properly, without hacking things like that.


I was trying various things, including manual skipping of ID3 tags in MP3 file (but seems like FFMPEG handles them just fine and it didn't change anything). I was also experimenting with FLAC in MP4 instead of MP3. and while I know it's rather experimental thing, I encountered very similar problems with glitching audio (no problem with video being frozen when lots of audio data gets muxed, though). It also seems that problem with glitching audio or frozen video varies in scale depending on how large are input data chunks that I feed muxer with. For now, honestly, I'm out of ideas.


- if I don't limit muxing audio stream when it's way "ahead" of the video (and it will be since MP3 is longer, so eventually video frames stop coming but audio frames still come in), all muxes just fine with no errors, but playing output MP4 with
-
How to fix "corrupted" and/or out of sync MP4s with FFMPEG ? [closed]
15 juillet 2022, par JoeDohnSome videos recorded by our users are corrupted and we have no idea why. They’re MP4s recorded from android, about 5% of videos sent by our users end up +/- unreadable.


When trying to read them on firefox it says the file is corrupt, on chrome we get a black player and the video doesn’t start.


The video can be read with VLC but the audio and video are out of sync. After a re-encoding the video are readable on browsers, but also out of sync : When we open the video, the audio start but the image is frozen for a few seconds, then when the image starts it’s obviously not in sync with the audio since it started too late.


There is this error in the firefox console when trying to play the video :


Media resource https://[……] could not be decoded. 2 […].mp4
Media resource https://[…] could not be decoded,
error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: mozilla::MediaResult mozilla::AppleATDecoder::DecodeSample(mozilla::MediaRawData *): 
Error decoding audio sample: 1650549857 @ 64000[…].mp4



Does anybody have any idea on how to fix those videos ? I tried dozens of ffmpeg commands(with -async 1, trying to convert from VFR to CFR, changing the codec, the extension etc… I have no idea what to try next)


Thanks