[MEncoder-users] growth bar on linux

David Smith dcsmith2 at gmail.com
Thu Aug 7 21:33:47 CEST 2008


On Sat, Jul 26, 2008 at 4:38 AM, Philippe MONROUX
<phi2-monroux at wanadoo.fr>wrote:

> I all,
>
> First of all I apologize for my poor English...
>
> I'm using mencoder in a shell script (linux) and I want to make a
> growth bar which indicate progress status of encoding with bash and
> dialog.
>
> --gauge seems to be suitable for that but it needs integer which
> indicate the growth level of encoding.
>
> Of course there is mencoder statusline :
> Pos: 168.1s   4640f (90%) 35fps Trem:   1min  56mb  A-V:-0.018 [2378:192]
>
> but I don't know how to retrieve the Pos: number every minute by
> example.
>
> Any clue ? Thanks in advance
>
> --
> philippe
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>


I am using ColdFusion to invoke Java runtime.exe() that flushes the mencoder
command line output.  Then using buffered.readLine() you can capture each
"line" of output and perform string manipulation on it in order to isolate
the percentage amount .  From there you can update a session variable with
the percentage amount and have an Ajax/javascript progress bar widget (they
are numerous) ping the session variable every 1 second or so to give you the
current progress.  That is the gist of it.  I'm sure you can do the same
with any language, but ColdFusion (CFML) makes it extremely easy for me.
There is a lot of HTTP overhead associated with this method, but if you are
only doing a couple videos at a time most servers shouldn't have a problem.
I don't know about shell scripts on Linux, but this is my method for doing
it with an app language on Windows!



More information about the MEncoder-users mailing list