
Recherche avancée
Autres articles (33)
-
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 -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
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 (...)
Sur d’autres sites (6419)
-
FFmpeg - How to choose video stream based on resolution
23 septembre 2023, par SylvenI want to choose the video stream based on it's quality, let's say I want to choose one video stream with certain resolution.


Manually selecting the video stream is not good enough for me because I want to process many files in bulk and they have the video streams in different order, so always going for certain position would make me end up with different resolutions.


I don't want to use filters as that would make me reencode which I don't need and would make it way slower.


I've tried using the
-map
with metadata but the only key that is different is "variant_bitrate" which has slightly different values everytime, so unless I can use some wildcard or conditionals, I guess it won't work either.

What I want to try now is to obtain the exact bitrate of the stream using
ffmpeg
orffprobe
and then pass it to theffmpeg
command so it ends in something like this :

ffmpeg -i <url> -map m:variant_bitrate:1760000 ...</url>


PD : I've been reading the FFmpeg documentation and browsing the whole internet without luck.


Edit :
I managed to make it work by first using
ffprobe
to obtain stream info in json format (easier to parse), then I search for the string"height": 540
and extract next 50 lines (counted them manually so I'm sure I'll pick the value I need), then I search for the stringvariant_bitrate
and then I use a regular expression to extract the bitrate. Once I have the bitrate I make use of the MacOS clipboard (withpbcopy
andpbpaste
) to pass the value to the finalffmpeg
command through the-map
option using a metadata selector.

ffprobe -v error -show_streams -of json "https://streamlink.com/master.m3u8?f=dash"
| grep -A 50 '"height": 540' 
| grep variant_bitrate
| grep -oe '\([0-9.]*\)' 
| pbcopy
&& ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://streamlink.com/master.m3u8?f=dash" -map "0:a:0" -map "m:variant_bitrate:$(pbpaste)" -c copy "Output.mp4"



(added line breaks for readability)


I know it looks kinda dirty but I didn't find any other way to achieve my requirement.


-
Camera Rendering Buffers and Stutters When Processing Large Video Files with FFmpeg
20 avril 2023, par TIANYU HUWhen rendering a real-time camera, I use ffmpeg to process a large video file(like 4G or even larger) at the same time. However, I noticed that the video frames are buffering and stuttering, indicated they are probably competing for limited system resources, like cpu, memory or I/O bandwidth etc.


I‘ve tried a lot of experiments to figure out the root cause. Firstly I limit the cpu usage of ffmpeg to 25%, but sadly it’s not getting better.


Then I suspect that ffmpeg would read the large video file from disk to page cache in memory as much as it can before processing, and the generated files are going to be written back from page cache to disk. The RAM of our computer is 8G, apparently it needs to swap in and swap out pages between memory and disk. This process is costly for the CPU, and other processes are likely to trigger an interrupt named “Page Fault” when they access pages that are not actually loaded into memory. If the time taken for “page fault” is too long, the program may lag.


Lastly I configure the system parameters related to “write back dirty pages to disk”, such as vm.dirty_writeback_centisecs and vm.dirty_background_ratio, to try to write back the dirty (Disk I/O) more frequently or infrequently. But I’m not quite sure what would happen if I modify these parameters.


Expection :
The requirement can be summarized as “real-time video rendering has higher priority, and the low rate of large file processing is accepted”, are there any possible solutions of this issue from your perspective ? Thanks in advance.


-
Split video with ffmpeg with specific conditions
15 juin 2023, par MahdiI have some videos and I want to split them into 15 min each with FFmpeg with the following conditions :


- 

- Final videos should be less than 15 min
- Script should cut the video somewhere that speaker is not talking. For example, script should cut video on the following point :








And it should not cut videos like the following :



This article could working for the first condition, but the second option is missed.


python ffmpeg-split.py -f big_video_file.mp4 -s 10