Help us test VLC for Android and report bugs

VLC for Android and Chrome OS specific usage questions
wcoder
Blank Cone
Blank Cone
Posts: 26
Joined: 30 Mar 2014 12:56

Question dev on AndroidX86 4.4.2 + Test Samsung ATIV Celero

Postby wcoder » 16 Jul 2014 20:11

Hi,

My question is at the end ^_^...

I compile and test using https://wiki.videolan.org/AndroidCompile and with minor change it's work :
- export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
+ export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$ANDROID_NDK

- In the tool, install "SDK Platform Android 4.3, API 18", and follow the instructions.
+ In the tool, install "SDK Platform Android 4.4.2, API 19", and follow the instructions.

Dev machine : Debian 32 bits dev update 14 July 2014
Target machine : Samsung ATIV Celeron - XE700T1C - Androidx86 4.4.2 RC2
LibVLC android - Debug - Source from GIT - 15 July 2014 - Time > 18h00
Test File MKV H264 Dts 13Mbps - Film - OK
Test File MKV H264 Ac3 9Mbps - Anim - OK

My work :
I write a plugin on VLC (Linux version) to extract raw frame YUV 4.2.2 from mkv, i use it on a custom app to inject this raw frame to 3 OpenGL textures and i use shader to display it (YUV to RGB).

I write an android application (native code c++11) that share the same code than linux app to do the same things except :
- I startup opengl using EGL instead of GLX.
- I made minor change on shader (header).
- I don't integrate yet vlc, instead i read a static 3 plan YUV from file (static capture from linux video).

char szCreatePoolFct [64] = { 0 };
sprintf ( szCreatePoolFct, "%lld", (long long int)(intptr_t) CVideoTexture::CreatePoolCB );

char szDestroyPoolFct [64] = { 0 };
sprintf ( szDestroyPoolFct, "%lld", (long long int)(intptr_t) CVideoTexture::DestroyPoolCB );

char szUpdateFct [64] = { 0 };
sprintf ( szUpdateFct, "%lld", (long long int)(intptr_t) CVideoTexture::UpdatePictureCB );

char szContextPtr [64] = { 0 };
sprintf ( szContextPtr, "%lld", (long long int)(intptr_t) this );

// Preparation of the VLC command.
const char * const vlc_args [] { "--ignore-config" // Don't use VLC's config.
, "--file-caching", "100M" // Add cache for video.
, "--vout", "vraw" // Select raw video out module.
, "--wz_context_ptr", szContextPtr // Set callback Context.
, "--wz_create_pool_fct", szCreatePoolFct // Set callback CreatePool.
, "--wz_destroy_pool_fct", szDestroyPoolFct // Set callback DestroyPool.
, "--wz_update_fct", szUpdateFct // Set callback Update.
};

// Create VLC engine new instance.
m_ptrInstance = ns_media::ns_vlc::MakeInstancePtr ( true, sizeof ( vlc_args )/ sizeof ( vlc_args [0]), vlc_args );

// Create media from external file.
ns_media::ns_vlc::MediaPtr_t ptrMedia { ns_media::ns_vlc::MakeMediaPtr ( m_ptrInstance, pcszFileName )};

// Create a new item.
m_ptrMediaPlayer = ns_media::ns_vlc::MakeMediaPlayerPtr ( ptrMedia );

...

// Play the media_player.
libvlc_media_player_play ( m_ptrMediaPlayer.get ());


My questions:
1 - How can i integrate my plugin (standard plugin scan from module directory seems to be change to support apk)
2 - Is vlc standard code found on tutorial can be used to play a file pure native code no java.

Thanks for your help,

WCdr

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 16 Jul 2014 20:18

1) Check wiki.videolan.org on how to write a module

2) Use JNI to communicate with the API. There are some parts, most notably related to video, which hook into the Java parts of Android.

wcoder
Blank Cone
Blank Cone
Posts: 26
Joined: 30 Mar 2014 12:56

Re: Help us test VLC for Android and report bugs

Postby wcoder » 16 Jul 2014 21:41

Thanks for this quick answer ^_^

But i alread write the video raw frame extractor module and it's work under linux, my question is how use it on android...

