Page 1 of 1
vlc for Android can't take snapshot of rtsp video
Posted: 29 Jan 2013 04:48
by rowa
I have compiled a version of libvlcjni.so followed by this:
http://wiki.videolan.org/AndroidCompile;
it works really nice on my AVDs and cellphone with architechture armV5;
but the problem for me is that: I can't find a way to take a snapshot of the playing rtsp with the mrl like "rtsp://*.*.*.*/main";
neither of the function of record the playing video of rtsp;
may someone do me a favor to give me a solution for these problems above, thans a lot!
Re: vlc for Android can't take snapshot of rtsp video
Posted: 29 Jan 2013 20:07
by edwardw
The snapshot feature is not supported in VLC for Android yet.
Re: vlc for Android can't take snapshot of rtsp video
Posted: 31 Jan 2013 04:42
by rowa
i add a function in libvlcjni.c and compiled a new libvlcjni.so
Code: Select all
jboolean Java_org_videolan_vlc_LibVLC_snapshot(JNIEnv *env, jobject thiz, jstring path, jint width, jint height)
{
/* get media player */
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
if (!mp){
return JNI_FALSE;
}
jboolean isCopy;
/* Get C string */
const char* save_path = (*env)->GetStringUTFChars(env, path, &isCopy);
// take a snapshot
libvlc_video_take_snapshot(mp, 0, save_path, width, height);
(*env)->ReleaseStringUTFChars(env, path, save_path);
return JNI_TRUE;
}
and i called this native function in android, the error message of logcat:
avcodec encoder cannot find encoder PNG Image
*** Your Libav/FFmpeg installation is crippled. ***
*** Please check with your Libav/FFmpeg packager. ***
*** This is NOT a VLC media player issue. ***
main encoder Streaming / Transcoding failed
main encoder It seems your Libav/FFmpeg (libavcodec) installation lacks the following encoder:
PNG Image.
If you don't know how to fix this, ask for support from your distribution.
This is not an error inside VLC media player.
Do not contact the VideoLAN project about this issue.
main encoder no suitable encoder module for fourcc `png '.
VLC probably does not support this image format.
main video output Failed to convert image for snapshot
and how can i fix this problem?
Re: vlc for Android can't take snapshot of rtsp video
Posted: 31 Jan 2013 04:46
by edwardw
It is not supported yet.
Re: vlc for Android can't take snapshot of rtsp video
Posted: 04 Mar 2013 09:59
by rowa
after altering the build-conofig file of ffmpeg,
the function of snapshot works as well as I've imagined!
just add "--enable-png"
Re: vlc for Android can't take snapshot of rtsp video
Posted: 08 Jan 2014 04:09
by jason_lee
hi, friend, could you tell me how to add the snapshot function on vlc for android?
Here is my way to do that:
1) delete "--disable-sout" in configure.sh
2)add "--enable-png"in rule.mak
but when I recompile the program, I got following error:
SharedLibrary : libvlcjni.so
/opt/android/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/objs-debug/vlcjni/libvlcjni.o: in function vlc_static_modules:libvlcjni.c(.data.rel+0x4c): error: undefined reference to 'vlc_entry__access_output_udp'
have you met such error, if so, can you tell me how to solve it.
Thank you in advance!
Re: vlc for Android can't take snapshot of rtsp video
Posted: 08 Jan 2014 04:11
by edwardw
It is not supported.
Re: vlc for Android can't take snapshot of rtsp video
Posted: 10 Jan 2014 09:57
by jason_lee
It is not supported.
hi, I'm trying to take snapshot under vlc. You mean this function is not supported by vlc for android and we can't add it ourselves? Have you try it by yourself? Any response will be very appreciate.
Re: vlc for Android can't take snapshot of rtsp video
Posted: 13 Jan 2014 11:38
by XilasZ
not currently supported by vlc for android, we didn't try, but why did you remove --disable-sout ?
snapshots are not related to sout i think.
Re: vlc for Android can't take snapshot of rtsp video
Posted: 14 Jan 2014 03:50
by jason_lee
not currently supported by vlc for android, we didn't try, but why did you remove --disable-sout ?
snapshots are not related to sout i think.
Thanks very much for your reply. I'll reconsider about that. Thanks again!