snapshot application

This forum is about all development around libVLC.
niclaous
New Cone
New Cone
Posts: 2
Joined: 12 Feb 2018 16:30

snapshot application

Postby niclaous » 12 Feb 2018 16:55

hello
I want to create an application to be able to take a snapshot at a specific moment of a video stream but I have some difficulty... I tried in VBA with the takeSnapshot command but I can't choose the format and directory... also in command line, I tried with --scene-path and --scene-ratio but this saves continuously...

if you have any ideas to realize my project... it doesn't matter the programming language (VB, .net, C#, C++, ...)


thanks

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: snapshot application

Postby mangokm40 » 12 Feb 2018 21:10

I don't know if this helps, but in C, "libvlc_video_take_snapshot()" lets you select the location/filename.
I believe it only stores png format however. You'd have to convert after capture (I think).

niclaous
New Cone
New Cone
Posts: 2
Joined: 12 Feb 2018 16:30

Re: snapshot application

Postby niclaous » 13 Feb 2018 15:48

Do you have an example program? visual studio c++ does not want an option for takesnapshot...

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: snapshot application

Postby mfkl » 13 Feb 2018 18:38

https://mfkl.github.io

mangokm40
Cone that earned his stripes
Cone that earned his stripes
Posts: 130
Joined: 20 May 2010 20:00

Re: snapshot application

Postby mangokm40 » 14 Feb 2018 18:11

I am using VS C++ and snapshot is working like this:
int rc = libvlc_video_take_snapshot(vlcPlayer, 0, path, width, height);

For details, you can look here: https://www.videolan.org/developers/vlc ... b2d5a59143

Good luck! :)

LaKn
New Cone
New Cone
Posts: 1
Joined: 10 Mar 2018 11:14

Re: snapshot application

Postby LaKn » 10 Mar 2018 11:36

I am using TakeSnapshots to get a Picture from a video at a given Time. I use one routine/method (C#) to position to the wanted time and take the snapshot. There are two ways the method gets Called one for a single Snaphot and one From a start time to an end time and then 5 frames apart. The methods only parameter is the position in milliseconds in the video. Before and after the snapshot (in the code the line above and below the line taking the snapshot) I read back the current position in the video. In the case of a single snapshot the position within the video doesn't change. In case of the range the position returned is approx 5 frames shifted ahead and unluckily the snapshot as well. In my application i sometimes need to retake the snapshot at a given time from within the range and the pics differ. This drives me crazy.
Should/can TakeSnapshot advance the position?
Thanks for any reply


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 33 guests