For JNI, my android code is already located on it (it's work on arm and x86 processor with the same apk).

I don't want' to ping pong from c++ to java to call vlc C API...

My goal it use vlc like i do under linux :
- Extract raw frame from VLC (Linux : ok, android ndk : my question ) <- ?.
- Inject raw frame on opengl (Linux & android ndk : ok) <- EGL + OpenGL ES 2 + Shader .
- Audio (Linux : vlc internal renderer, android ndk : my future question if i don't found ) <- If internal renderer is not usable, i see the sample on ndk to play raw audio buffer...

I undestand that it's a different approche than your, but in final work, video will be display on light 3D environement and on a cross-platform environment.

Thanks,

WCdr

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 16 Jul 2014 21:50

As I said before, integrate your model into the VLC build process.

And VLC on Android has audio output modules (two of them, in fact).

wcoder
Blank Cone
Blank Cone
Posts: 26
Joined: 30 Mar 2014 12:56

Re: Help us test VLC for Android and report bugs

Postby wcoder » 17 Jul 2014 21:31

I do this :
1 - Create a symbolic link "vraw" on "...android/vlc/modules/video_output" to my plugin source.
2 - Add line this line after android section.
libvraw_android_plugin_la_SOURCES = vraw/vraw.c
libvraw_android_plugin_la_CFLAGS = $(AM_CFLAGS)
libvraw_android_plugin_la_LIBADD = $(AM_LIBADD)
libvraw_android_plugin_la_DEPENDENCIES =
vout_LTLIBRARIES += libvraw_android_plugin.la
3 - "sh compile.sh" on lib base folder.
=> BUILD SUCCESSFUL

Now i have a new version with my plugin inside :
- VLC-debug.apk - 13.3 Mb -x86
- And 4 .so (same than in apk) on vlc-android/libs/x86/ : libiomx-gingerbread.so, libiomx-hc.so, libiomx-ics.so, libvlcjni.so

I put base tutorial code on my navive code, i suppose\known it can't work (i don't set plugin out) but i just want to compile and link, for the moment....
has expect it compil but link failed : jni/Export.cpp:45: error: undefined reference to 'libvlc_new'...

Now how can i integrate apk or .so on my project
- I try to put .so on eclipse project x86 folder and add -lvlcjni -liomx-ics -liomx-hc -liomx-gingerbread on LOCAL_LDLIBS but it don't seems to work...
- I try google without success...

Thanks for your help

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 17 Jul 2014 21:44

You're not supposed to link against libvlcjni.so, I think.

wcoder
Blank Cone
Blank Cone
Posts: 26
Joined: 30 Mar 2014 12:56

Re: Help us test VLC for Android and report bugs

Postby wcoder » 19 Jul 2014 18:39

Ok now it compile with this modification below but my .so is smaller than 3 Mb, so i suppose a lot of things is missing...I supose that my libray now contain only VLC base file no plugin.
Just for information, i can't debug my laptop is too slow for debugger and my device refuse native debugger > Android 4.4.x bug...

If my information is correct the non-android libvlc is base on a plugin system store has .so.
I supose you made some modifications to store all plugins in your android version of libvlc for java.
I search with this glue and i found :
- 1 found : new_media\getMediaPlayer\releaseMediaPlayer
-> It's seems to be the native function call by java part of the player.
-> And the code below create vlc instance

- 2 found : The "Autogenerated from the list of modules " & const void *vlc_static_modules[] = { .... } and module_InitStaticModules (bank.c)
=> i supose it's a part of your patch : static plugin injection.
? But i don't undestand, i don't declare vlc_static_modules on my code and i have no link error !

My second problem is that i don't found the mecanism used to link plugin code with native .so, maybe a linux trick different from window style...

Please give me some glue, my only help is catfish with fulltext search, all my contact work under Window and never use VLC on there dev...

WCdr


Android.mk modification (quick & dirty for test only)
--------------------------------------------------------------------------
LOCAL_C_INCLUDES += $(CORE_PATH)
LOCAL_C_INCLUDES += /home/wizard/Code/code_linux/libvlc/android/vlc/include

LOCAL_CPP_INCLUDES += $(CORE_PATH)
LOCAL_CPP_INCLUDES += /home/wizard/Code/code_linux/libvlc/android/vlc/include

LOCAL_LDLIBS += /home/wizard/Code/code_linux/libvlc/android/vlc/build-android-i686-linux-android/lib/.libs/libvlc.a
LOCAL_LDLIBS += /home/wizard/Code/code_linux/libvlc/android/vlc/build-android-i686-linux-android/src/.libs/libvlccore.a
LOCAL_LDLIBS += /home/wizard/Code/code_linux/libvlc/android/vlc/build-android-i686-linux-android/compat/.libs/libcompat.a
LOCAL_LDLIBS += -L/home/wizard/Code/code_linux/libvlc/android/vlc/contrib/i686-linux-android/lib/
LOCAL_LDLIBS += -ldl -lz -lm \
-ldvbpsi -lebml -lmatroska -ltag \
-logg -lFLAC -ltheora -lvorbis \
-lmpeg2 -la52 \
-lavformat -lavcodec -lswscale -lavutil -lpostproc -lgsm -lopenjpeg \
-lliveMedia -lUsageEnvironment -lBasicUsageEnvironment -lgroupsock \
-lspeex -lspeexdsp \
-lxml2 -lpng -lgnutls -lgcrypt -lgpg-error \
-lnettle -lhogweed -lgmp \
-lfreetype -liconv -lass -lfribidi -lopus -ljpeg \
-ldvdnav -ldvdread -ldvdcss

This failed :
libvlc_instance_t * inst = libvlc_new ( 0, nullptr ); <- return null

Same things with this :
// Don't add any invalid options, otherwise it causes LibVLC to crash.
const char *argv[] =
{
// CPU intensive plugin, setting for slow devices.
"--audio-time-stretch",
//"--no-audio-time-stretch",

// avcodec speed settings for slow devices.
//"--avcodec-fast", // non-spec-compliant speedup tricks

//"--avcodec-skiploopfilter", deblockstr,

//"--avcodec-skip-frame", enable_frame_skip ? "2" : "0",
"--avcodec-skip-frame", "2",

//"--avcodec-skip-idct", enable_frame_skip ? "2" : "0",
"--avcodec-skip-idct", "2",

// Remove me when UTF-8 is enforced by law.
//"--subsdec-encoding", subsencodingstr,

// XXX: why can't the default be fine ? #7792 */
//(networkCaching > 0) ? networkCachingstr : "",

// Android audio API is a mess.
//use_opensles ? "--aout=opensles" : "--aout=android_audiotrack",
"--aout=opensles",

// Android video API is a mess.
//use_opengles2 ? "--vout=gles2" : "--vout=androidsurface",
"--vout=gles2",

//"--androidsurface-chroma", chromastr != NULL && chromastr[0] != 0 ? chromastr : "RV32",
"--androidsurface-chroma", "RV32",

// XXX: we can't recover from direct rendering failure.
//(hardwareAcceleration == HW_ACCELERATION_FULL) ? "" : "--no-mediacodec-dr",
};

// Load the VLC engine.
libvlc_instance_t * inst = libvlc_new ( sizeof ( argv ) / sizeof ( *argv ), argv );

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 19 Jul 2014 18:42

VLC is statically linked on Android.

ultraduck
New Cone
New Cone
Posts: 5
Joined: 01 Aug 2014 12:34

Re: Help us test VLC for Android and report bugs

Postby ultraduck » 01 Aug 2014 12:40

Hi I use a Sony Xperia S running Paranoid Android custom ROM 4.4.4. It takes about 5-6 seconds to go back to the ‘Artists’ list from the albums of a particular artist. What can I do to report this? Any help?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 02 Aug 2014 17:27

Do you have a lot of files?

ultraduck
New Cone
New Cone
Posts: 5
Joined: 01 Aug 2014 12:34

Re: Help us test VLC for Android and report bugs

Postby ultraduck » 03 Aug 2014 08:34

Yep about 800. Would it improve in the future versions?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 03 Aug 2014 16:05

I suppose that's more a limitation of your phone's memory, trying to load so many files.

neartheninja
New Cone
New Cone
Posts: 2
Joined: 06 Jan 2014 02:37

Re: Help us test VLC for Android and report bugs

Postby neartheninja » 06 Aug 2014 06:35

i have the LG G3 for verizon, i'm excited to try out VLC, the current play store version crashes sometime when watching the preloaded 4k videos or watching a streaming video from the web. is there a more specific version for this phone ? beta wise?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 06 Aug 2014 16:04

i have the LG G3 for verizon, i'm excited to try out VLC, the current play store version crashes sometime when watching the preloaded 4k videos or watching a streaming video from the web. is there a more specific version for this phone ? beta wise?
Have you followed http://wiki.videolan.org/Android_Report_bugs and seen what kind of crash?

Have you tried different hardware acceleration settings?

ultraduck
New Cone
New Cone
Posts: 5
Joined: 01 Aug 2014 12:34

Re: Help us test VLC for Android and report bugs

Postby ultraduck » 07 Aug 2014 12:04

I suppose that's more a limitation of your phone's memory, trying to load so many files.
Never had such a problem with other media players. I really like VLC though

cecilie
New Cone
New Cone
Posts: 3
Joined: 23 Feb 2009 07:51

Re: Help us test VLC for Android and report bugs

Postby cecilie » 13 Aug 2014 12:23

Hi,
I made a bug report about 3 weeks ago, and I haven't had a response, which is probably normal :), but I was wondering if anyone else is experiencing the same error as me.
It happens when I have watched a video and want to delete it. The video name in the confirmation pop-up often doesn't match the video I have chosen, and this results in the wrong video being deleted if I am not paying enough attention. Sometimes a re-load can fix it, but not always.

It's a small bug, but an annoyance for me, especially if I don't notice before a random video has been deleted and I can't remember which one is missing.

(Samsung S2 (i9100), Android ver. 4.1.2, VLC ver. 0.9.8 )

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 13 Aug 2014 14:37

Which bug report is it?

akua
New Cone
New Cone
Posts: 3
Joined: 13 Aug 2014 16:29

Re: Help us test VLC for Android and report bugs

Postby akua » 13 Aug 2014 16:55

Hi. I'm running CM11 and VLC v0.9.8 and I'm having issues when trying to use AudioTrack(Java) or AudioTrack(Native). If one of those two options are selected, and I try to play a random video, it switches to OpenSL ES which in my provides a lower output power compared to AudioTrack (AudioTrack works on the stock rom and the sound is powerful enough)

Here's the log

http://pastebin.com/L3kTTHzu

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 13 Aug 2014 16:57

Since you said that it works with stock, then it is probably a bug in CM11.

akua
New Cone
New Cone
Posts: 3
Joined: 13 Aug 2014 16:29

Re: Help us test VLC for Android and report bugs

Postby akua » 13 Aug 2014 17:15

Since you said that it works with stock, then it is probably a bug in CM11.
It might be, but I have a question. Why is the output power lower on OpenSL ES compared to AudioTrack?
Thanks

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 14 Aug 2014 00:11

No idea. Maybe a bug/trick in the way that CM's drivers perform?

speedcore
New Cone
New Cone
Posts: 1
Joined: 14 Aug 2014 05:30

Re: Help us test VLC for Android and report bugs

Postby speedcore » 14 Aug 2014 05:44

I'm not sure if this is already known. I found this bug: when you have some songs with the same album name vlc doesn't load the correct art from the mp3. It chooses a random art from one of the songs in that album and shows the same art for all the other songs.

cecilie
New Cone
New Cone
Posts: 3
Joined: 23 Feb 2009 07:51

Re: Help us test VLC for Android and report bugs

Postby cecilie » 14 Aug 2014 11:33

Which bug report is it?
I'm not sure what you mean by this? I sent an e-mail called delete file bug on july 22nd to videolan.mobile@gmail.com.

akua
New Cone
New Cone
Posts: 3
Joined: 13 Aug 2014 16:29

Re: Help us test VLC for Android and report bugs

Postby akua » 14 Aug 2014 14:13

No idea. Maybe a bug/trick in the way that CM's drivers perform?
The lower output power issue when using OpenSL ES is present on the stock ROM as well, so it's either a bug in VLC's implementation or OpenSL ES can't do any better.

Could someone please test the output power with OpenSL ES vs AudioTrack? Do you guys notice any difference?

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Help us test VLC for Android and report bugs

Postby edwardw » 14 Aug 2014 15:24

No idea. Maybe a bug/trick in the way that CM's drivers perform?
The lower output power issue when using OpenSL ES is present on the stock ROM as well, so it's either a bug in VLC's implementation or OpenSL ES can't do any better.

Could someone please test the output power with OpenSL ES vs AudioTrack? Do you guys notice any difference?
OpenSL ES works fine for me. If it's the same with stock, maybe it's a quirk with the hardware drivers.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 21 guests