LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-27-2007, 10:15 PM   #1
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
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?
 
Old 03-28-2007, 04:48 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
Old 03-29-2007, 03:27 PM   #3
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Original Poster
Rep: Reputation: 45
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.
 
Old 04-02-2007, 11:42 AM   #4
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Original Poster
Rep: Reputation: 45
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 ...

Last edited by xhi; 04-02-2007 at 11:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Frame by Frame Playback Hioushi Linux - Desktop 2 10-18-2006 06:08 PM
mplayer - saving displayed frame? vimico Linux - Software 1 07-27-2005 07:19 PM
FC2 test 3 mouse skipping a beat, movie skipping also jang Fedora 1 10-28-2004 07:42 PM
Frame-by-frame video jeffChuck Linux - Software 0 10-12-2004 10:04 PM
calling a frame from another frame : JAVA randomx Programming 0 10-07-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration