[vlc] Redirecting input to vlc from file and obtaining stats information in file [SOLVED]

Priya pbhat at acis.ufl.edu
Wed Sep 1 17:29:51 CEST 2010


Here <http://whowhywhathow.blogspot.com/2010/09/vlc-help.html> is the
solution to the problem.

On Mon, Aug 30, 2010 at 2:16 PM, Priya <pbhat at acis.ufl.edu> wrote:

> Hi all!
>
> I have been beating my head against this problem for over 4 days now... Its
> getting to a point where I may quit from VLC altogether... so this is really
> a desperate cry for help !
>
> What I essentially want to achieve is to play a video and while this it is
> running I want to collect statistics like lost frames, bit rate etc. into
> another text file. The stats should be collected every x seconds while the
> video is running.
>
> VLC help <http://wiki.videolan.org/VLC_command-line_help> says that the
> --stats option can be used to collect the stats:
>
>>
>> --stats, --no-stats        Locally collect statistics (default enabled)
>>           Collect miscellaneous local statistics about the playing media.
>>           (default enabled)
>>
>> Can someone please tell me where these stats are stored and how I would be
> able to read them into another application? If there is a way to read where
> these stats are stored, I could write a wrapper code that reads the relevant
> stats and then sleeps for the remaining time in a loop.
>
> I tried several other approaches to get the information about the
> statistics. Here are some of the things which I tried and the difficulty in
> proceeding with each approach:
>
>
>    1. I can access the stats manually from the GUI while the video is
>    being played from Tools -> Media Information -> Statistics. However, I do
>    not know how to automate the process of reading the stats in a loop and
>    writing them to a file.
>    2. I can use the "rc" interface to get the statistics on the command
>    line. To open the interface in the terminal I do: "vlc --intf rc", then
>    doing "add filename.mpg" plays the video and "stats" shows the stats on the
>    terminal. If I start the "rc" interface using "vlc --intf rc >
>    outputfile.txt", I can redirect the output of the "stats" command, but I
>    still don't know how to redirect the input to the "rc" interface from say a
>    bash script that starts the video waits for 2 seconds and then issues the
>    "stat" command...
>    3. I tried redirecting input and output as shown by this blog<http://n0tablog.wordpress.com/2009/02/09/controlling-vlc-via-rc-remote-control-interface-using-a-unix-domain-socket-and-no-programming/#comment-10825>.
>    But it does not seem to work. What I did was I set the rc and fake tty
>    interface as shown in steps 2 and 3 and then tried to use "nc" to channel
>    the commands from and input file to "vlc.sock". The command I used was "nc
>    -U /home/pbhat/vlc.sock >> emd.temp < 'stats.sh' "....but that does not
>    work.
>
> Can some one please give me some advice on how to do this.
> Thanks!
>
>
> --
> Priya Bhat
>
>
>


-- 
Priya Bhat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20100901/ebf30965/attachment.html>


More information about the vlc mailing list