
Recherche avancée
Autres articles (106)
-
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 -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (9298)
-
Revision 29744 : Update de la base de donnée
8 juillet 2009, par kent1@… — LogUpdate de la base de donnée
-
Random audio/video sync issue with libcamera-vid + ffmpeg on raspberry pi 3a+
8 mai, par kepperiI have been working on camera software, which will stream live fullhd video to Cloudflare Stream via RTMPS protocol. Everything is mostly working nicely, but I have occasional A/V sync issues with the streams : Stream might start with correct A/V sync and it will stay correct until the end (1-2 h stream), but sometimes the A/V sync is misaligned like 1-2 sec so, that the audio is either behind or ahead of the video stream. And it will be like that until the end of the stream, then next stream might be just fine.


I'm using libcamera-vid for the video and ffmpeg for the audio, muxing and sending all to Cloudflare. This is my command :


libcamera-vid 
 --width 1920 --height 1080 --framerate 30 --timeout 0 
 --nopreview true --inline 1 --codec h264 --verbose 0 
 --intra 90 --bitrate 4000000 --output - | 
ffmpeg 
 -use_wallclock_as_timestamps 1 -loglevel error 
 -probesize 10M -analyzeduration 5M 
 -fflags +genpts -thread_queue_size 512 -f h264 -framerate 30 -i - 
 -thread_queue_size 8192 -itsoffset 0.7 
 -f alsa -channels 1 -ar 44100 -i hw:1,0 
 -c:v copy -c:a aac -b:a 96000 -fflags +genpts -async 1 -shortest -f flv - | 
( sleep 5; ffmpeg -re -i - -c copy -f flv "rtmps://live.cloudflare.com:443/live/..."



So I can control initial A/V sync with -itsoffset and it is working, but still I encounter those random sync differences.


I have also added the second ffmpeg command with 5 sec sleep to give the first ffmpeg process enough time to align with video and audio input before sending them to Cloudflare, but this seems not helping.


I have also tried with Gstreamer, which fixed the AV issue completely, but it had weird glitches on video frames if the audio was enabled. Seemed like it tried to match the audio and video timestamps on fly and that caused warps/jumps and ghost frames on video. Audio was just fine.


Here is my Gstreamer command (which will also have the same libcamera-vid piped in via fdsrc)


GST_CLOCK_SYSTEM=1 gst-launch-1.0 -v
 fdsrc blocksize=524288 !
 h264parse config-interval=1 disable-passthrough=true !
 queue max-size-buffers=200 max-size-time=4000000000 max-size-bytes=0 !
 flvmux name=mux streamable=true latency=200 !
 queue max-size-buffers=200 max-size-time=4000000000 max-size-bytes=0 !
 rtmpsink sync=false location="rtmps://live.cloudflare.com:443/live/..."
 alsasrc device=hw:1,0 buffer-time=1000000 latency-time=200000 !
 audio/x-raw,rate=44100,channels=1,format=S16LE !
 queue leaky=downstream max-size-buffers=500 max-size-time=15000000000 max-size-bytes=0 !
 audioconvert ! audioresample ! avenc_aac bitrate=96000 ! aacparse !
 queue max-size-buffers=100 max-size-time=4000000000 max-size-bytes=0 ! mux.



With Gstreamer, I have been experimenting different sizes of buffers, but no luck getting rid of the video glitches. If I remove audio from that gst-launch-1.0 command, video is just perfect.


Hardware :


- 

- RPI 3A+ (tested also with RPI4)
- RPI HQ M12 camera module
- Cheap USB tiny mic (like this : https://www.digikey.fi/fi/products/detail/seeed-technology-co-ltd/114992002/10451894)








I have also tried MUX instead of Cloudflare Stream, both acts identically so I guess the problem is not in receiving end encoding. This is also the reason I have not yet tried to "stream" into file.


Currently I'm in a process of testing the libcamera-vid with raw yuv420 + ffmpeg but with ffmpeg encoding the video instead of just having encoded h264 from libcamera-vid. This is done with RPI4 since it has enough CPU for it.


All help is appreciated !


-
How can I run FFPROBE in a Python script without triggering the Windows Command window ?
23 juin, par fnord12I am using ffmeg/ffprobe to get video durations (in an addon for Kodi). The code :


result = subprocess.run(["ffprobe", "-hide_banner", "-v", "quiet", "-show_entries",
 "format=duration", "-of",
 "default=noprint_wrappers=1:nokey=1", filename], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)



The above code and the file importing that code both have a .pyw extension (after first trying regular .py).


This works fine but in Windows 11 it causes the black Windows Command window to briefly flash for each video, despite the -hide_banner flag and loglevel being set to quiet. In Linux Mint it runs without any such window popping up.


Is there any way to suppress the Windows Command window ?