how to take snapshot on iOS

iOS, iPad, iPhone, tvOS specific usage questions
lawrie
New Cone
New Cone
Posts: 4
Joined: 30 Oct 2013 04:25

how to take snapshot on iOS

Postby lawrie » 09 Dec 2013 08:26

I want to take snapshot on iOS, I have found the method

Code: Select all

- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height;
here is my codes:

Code: Select all

NSString *desPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]; NSString *des = [desPath stringByAppendingPathComponent:@"lty.png"]; [_mediaPlayer saveVideoSnapshotAt:des withWidth:0 andHeight:0];
but I got the error:
[0xd445870] main video output error: Encoding support not compiled-in!
[0xd445870] main video output error: Failed to convert image for snapshot

Could anyone help me fix this problem?
Thanks a lot!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: how to take snapshot on iOS

Postby Jean-Baptiste Kempf » 09 Dec 2013 18:31

You need to recompile with streaming output.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

lawrie
New Cone
New Cone
Posts: 4
Joined: 30 Oct 2013 04:25

Re: how to take snapshot on iOS

Postby lawrie » 10 Dec 2013 02:38

You need to recompile with streaming output.

How to recompile with streaming output, could you describe in detail?

In my project, I just link with the libraries:"libMediaLibraryKit.a" and "libMobileVLCKit.a", then do my custom.

Thank you!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: how to take snapshot on iOS

Postby Jean-Baptiste Kempf » 10 Dec 2013 11:25

Sorry, no I can't. It's hard.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

lawrie
New Cone
New Cone
Posts: 4
Joined: 30 Oct 2013 04:25

Re: how to take snapshot on iOS

Postby lawrie » 12 Dec 2013 07:33

thank you anyway

mark1991
New Cone
New Cone
Posts: 5
Joined: 13 May 2015 14:36

Re: how to take snapshot on iOS

Postby mark1991 » 14 May 2015 05:42

did you fix this problem?

mark1991
New Cone
New Cone
Posts: 5
Joined: 13 May 2015 14:36

Re: how to take snapshot on iOS

Postby mark1991 » 14 May 2015 05:42

did you fix this problem?

mark1991
New Cone
New Cone
Posts: 5
Joined: 13 May 2015 14:36

Re: how to take snapshot on iOS

Postby mark1991 » 14 May 2015 11:32

You need to recompile with streaming output.
my code :

NSString *desPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
NSString *des = [desPath stringByAppendingPathComponent:@"lty.png"];
NSLog(@"%@",des);
[_mediaPlayer saveVideoSnapshotAt:des withWidth:0 andHeight:0];

but it is not ok
the log:shader program 1: WARNING: Output of vertex shader 'TexCoord1' not read by fragment shader
WARNING: Output of vertex shader 'TexCoord2' not read by fragment shader


do you know the reason please hep me please

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: how to take snapshot on iOS

Postby dfuhrmann » 15 May 2015 09:04

Again: We know the reason but this is not easy to fix. I do not know exactly why this method is there already, but do not expect a working version from us soon.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: how to take snapshot on iOS

Postby fkuehne » 15 May 2015 14:12

This method is OS X only. While it is exposed on iOS (what it should not be, I agree), it won't work on mobile devices.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 10 guests