[MPlayer-dev-eng] Re: [PATCH] add -endpos support in mplayer too::2nd try

Alban Bedel albeu at free.fr
Thu Nov 17 21:29:48 CET 2005


On Thu, 17 Nov 2005 19:05:47 +0100
Paul TT <paultt at hackerjournal.it> wrote:

> refitted to cvs of 20051117... :-)
> 
> i think i will commit in a few days if noone complains....
> the discussion below about endpos relative to -ss made me think about a
> 'correction' to ss code, instead to the one related to endpos.
> i think i'll do, but later on:-)

imho this need to be worked on a bit more before commit.

> ---
> 
> the patch adds support for -endpos option in mplayer.
> added also modifications for mplayer.1 man page
> 
> the only problem is the computation of the end time if used in
> conjunction with -ss option (in secs):
> acting this way:
> 
> mplayer -ss 3 -endpos 12 file.avi
> 
> starts at second 3 and ends at sec 15 (abs time of clip).
> and this is good.
> but for some files/formats, the playing doesn't start indeed at second 3
> but  maybe at second 8. in this situation i stop anyway at sec 15.
> 
> i think it could be good in this way too, since if i want to play
> exactly 15 sec i should calculate number of frames.

Adding up the duration of the frames that (should) have been displayed is
probably the only way to get a reliable absolute time value in mplayer.
The video timestamp can (and do on many dvd) jump around so it's not really
usable imho.

> but: is it good indeed or not??
> and if not, has someone an idea about the possibility to track the
> 'real' start time (that (in)famous 8 in the example above)?????
>
> thanx, PaulTT
> 
> NOTE it does not implement endpos at byte position , since it seems
> unuseful, but maybe one day or another, or someone else... ;-)
> 
> NOTE2: there should be, now or then, by me or by someone else, an effort
> to move parse_at_end function in a place shared by both mplayer and
> mencoder. when the patch will be applied, i'll do the task...

imho this should be done rigth away. Attached is a patch that add the new
option type. I didn't tested it so it might have some little pbs.

	Albeu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time_size.diff
Type: application/octet-stream
Size: 3222 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051117/a70edb75/attachment.obj>


More information about the MPlayer-dev-eng mailing list