LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mplayer frame skipping option (https://www.linuxquestions.org/questions/linux-software-2/mplayer-frame-skipping-option-541179/)

xhi 03-27-2007 10:15 PM

mplayer frame skipping option
 
im looking for command line option for mplayer that would specify how many frames to skip per second (or something like that).

i have an application that is using mplayer as a backend processor, and this skipping functionality is needed because i would like to generate a snapshot every second of the movie (for a filmstrip component).

i have been looking around and dont really see anything that will do what i need, but mplayer has so many options i would almost bet there is a way.

any ideas?

macemoneta 03-28-2007 04:48 PM

I know that ffmpeg can do this easily:

Code:

ffmpeg -i some.avi -an -r .1 -y test%d.jpg
The '-r' option specify the rate, in frames per second. In the above command the rate is '.1', so one frame grab is generated for each 10 seconds of video.

xhi 03-29-2007 03:27 PM

ok i tried that and it works just as i need it to, though i am surprised that mplayer does not have that available too. i would have figured that if ffmpeg had something mplayer would make it available as well. i guess i would have figured wrong.

thanks for your time.

xhi 04-02-2007 11:42 AM

i came across an option that does not seem to be well documented for mplayer (or rather, i just didnt find it until now..)

-sstep

it specifies how many seconds to skip between reads. it seems to work well so far.

i had been using the other solution with ffmpeg with no problems. however i am making heavy use of EDL files, which are unsupported by ffmpeg, and it was causing extra work to work around that limitation.

-x

PS. it looks like this may not be as exact due to mplayer only being able to seek to the next keyframe. i am coming out with image counts that do not match the video length. hmm ...


All times are GMT -5. The time now is 11:23 AM.