Recent

Author Topic: Grab images using PasLibVLC  (Read 928 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 634
Grab images using PasLibVLC
« on: May 29, 2021, 10:24:22 am »
I'm pulling my hair out here.

How do I sequence a video and take snapshots?

For example I have a clip of 10000ms and want to take a snapshot every 1000ms.

With no useful docs and the fact that PasLibVLC won't run in the IDE makes this trivial task a nightmare.
« Last Edit: May 31, 2021, 03:29:06 pm by pcurtis »
Windows 10
Laz 2.0.10
FPC 3.2.0

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 986
Re: Grab images using PasLibVLC
« Reply #1 on: May 29, 2021, 05:22:01 pm »
hello,
to grab an image every seconds with ffmpeg:
Quote
ffmpeg -vsync 0 -i file.mp4 -vf fps=1,select='not(mod(t,1))' -frame_pts 1 temp\file.%d.jpg

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

pcurtis

  • Hero Member
  • *****
  • Posts: 634
Re: Grab images using PasLibVLC
« Reply #2 on: May 31, 2021, 01:28:48 pm »
Thanks, can a list of times be passed to ffmpeg? For example I want an image after 10, 39, 57 seconds?
Windows 10
Laz 2.0.10
FPC 3.2.0

Zvoni

  • Hero Member
  • *****
  • Posts: 627
Re: Grab images using PasLibVLC
« Reply #3 on: May 31, 2021, 02:22:00 pm »
Thanks, can a list of times be passed to ffmpeg? For example I want an image after 10, 39, 57 seconds?

Look at the "map"-option
http://johnriselvato.com/ffmpeg-how-to-extract-screenshots-from-multiple-parts-of-a-video/

ffmpeg -i input.mp4 -map 0:v -ss 00:00:10 -frames:v 1 frame_10.png -map 0:v -ss 00:00:39 -frames:v 1 frame_39.png .... and so on
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircraft

pcurtis

  • Hero Member
  • *****
  • Posts: 634
Re: Grab images using PasLibVLC
« Reply #4 on: May 31, 2021, 02:27:05 pm »
Thanks, been looking everywhere for that.
Windows 10
Laz 2.0.10
FPC 3.2.0

paweld

  • Sr. Member
  • ****
  • Posts: 288
Re: [SOLVED] Grab images using PasLibVLC
« Reply #5 on: May 31, 2021, 02:41:10 pm »
for PasLibVLC
Best regards
paweld

pcurtis

  • Hero Member
  • *****
  • Posts: 634
Re: [SOLVED] Grab images using PasLibVLC
« Reply #6 on: May 31, 2021, 02:57:53 pm »
Thanks. Any idea why PasLib is unresponsive in the IDE?
Windows 10
Laz 2.0.10
FPC 3.2.0

 

TinyPortal © 2005-2018