1

I am using MPlayer on ubuntu 13.04 in a Theatre (No Cinema, a Musical Theatre) to Play a Video on a second screen/DLP, while it shows nothing but the video and on the first screen there is a terminal with some Information about the video (eg. the time when I have to start it and to stop)

There is also shown the MPlayer status-line (STATUSLINE: A: 7.9 V: 7.9 A-V: 0.000 ct: 0.040 0/ 0 20% 1% 0.4% 0 0) I know what the Variables are standing for, but I want to have other variables be put out.

The best status-Line would be:

Playing | 1m3s / 6m7s | Remaining 5m4s | CPU:1%

Is there any way to change it? If it is only changeable in the Source it would be cool to know at least the file where I have to search.

octosquidopus
  • 3,517
  • 8
  • 35
  • 53
Tobi
  • 1,175
  • 1
  • 19
  • 44
  • It appears this is the goal of the stdbuf question [Unbuffered parsing of mplayer output in shell script](https://stackoverflow.com/questions/21065030/unbuffered-parsing-of-mplayer-output-in-shell-script). – Adam Katz Apr 24 '14 at 22:54

1 Answers1

1

I would try to start with something like

mplayer test.mp3 | stdbuf  -o0 tr [:cntrl:] '\n' | stdbuf -oL grep A: | stdbuf -oL tr [:] [m] | stdbuf  -oL tr -d ['('')'] | awk '{ print "Playing | " $3 "/" $5  " | Remaining tbd "  }'

buffering gave me a hard time too when trying automated statusline read, my only way is to make single lines first by removing all :ctrl: stuff , and dont use sed or bbe, is not working unbuffered even when using stdbuf.

good luck

0800peter
  • 57
  • 2