[MPlayer-users] How to pause mencoder

Geoffrey Espin espin at idiom.com
Wed Dec 24 17:40:31 CET 2003


On Wed, Dec 24, 2003 at 11:45:15AM +0100, Attila Kinali wrote:
> On Tue, 23 Dec 2003 14:17:55 -0800
> Geoffrey Espin <espin at idiom.com> wrote:
> > Here's a patch that adds a bunch of hacks with the _potential_ of
> > including pause (just add into mencoder.c look for "check keyboard
> > input").  Pause would be great if recording of live-TV and want to
> > skip adverts by hand.  Adding a 'q' command was vital for restarting
> > mencoder quickly, the kill took a long time from Perl.

Forgot to mention: I do _love_ mencoder/mplayer and this great forum!

> Dont send such patches to -users, read DOCS/tech/patches.txt

patches.txt does not say: don't send to -users list.

Sorry, these are not polished gems.  These are hacks to get the job
done.  I have no expecation of them being incorporated.  Maybe some
ideas will germinate.

> > * mencoder checks input: q-quit, i<n> switch video input (0-3)
> rejected. I dont see any need for such a hack

The use of kill/nice with mencoder is clumsy at best.  Imagine if
that was the User Interface for mplayer?  Hah!  I look forward to
gmencoder one day.  :-)

I taught mencoder to monitor standard input, so that when using a TV
input for a security camera I can select different inputs on the
fly.  Killing mplayer and restarting with new input took close to 4
seconds.  The typical dwell time in a security application may be 5
seconds, plus you end up with 1000's of .avi files laying around.
Selecting input (admittedly my code is a horrible hack with global
variables) dynamically means instant swithing and one .avi file.
Plus the realtime subtitles indicate which Input/Camera was selected.

> > * added sub.txt support (real-time subtitles for use with mencoder)
> real time subtitles ?

Generated on the fly by the program running mencoder, e.g.  if using
live TV or security camera then insert time-stamp and other inputs.
I used to use ffmpeg with its -vhook drawtext.so which had "%c" for
inserting clock time on video.  But mencoder's subtitles are far better.

> > * get_time_pos: prints "ANS_TIME=" the number of seconds in the current file
> dont we have somthing like this already ?

I'll admit I'm not sure why we need a floating point version, but why not
have sub-second offset to frames?

> > * get_url: prints "ANS_URL=" the url of the current file
> i dont see any sense in this command

When you're manipulating mplayer to move around in a list of files,
you need to know where you are (imagine with -loop 0 and -fixed-vo)!
I believe this patch was submitted _properly_ (and not by me) to
-dev-eng last summer, but was rejected.

> > You could use lsdiff/filterdiff to extact just patches of interest.
> No, that's your work. Developers are busy and dont have much time.
> If you want your patches being included in mplayer, you should follow
> the rules and take as much work from the developers as possible.

I did not send to -dev-eng.  I sent it for the original poster.

There were 15 posts that said the same thing: use kill/nice.  My
post took the novel approach of suggesting that a small change to
mencoder to watch its standard input would be a Good Thing.
Sorry for all the other unwanted noise.

Geoff
--
Geoffrey Espin
espin at idiom.com




More information about the MPlayer-users mailing list