
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 (28)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
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 (9146)
-
FFMPEG : Recurring onMetaData for RTMP ? [on hold]
30 novembre 2017, par stevendesuFor whatever reason this was put on hold as "too broad", although I felt I was quite specific. So I’ll try rephrasing here :
My former understanding :
The RTMP Protocol involves sending several parallel streams of data as a series of packets, with an ID correlating to which stream they are a part of. For instance :
[VIDEO] <data>
[AUDIO] <data>
[VIDEO] <data>
[VIDEO] <data>
[SERVER] <metadata about="about" bandwidth="bandwidth">
[VIDEO] <data>
[AUDIO] <data>
...
</data></data></metadata></data></data></data></data>Then on the player side these packets are split up into separate buffers based on type (all video data is concatenated, all audio data is concatenated, etc)
One of the packet types is called
onMetaData
(ID : 0x12)An
onMetaData
packet includes a timestamp for when to trigger the metadata (this way it can be synchronized with the video) as well as the contents of the metadata (a text string)My setup :
I’m using Red5Pro as my ingest server to take in an RTMP stream and then watch this stream via WebRTC. When an
onMetaData
packet is received by Red5, it sends out a JSON object to all subscribers of the stream over WebSockets with the contents of the stream.What I want :
I want to take advantage of this
onMetaData
channel to embed the server’s system clock into a stream. This way anyone viewing the stream can determine when (according to the server) a stream was encoded and, if they synchronize their clock with the server, they can then compute the end-to-end latency of the stream. Due to Red5’s use of WebSockets to send metadata this isn’t a perfect solution (you may receive the metadata before or after you actually receive the video information), however I have some plans to work around this.In other words, I want my stream to look like this :
[VIDEO] <data>
[AUDIO] <data>
[ONMETADATA] time: 2:05:77.382
[VIDEO] <data>
[VIDEO] <data>
[SERVER] <metadata about="about" bandwidth="bandwidth">
[VIDEO] <data>
[ONMETADATA] time: 2:05:77.423
[AUDIO] <data>
...
</data></data></metadata></data></data></data></data>What I would like is to generate this stream (with the server’s current time periodically embedded into the
onMetaData
channel) using FFMPEGSimpler problem :
FFMPEG offers a
-metadata
command-line parameter.In my experiments, using this parameter caused a single
onMetaData
event to be fired including things like "title", "author", etc. I could not inject additionalonMetaData
packets periodically as the stream progressed.Even if the metadata packets do not contain the system clock, if I could send any metadata packets periodically using FFMPEG then I could include something static like "the server’s clock at the time the broadcast started". I can then compare this to the current timestamp of the video and calculate the latency.
My confusion :
Continuing to look into this after creating my post, there are a couple things that I don’t fully understand or which don’t quite make sense to me. For one, if FFMPEG is only injecting a single
onMetaData
packet into the stream, then I would expect anyone joining the stream late to miss it. However when I join the stream 8 hours later I see Red5 send me the metadata packet complete with title, author, etc. So it’s almost like the metadata packet doesn’t have a timestamp associated with it but instead is just generic metadata about the videoFurthermore, there’s something called "AMF" which I’m not familiar with, but it may be important ?
Original Post
I spent today playing around with methods to embed the system clock at time of encode into a stream, so that I could compare this value to the same system clock at time of decode to get a rough estimate of RTMP latency. Unfortunately the majority of techniques I used ended up failing.
One thing I wanted to try next was taking advantage of RTMP’s
onMetaData
to send the current system clock periodically (maybe every 5 seconds) as part of the stream for any clients to listen for.Unfortunately FFMPEG’s
-metadata
option seems to only be for one-time metadata when the stream first loads. I can’t figure out how to add continuous (and generated) values to a stream.Is there a way to do this ?
-
Unable to get current time in TCL. can i use flush here ?
30 novembre 2017, par M. D. Punable to get current time for the bellow code :
proc a {} {
for {set i 0} {$i < 3} {incr i} {
puts " $i "
set imagetime [clock format [clock seconds] -format %Y%m%d_%H%M%S]
set videotime [clock format [clock seconds] -format %Y%m%d_%H%M%S]
exec ffmpeg -f dshow -i "video=Integrated Webcam" -s 1280x720 -benchmark c:/test/Image_$imagetime.jpg >& c:/test/image_$imagetime.txt &
after 15000
exec ffmpeg -f dshow -t 00:00:10 -i "video=Integrated Webcam" -s 1280x720 -benchmark c:/test/video_$videotime.avi >& c:/test/video_$videotime.txt &
after 15000
}
}
athe output is :
the problem here is, even though the variable for taking video time and image time is different, it is tacking same time for video and image.
any reason or solution for this ????
can i use flush command ???
can i work with following code :
proc a {} {
for {set i 0} {$i < 3} {incr i} {
puts " $i "
set time [clock format [clock seconds] -format %Y%m%d_%H%M%S]
exec ffmpeg -f dshow -i "video=Integrated Webcam" -s 1280x720 -benchmark c:/test/Image_$time.jpg >& c:/test/image_$time.txt &
after 15000
exec ffmpeg -f dshow -t 00:00:10 -i "video=Integrated Webcam" -s 1280x720 -benchmark c:/test/video_$time.avi >& c:/test/video_$time.txt &
after 15000
}
}
aany answer ??
-
FFMPEG : embed current time in milliseconds into video [closed]
5 juin, par stevendesuI would like to embed the computer's local time in milliseconds into a stream using FFMPEG.



I can embed the local time in seconds using drawtext like so :



ffmpeg -i <input /> -vf "drawtext=text='%{localtime\:%T}'" -f flv <output>
</output>



Looking through the documentation for drawtext, doing some tests, and Googling around, it seems like
localtime
andgmtime
don't provide milliseconds — just seconds. However thepts
options does have milliseconds :


ffmpeg -i <input /> -vf "drawtext=text='%{pts\:hms}'" -f flv <output>
</output>



I also found out that
pts
supports an offset, so I was able to use something like this to display local time (kind of) :


ffmpeg -i <input /> -vf "drawtext=text='%{pts\:hms\:$(date +%s.%N)}'" -f flv <output>
</output>



This had two problems :



- 

- It displayed something like
17499:17:29
for the time... I found a (rather complex) way to work around this - It uses the server's current time when you first run the ffmpeg command as the offset — not the server's current time when ffmpeg actually starts decoding video. I noticed ffmpeg had about a 2-second startup time, causing the clock to be off by roughly 2 seconds







Is there a way to modify my solution, or an entirely separate solution, that can embed server local time in milliseconds into the stream ?


- It displayed something like