<div dir="ltr"><font color="#000099"><font face="tahoma,sans-serif"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><font color="#000099"><font face="tahoma,sans-serif">Hi all!</font></font><div>

<font color="#000099" face="tahoma, sans-serif"><br></font></div><div><font color="#000099" face="tahoma, sans-serif">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 !</font></div>

<div><font color="#000099" face="tahoma, sans-serif"><br></font></div><div><font color="#000099" face="tahoma, sans-serif">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.</font></div>

<div><font color="#000099" face="tahoma, sans-serif"><br></font></div><div><font color="#000099" face="tahoma, sans-serif"><a href="http://wiki.videolan.org/VLC_command-line_help">VLC help</a> says that the --stats option can be used to collect the stats:</font></div>

<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

<span class="Apple-style-span" style="border-collapse: separate; font-family: sans-serif; line-height: 19px; "><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; overflow-x: auto; overflow-y: auto; ">

--stats, --no-stats        Locally collect statistics (default enabled)
          Collect miscellaneous local statistics about the playing media.
          (default enabled)</pre></span></blockquote><div><font class="Apple-style-span" color="#000099" face="tahoma, sans-serif">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.</font></div>

<div><font class="Apple-style-span" color="#000099" face="tahoma, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#000099" face="tahoma, sans-serif">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:</font></div>

<div><font class="Apple-style-span" color="#000099" face="tahoma, sans-serif"><br></font></div><div><ol><li style="margin-left: 15px; "><span style="font-family: tahoma, sans-serif; color: rgb(0, 0, 153); ">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.</span></li>

<li style="margin-left: 15px; "><span style="font-family: tahoma, sans-serif; color: rgb(0, 0, 153); ">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 </span><span style="font-family: tahoma, sans-serif; color: rgb(0, 0, 153); ">"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...</span></li>

<li style="margin-left: 15px; "><span style="font-family: tahoma, sans-serif; color: rgb(0, 0, 153); ">I tried redirecting input and output as shown by <a href="http://n0tablog.wordpress.com/2009/02/09/controlling-vlc-via-rc-remote-control-interface-using-a-unix-domain-socket-and-no-programming/#comment-10825" target="_blank" style="color: rgb(0, 0, 204); ">this blog</a>. 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.</span></li>

</ol><div><font color="#000099" face="tahoma, sans-serif">Can some one please give me some advice on how to do this. </font></div></div><div><font color="#000099" face="tahoma, sans-serif">Thanks!</font></div></span></font></font><br clear="all">

<br>-- <br>Priya Bhat<br><br><br>
</div>