[MEncoder-users] Problem with -ss

James Hastings-Trew jimht at shaw.ca
Fri May 30 21:24:41 CEST 2008


Henk Schoneveld wrote:
> Henk Schoneveld wrote:
>   
>> James Hastings-Trew wrote:
>>   
>>     
>>> According to the manual, -ss <sec> should skip forward to that number of 
>>> seconds in the playback or encoding of a file. However, if I perform the 
>>> following:
>>>
>>> mplayer -vf cropdetect -nosound -frames 10 -ss 5415 %source%
>>>
>>> I do not arrive 5415 seconds into the video. I end up at about 8 minutes 
>>> and 25 seconds in. If I try it in hour:mins:sec format I get the same 
>>> result:
>>>
>>> mplayer -vf cropdetect -nosound -frames 10 -ss 1:30:25 %source%
>>>
>>> So... what am I doing wrong?

>>>   
>>>
>>> Sorry about giving the wrong info, cut & paste between linux and vmware 
>>> didn't work and I didn't check what was pasted, sorry about that
>>> Here is the right one:
>>> GETCROP=$(mplayer "$sourcetype" $device $vid -vf cropdetect -nosound 
>>> -nocache -frames 500 -vo null -ss $(($VLENGTH/2)) 2>/dev/null | tr '\r' 
>>> '\n' | grep "crop=" | tail -1 | awk '{print $9}' | sed 's/crop=//g; 
>>> s/).//g')
>>>       

Maybe I am being dense but I am unsure of this construction:

-ss $(($VLENGTH/2))

seems to be if $VLENGTH=6300 then this would be putting -ss $((6300/2)) on the command line...

In my own tests I found the value is off by a factor of slightly more than 10. i.e. 54150 gets me roughly where I wanted 5415 to take me. I can live with that, but it seems like a bug to me. ;)






More information about the MEncoder-users mailing list