Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
Batch grabbing photos from video
David LOVEGROVE [Avatar]
Newbie Joined: Mar 24, 2018 04:48 Messages: 4 Offline
[Post New]
HI there, in a current project I am taking frame by frame screenshots in pd14, to edit in a separate program. Is there a more automated way of doing this?
TIA
Dave.
Hatti
Contributor Location: Bonn, Germany Joined: Feb 21, 2017 15:54 Messages: 576 Offline
[Post New]
Oh yes. My always favorite tool of choice is ffmpeg.
And with:

ffmpeg -i videofile image-%05d.png

ffmpeg creates images from a film. The %05d means: Images begin with image00000.png and are created with 25 images per second of video.
But there are many more options, the internet is your friend.

Hatti Win 10 64, i7-4790k, 32GB Ram, 256 GB SSD, SATA 2TB, SATA 4TB, NVidia GTX1080 8GB, LG 34" 4K Wide, AOC 24" 1080
David LOVEGROVE [Avatar]
Newbie Joined: Mar 24, 2018 04:48 Messages: 4 Offline
[Post New]
Is this a feature within PD14?
Hatti
Contributor Location: Bonn, Germany Joined: Feb 21, 2017 15:54 Messages: 576 Offline
[Post New]
No. It's a standalone commandline driven program.

Hatti Win 10 64, i7-4790k, 32GB Ram, 256 GB SSD, SATA 2TB, SATA 4TB, NVidia GTX1080 8GB, LG 34" 4K Wide, AOC 24" 1080
Longedge [Avatar]
Senior Contributor Joined: Apr 28, 2011 15:38 Messages: 1504 Offline
[Post New]
If you have VLC on your system then you can grab a series of still frames with that. It requires changing some of the advanced settings but it works perfectly and is very configurable in terms of file type, frequency of grabs, saved location and so on.

p,s, If anybody wants to try it - VLC/settings, select "All" bottom left, expand "Video" and "Filters" then select "Scene filter" in that section enter filetype required e.g. "jpg" leave next 3 items at "-1","-1" and "scene" and then choose save location that exists, on my system e.g. "D:\capture" (case sensitive). Now you need to do a bit of math for "Recording ratio". This is the frequency at which frames are captured while the video is playing. The default is 50 and if a 50fps video is being displayed then 1 frame will be captured each second. Change that to 150 and 1 frame will be captured every 3 seconds, 25 = 2 frames a second and so on.

The downside to using this method is that you have to actually play the video and the frames are captured as it plays.

This message was edited 1 time. Last update was at Mar 26. 2018 09:46

David LOVEGROVE [Avatar]
Newbie Joined: Mar 24, 2018 04:48 Messages: 4 Offline
[Post New]
Thanks for the reply!

I have tried ffmpeg, however, I am finding Powershell to be too confusing for a ludite like myself. I have now also downloaded VLC and have followed your instructions in changing the setting, apart from where to input the recording ratio, as I cannot find this in the settings menu? There seems to be lots of internet vids about taking a single screenshot but none I can find for extracting multiple shots.

Quote If you have VLC on your system then you can grab a series of still frames with that. It requires changing some of the advanced settings but it works perfectly and is very configurable in terms of file type, frequency of grabs, saved location and so on.

p,s, If anybody wants to try it - VLC/settings, select "All" bottom left, expand "Video" and "Filters" then select "Scene filter" in that section enter filetype required e.g. "jpg" leave next 3 items at "-1","-1" and "scene" and then choose save location that exists, on my system e.g. "D:\capture" (case sensitive). Now you need to do a bit of math for "Recording ratio". This is the frequency at which frames are captured while the video is playing. The default is 50 and if a 50fps video is being displayed then 1 frame will be captured each second. Change that to 150 and 1 frame will be captured every 3 seconds, 25 = 2 frames a second and so on.

The downside to using this method is that you have to actually play the video and the frames are captured as it plays.
ynotfish
Senior Contributor Location: N.S.W. Australia Joined: May 08, 2009 02:06 Messages: 9977 Offline
[Post New]
Hi David -

I think Longedge's VLC suggestion will work well for you. Here are some written instructions that might help.

Cheers - Tony
Visit PDtoots. PowerDirector Tutorials, tips, free resources & more. Subscribe!
Full linked Tutorial Catalog
PDtoots happily supports fellow PowerDirector users!
Longedge [Avatar]
Senior Contributor Joined: Apr 28, 2011 15:38 Messages: 1504 Offline
[Post New]
"I cannot find this in the settings menu" - It's at the bottom of the other settings I mentioned.

p.s. - I use VLC as my default media player. To stop frames being grabbed being grabbed every time I play a video, I just go into the same settings and blank out the "Directory path" setting otherwise my hard drive would soon be full smile.
[Thumb - sshot.jpg]
 Filename
sshot.jpg
[Disk]
 Description
Screenshot
 Filesize
20 Kbytes
 Downloaded:
5 time(s)

This message was edited 1 time. Last update was at Mar 27. 2018 07:15

David LOVEGROVE [Avatar]
Newbie Joined: Mar 24, 2018 04:48 Messages: 4 Offline
[Post New]
Thanks for the help so far!

This process is really beginging to frustrate me. I had made the mistake of clicking on "filters" and seeing "scene video filter" rather than expanding the "filters" downwards.

I have sorted this now, created a folder on the desktop, and copied and pasted its path.

Unfortunately this is still not working automatically when starting a video. If i manually click screenshot it adds one to the folder?!?

I have tried resetting settings and then applying the changes again, as well as restarting my pc. I am at a loss as to what's wrong!


Quote "I cannot find this in the settings menu" - It's at the bottom of the other settings I mentioned.

p.s. - I use VLC as my default media player. To stop frames being grabbed being grabbed every time I play a video, I just go into the same settings and blank out the "Directory path" setting otherwise my hard drive would soon be full smile.
Longedge [Avatar]
Senior Contributor Joined: Apr 28, 2011 15:38 Messages: 1504 Offline
[Post New]
It is complex with all the options but it does work perfectly when you get your head round it. It's one of those pieces of software where most people don't even scratch the surface. I take it you realise that you have to actually play the video for the grabs to occur?
ynotfish
Senior Contributor Location: N.S.W. Australia Joined: May 08, 2009 02:06 Messages: 9977 Offline
[Post New]
Hi Daniel -

This annotated screen capture might help you with those VLC settings.

If something's not working properly, make sure sure you run VLC Player "as administrator".



Cheers - Tony
Visit PDtoots. PowerDirector Tutorials, tips, free resources & more. Subscribe!
Full linked Tutorial Catalog
PDtoots happily supports fellow PowerDirector users!
Powered by JForum 2.1.8 © JForum Team