[MPlayer-dev-eng] [PATCH] new option: -startpos (was "the seek to position -ss option does not really set a new playback start position")

Jehan Pagès jehan.marmottard at gmail.com
Wed Apr 7 16:52:30 CEST 2010


Hi,

ok so I have been given some thoughts to this. Instead of modifying
-ss, because I think its current way of doing is useful for some
people, I made a new option. Anyway -ss is "seek to seconds", so
semantically it just means that you seek, not that you change the
start position. This is what -startpos will be then. ;)

So basically it just does the same as -ss except that it jails the
lecture. So you cannot seek backwards. Note that it can be used along
with -ss, then the lecture will begin at the position of -ss (and you
will be able to seek backwards -ss, down to -startpos). Of course, -ss
has to be over -startpos to be meaningfull (in the code, if -ss if
under -startpos, I simply discard -ss, but maybe a warning should be
raised).

I have upgraded the English and French man as well (you have no
Japanese man, I see?). I have fixed in the same time the description
of -endpos (because it was only writing about encoding, not playback
as though only useful for mencoder).

I don't know well mencoder (I have never used it "directly" in command
line), but I guess you cannot seek (can you? I Don't see how you can
seek while encoding). So there -startpos would be meaningless (or
rather would not do anything more than -ss), so in mencoder, -startpos
is used like -ss (if you use both with mencoder, then -startpos is
simply discarded).
Ok that's it. I hope you will find this patch as useful as I do,
because now I use this option with delight every day for working on
music!
Bye.

Jehan

P.S.: in fact for understanding how I use this, I made another
feature, commands which enable to modify startpos and endpos on the
fly during playback, as well as reset them to continue the full
playback on the whole file.
So I bound such commands to keys and while I am working on a music (I
am musician), when I want to work on a specific piece of the song
(sometimes just a few seconds) repeatively, I can set a new start and
end on the fly (combined with existing loop command) to work on it.
Then when finished, I reset these positions to continue to the next
piece of song I want to work on.
I intend to send this new patch also as soon as the -startpos option's
patch is included in the repository (because this other feature is
based on -startpos). Hope this is soon then. :)

2010/4/4 Jehan Pagès <jehan.marmottard at gmail.com>:
> Hi,
>
> as a musician, when I work on a song, I want to be able to set a
> (sometimes very) small time range of the song apart to work on it (and
> usually I will loop it indefinitely). For this we have the "-ss xx
> -endpos yy" solution which works great as long as we don't seek
> manually out of this range. But if we do, -endpos indeed blocks the
> seek but -ss does not, and that does not suit me.
>
> To make it clear, let's have an example: let's say I set -ss 50. I am
> at timestamp 55 and I seek backwards with the default 10 seconds. What
> I would like is that it brings me back to timestamp 55 (which I want
> to consider as my reference-start in the current playback) but what it
> does is that it would bring me back to 45.
>
> Note that -endpos already works as I want (if I seek over endpos, it
> will end the playback, go to the next file, or loop depending on how I
> set this).
>
> So I have patched mplayer such that -ss works the same way as -endpos.
>
> Note that maybe other people consider this is the way that -ss should
> work (only as a "default seek forward", not supposed to jail the
> playback into a new start position). If this is the case, then I
> propose to let it as it is (hence do not apply my patch) and to create
> a new option, probably named -startpos, with a symetric logic as
> -endpos (then to really jail the playback, we would rather use
> "-startpos xx -endpos yy" from now on).
> Tell me if you prefer this solution.
> Bye.
>
> Jehan
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_startpos.patch
Type: text/x-patch
Size: 4799 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100407/f515c747/attachment.bin>


More information about the MPlayer-dev-eng mailing list