Page 1 of 1

Add timestamp to VLC/VLM log?

Posted: 03 Nov 2012 09:06
by fredfsh
Hi there,

I am using VLC to do vidoe-on-demand (VOD) streaming on both server and client side. The server hosts thousands of videos while many clients request videos simultaneously.
To trace user behaivors, I have to record *actual timespan* of a streaming trasaction of each video. The verbose logger gives a lot of useful information while the default output doesn't contain any timestamps, thus I am not able to calculate the timespan. My question is that whether the logger itself provides any timing facilities, or may it display log messages with timestamps?

There are two pieces of log messages on the client side which may help me calculate the timespan.
If timestamps present, I may use the first message like "Sending request: GET_PARAMETER rtsp://X.X.X.X ..." and one message like "Sending request: TEARDOWN rtsp://X.X.X.X ...", which
marks beginning and ending of a transaction, correnspondingly. Strangely, it seems that these messages are different from most logs as there are no leading hex digits. Is it output of a different module other than logger?

Thank you very much if you may share your experiences with similar problems.

fredfsh

Re: Add timestamp to VLC/VLM log?

Posted: 11 Nov 2012 16:47
by Sébastien Escudier
yes these logs come from the live555 library

Re: Add timestamp to VLC/VLM log?

Posted: 12 Nov 2012 12:40
by fredfsh
Finally, I use the following command to add timestamp to it myself.

Code: Select all

vlc XXX 2>&1 | tee | ./timestamp.sh
where content of timestamp.sh is

Code: Select all

while read -r line do newline="[t$(date +%s)] $line" echo $newline >> log done
Thread closed.

Re: Add timestamp to VLC/VLM log?

Posted: 09 Aug 2021 10:57
by haydent
Thank you very much for this ! A log file needs timestamp in some uses.

Re: Add timestamp to VLC/VLM log?

Posted: 10 Sep 2021 02:41
by haydent
(btw this is linux only)