Automatically capturing frames every X seconds

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
badbonez
Blank Cone
Blank Cone
Posts: 14
Joined: 07 Feb 2006 23:41

Automatically capturing frames every X seconds

Postby badbonez » 15 Feb 2006 20:44

Hello, I've done a search and the other posts regarding this did not answer my question. Is there a way I can get the VLC player to take a snapshot say every .5 second and save it in a directory I chose? I know there is the command line parameter --snapshot, but I am very new to this and not familiar with the command line syntax yet.

One clue in another post was to get the video to play say 2 fps, but I don't know how to integrate that information into the command line syntax of snapshot. How do you get snapshot to then save an image for every frame played?

Thanks!
Last edited by badbonez on 15 Feb 2006 22:02, edited 2 times in total.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 15 Feb 2006 21:03


badbonez
Blank Cone
Blank Cone
Posts: 14
Joined: 07 Feb 2006 23:41

Postby badbonez » 15 Feb 2006 21:30

Thanks DJ, I had looked at that post and I was able to get the help files and print them out. However, I do not know how to integrate the snapshot command into the command line so that it saves the frames. That help file tells me the commands available, but not necessarily how to use them.

EDIT: To be clear, I want to have VLC automatically take snapshots at a specified interval. I now understand how to use the snapshot command, but how do I tell it to save a frame once every second?

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 16 Feb 2006 06:02

You will have to use the Video output module called "image". Instead of displaying on screen, it will take snapshots at you specified frame interval.

You cannot watch on screen and take interval snapshots at the same time though.
Don't use PMs for support questions.

badbonez
Blank Cone
Blank Cone
Posts: 14
Joined: 07 Feb 2006 23:41

Postby badbonez » 16 Feb 2006 21:48

OK, I'm back...still confused :?

I have been trying to figure out the syntax for the Image module for the past couple few hours, and I know it's probably simple for you but I'm still pretty new.

I want to save frames from a video file one every 30 seconds. I've tried :sout #image{format=png,ratio=30,prefex=test} and I get the error that there is no image module for sout. So I figure that maybe the syntax should start with :image #something{format=png,ratio=30,prefix=test} but I don't know what that something is. Also, should I be putting Snapshot in there somewhere? What is the path the VLC will save my files with the prefix "test?"

Again, I realize this is pretty trivial for people who understand the command line syntax, but I'm just learning and feel like if I can get over this hump the rest will make sense. So thanks, again.

Oh, i've been doing this in the Stream Output settings where you type in the destination target. Is that OK?

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 17 Feb 2006 15:58

Oh, i've been doing this in the Stream Output settings where you type in the destination target. Is that OK?
No that's wrong. It's not a streaming output module, it's a video output module.


Preferences -> Video -> Output modules
Don't use PMs for support questions.

badbonez
Blank Cone
Blank Cone
Posts: 14
Joined: 07 Feb 2006 23:41

Postby badbonez » 17 Feb 2006 18:38

Oh... :o I see. It's easier than I thought. How do you specify the Image Video Module with command line syntax?

Thanks again.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 17 Feb 2006 21:10

--vout=image
Don't use PMs for support questions.

spline

Postby spline » 10 May 2006 13:14

Hi,

thanks for this thread. Exactly what i was looking for.
Just one more question.
If i have an video with 60 minutes runtime, how long doeas it take to save every 1000th picture. Does vlc "plays" the whole movie (meaning 60 minutes) and stores the required picture or will the 999 frames between two "save point" will be skipped?

Regards

spline

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 10 May 2006 23:20

yes, it will play the whole movie at 1x speed. (The only difference with normal playback is that it displays in a file instead of on the screen ... other parts of VLC just behave as usual)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

ruthman
New Cone
New Cone
Posts: 1
Joined: 23 Jun 2011 16:06

Re: Automatically capturing frames every X seconds

Postby ruthman » 23 Jun 2011 16:16

I also wanted to extract the individual image frames from a video file. But when I ran across this topic, I still couldn't figure it out. Turns out that the 'image' module has been replaced by the 'scene' module. Here is an example that works for VLC 1.1.0, assuming that you have a file 'test.mpg'.

First, try

C:\Program Files\VideoLAN\VLC>vlc test.mpg

to make sure VLC can play it. Then extract the image frames using:

C:\Program Files\VideoLAN\VLC>vlc --video-filter=scene --scene-prefix=myimagename --scene-format=jpeg --scene-ratio=1 --scene-path=c:\myimagedir test.mpg

'scene-ratio' tells it how many frames to write out, so 1 means write out all the frames. Of course, replace 'test.mpg' with whatever source you have. For more help on the command line options, type 'vlc --longhelp'.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Automatically capturing frames every X seconds

Postby VLC_help » 23 Jun 2011 17:35

Scene filter might not capture all frames with scene-ratio=1. (and please, don't wake up old threads)


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 43 guests