Page 1 of 1

snapshot application

Posted: 12 Feb 2018 16:55
by niclaous
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

Re: snapshot application

Posted: 12 Feb 2018 21:10
by mangokm40
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).

Re: snapshot application

Posted: 13 Feb 2018 15:48
by niclaous
Do you have an example program? visual studio c++ does not want an option for takesnapshot...

Re: snapshot application

Posted: 13 Feb 2018 18:38
by mfkl

Re: snapshot application

Posted: 14 Feb 2018 18:11
by mangokm40
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! :)

Re: snapshot application

Posted: 10 Mar 2018 11:36
by LaKn
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