B4A Library vlcb4a - a B4A wrapper of VLC (Android)

vlcb4a - a B4A wrapper of VLC (Android)

NOTE: As of August 2019, this library is not compliant with Google Play store's latest requirements which require native 64bits libs. It is still useable for apps not being distributed on Google Play Store though. If I can find my original sources and if it is not too complicated, I will try to recompile the sources in order to provide 64bit native libs. That said, things have changed over time and personally I would probably use the ExoPlayer (search the forum) these days unless you have codec-issues. Alternatively, you can use my Vitamio5 library/wrapper which has ARM64 and which is just as powerful as VLC.

This is the 2nd experimental release (Work in progress) of my library attempting to wrap VLC for Android (or parts of it) and its underlying libraries (so-files) and the most important properties/methods of VLC in order to provide a VideoView-object for B4A.

What is VLC for Android?
VLC media player is a free and open source cross-platform multimedia player that plays most multimedia files as well as discs, devices, and network streaming protocols. This is the port of VLC media player to the Android™ platform. VLC for Android can play any video and audio files, as well as network streams and DVD ISOs, like the desktop version of VLC.
VLC for Android is a full audio player, with a complete database, an equalizer and filters, playing all weird audio formats.

The official VLC Android app can be found here:
https://play.google.com/store/apps/details?id=org.videolan.vlc

As mentioned above, the vlcb4a wrapper is not the full Android VLC app but more an attempt to wrap the underlying libraries (so-files) and the most important properties/methods of VLC (its engine) to provide a VideoView-object for B4A. Apparently they are/were planning to write a VideoView-class but there has not been any development on this class for ages and all there is, is a "skeleton-class" of no use since even the related MediaPlayer-class is incomplete.

This wrapper provides its own VideoView class which I have written and compiled into the original VLC-sources based on SDK 3. The SDK can be found here: https://code.videolan.org/videolan/vlc-android/tree/master

This release (version 0.77 of June 27, 2016) adds and includes more features and also fixed some issues (see below for details). I have noted that the vlcb4a plays nearly everything I throw at it.

This is still a "Work in progress" and ETAs for new versions cannot be given. However, I think it should be OK for production by now.

In this moment, I have only compiled the so-sources for ARM but I could compile them also for other platforms such as ARM64, X86 and MIPS. Might add them later though.

The minimum SDK version is 7 (although I have not tried it if it works on such old devices).

See the second post for a current summary of methods, properties and events supported.

You can download the wrapper from here:
https://www.dropbox.com/s/i4d9bul243fc1o4/vlcb4aLIBS_v077.zip?dl=0

I also attach a sample-project (vlcdemo.zip) for B4A.

Note: use a real device
Note2: always use the VideoView object in its own activity. Within this activity, you can then add panels, subtitles and so on as usual. See sample project.

Changes in vlcb4a version 0.77 (June 27, 2016):
  • -added native subtitle support
  • -added possibility to change between 6 different video-sizes
  • -added support for selecting different audio-tracks
  • -added a MediaController (uses the standard Android one for now)
  • -added possibility to add VLC-options. You can add logging,
    OpenSL ES, audio time stretching and more. You can find many more options by googling.

  • added volume controls
  • bug fixes
Please report any bugs and/or post general feedback (negative/positive). This will help to keep me motivated and work on the library further.


Good luck!
 

Attachments

  • vlcdemo.zip
    8.8 KB · Views: 932
Last edited:

moster67

Expert
Licensed User
The following summary presents the current status of the wrapper (version 0.77 of 27/06/2016):

vlcb4a
Author:
Mikael Osterhed aka moster67
Version: 0.77
  • VLCMediaController
    Events:
    • onMediaControllerHidden
    • onMediaControllerShown
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • Hide
      Hide the controller on screen.
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • IsShowing As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • Show
      Shows the controller on screen.
      It will go away automatically after a default 3000 milliseconds of inactivity.
    • Show2 (Timeout As Int)
      Shows the controller on screen.
      It will go away automatically after 'timeout' milliseconds of inactivity.
      Use 0 to show the controller until hide() is called.
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean [read only]
    • Parent As Object [read only]
    • Tag As Object
    • Visible As Boolean
  • VLCVideoView
    Events:
    • onCompleted
    • onError
    • onPrepared
    Fields:
    • VOLUME_MUSIC As Int
    • VOLUME_VOICE_CALL As Int
    • ba As BA
    Methods:
    • BringToFront
    • CanSeekBackward As Boolean
      Verifies if the media can seek backward.
    • CanSeekForward As Boolean
      Verifies if the media can seek forward.
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • IsPlaying As Boolean
      Tests whether the video is currently playing.
    • Pause
      Pauses the playback.
    • RemoveView
    • RequestFocus As Boolean
    • Resume
      Resumes the playback.
    • SeekTo (Milliseconds As Int)
      Seeks to specified time position. Parameters: Milliseconds - the offset in milliseconds from the start to seek to.
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (Top As Int, Left As Int, Width As Int, Height As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetMediaController (MediaController1 As ExtMediaPlayerControl)
      Sets the MediaController. Video must be prepared state to set it (use onPrepared).
      To disable MediaController, set it to null.
    • SetVideoPath (VideoPath As String)
      Sets the local file path of the video to play.
      example:
      SetVideoPath(File.Combine(File.DirRootExternal, "test_video.mp4"))
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • SetVlcOptions (VlcOptions As ArrayList)
      Sets various VLC options. Must be set before calling VideoURI or SetVideoPath.
      If you don't want any options, either don't call this method or pass null as value.
      Options must be passed on in a list as strings.
      Some options that are available:
      --aout=opensles
      --audio-time-stretch 'time stretching
      -vvv 'verbosity
      example:
      Dim OptionList As List
      OptionList.Initialize
      OptionList.Add("--aout=opensles")
      OptionList.Add("--audio-time-stretch")
      VLCVideoView1.SetVlcOptions(OptionList)
    • Start
      Starts or resumes playing.
    • StopPlayback
      Stops the playback.
    • currentVideoSize As Int
      Returns current video-size.
    • getMaxVolume (channel As Int) As Int
      gets Max Volume for device and type of audio
      based on AudioManager
    • getVolume (channel As Int) As Int
      gets current Volume level
      based on AudioManager
    • resizeVideo
      Resizes the video.
    • setMute (channel As Int, state As Boolean)
      Enable or disable mute-status
      true = ON, false = off
      based on AudioManager
    • setVolume (channel As Int, level As Int)
      sets Volume level. You need to get Max volume
      first to know the range available
      Range: zero(0) to MaxVolume
      based on AudioManager
    Permissions:
    • android.permission.INTERNET
    • android.permission.WAKE_LOCK
    Properties:
    • AudioTrack As Int [write only]
      Sets selected AudioTrack.
    • AudioTrackDesc As MyMap [read only]
      Returns a description of the AudioTracks.
      Values returned are: id and name
      id is used for setting which AudioTrack to play.
      The values are available when the video is playing.
      Assign the map to a map of your own.
      example:
      Dim audiotracks As Map = VLCVideoView1.AudioTrackDesc
    • AudioTracksCount As Int [read only]
      Returns number of AudioTracks.
    • Background As Drawable
    • Color As Int [write only]
    • CurrentPosition As Long [read only]
      Returns the current playback position in units of milliseconds.
    • Duration As Long [read only]
      Returns the video duration in milliseconds.
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • Position As Long
      Gets or sets the playing position (in milliseconds).
    • SubtitleLocalSource As String [write only]
      Sets a local subtitle source (.srt).
      example:
      SetVideoPath(File.Combine(File.DirRootExternal, "sub.srt"))
    • SubtitleTrack As Int [write only]
      Sets selected SubtitleTrack.
    • SubtitlesCount As Int [read only]
      Returns number of Subtitles.
    • SubtitlesDesc As MyMap [read only]
      Returns a description of the SubtitleTracks.
      Values returned are: id and name
      id is used for setting which SubtitleTrack to show.
      The values are available when the video is playing.
      Assign the map to a map of your own.
      example:
      Dim Subtitletracks As Map = VLCVideoView1.SubtitlesDesc
    • SubtitlesSurfaceView As ViewGroup [write only]
      Takes B4A panel (ViewGroup) and adds a SurfaceView
      to use as a panel for the subtitles.
      example:
      in Globals
      Dim subpanel As Panel 'for subtitles
      in Activity_Create
      subpanel.Initialize("subpanel")
      mypanel.AddView(VLCVideoview1,0, 0, 100%x, 100%y)
      mypanel.AddView(subpanel, 0, 0, 100%x, 100%y-20dip)
      VLCVideoview1.SubtitlesSurfaceView = subpanel
      VLCVideoview1.SubtitleLocalSource = File.Combine(File.DirRootExternal,"bb.srt")
    • Tag As Object
    • Top As Int
    • VideoSize As Int [write only]
      Sets Video size. Available values are:
      SURFACE_BEST_FIT = 0, SURFACE_FIT_HORIZONTAL = 1,
      SURFACE_FIT_VERTICAL = 2, SURFACE_FILL = 3,
      SURFACE_16_9 = 4, SURFACE_4_3 = 5,
      SURFACE_ORIGINAL = 6
      Default video size is SURFACE_BEST_FIT = 0
    • VideoURI As String [write only]
      Sets the URI stream of the video to play.
      example:
      VideoURI = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
      VideoURI = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
    • Visible As Boolean
    • Volume As Int [write only]
      Sets volume as integer
      This is the native volume control and is not based on AudioManager.
      This control has been reported to have problems. If you have problems
      you can use the other volume methods available based on AudioManager.
      Range should be 0-200.
      At 40 it seems to become hearable, above 100 it might cause distortion
    • Width As Int
 
Last edited:

susu

Well-Known Member
Licensed User
I always love video libs. Thank you Mikael.
 

DonManfred

Expert
Licensed User
Nine one. Thank you for sharing!
 

Rick Harris

Well-Known Member
Licensed User
vlcb4a - a B4A wrapper of VLC (Android)

This is an experimental release (Work in progress) attempting to wrap VLC for Android (or parts of it) and its underlying libraries (so-files) and the most important properties/methods of VLC in order to provide a VideoView-object for B4A.

What is VLC for Android?
VLC media player is a free and open source cross-platform multimedia player that plays most multimedia files as well as discs, devices, and network streaming protocols. This is the port of VLC media player to the Android™ platform. VLC for Android can play any video and audio files, as well as network streams and DVD ISOs, like the desktop version of VLC.
VLC for Android is a full audio player, with a complete database, an equalizer and filters, playing all weird audio formats.

The official VLC Android app can be found here:
https://play.google.com/store/apps/details?id=org.videolan.vlc

As mentioned above, the vlcb4a wrapper is not the full Android VLC app but more an attempt to wrap the underlying libraries (so-files) and the most important properties/methods of VLC (its engine) to provide a VideoView-object for B4A. Please be aware that currently the source-code of just the VideoPlayerActivity in the original VLC Android app consists of nearly 3200 lines (with loads of methods/properties) and as you surely can understand, there is no way I will be able to wrap the same and all the functionality/features present in the VLC Android app. Apparently they are/were planning to write a VideoView-class but there has not been any development on this class for ages and all there is, is a "skeleton-class" of no use since even the related MediaPlayer-class is incomplete.

This wrapper provides its own VideoView class which I have compiled into the original (and latest) VLC-sources based on SDK 3. The SDK can be found here: https://code.videolan.org/videolan/vlc-android/tree/master

Currently lots of stuff are missing (subtitles, audio-tracks, setting aspect ratio etc) and the wrapper only includes the most essential methods and properties needed. There are very few examples available based on the latest SDK so the implementation of new features will probably take quite some time and will require lots of testing. Thus, this is "Work in progress" and ETAs cannot be given.

In this moment, I have only compiled the so-sources for ARM but I could compile them also for other platforms such as ARM64, X86 and MIPS. Might add them later though.

The minimum SDK version is 7 (although I have not tried it if works on such old devices).

The following summary presents the current status of the wrapper:

vlcb4a
Comment:
The VLCwrapper wraps some basic features of VLC (SDK 3) for Android.
It enables you to embed VLC into your application. This is an experimental beta.
Author: moster67 Mikael Osterhed
Version: 0.3
  • VLCVideoView
    Events:
    • onCompleted
    • onError
    • onPrepared
    Methods:
    • BringToFront
    • CanSeekBackward As Boolean
      Verifies if the media can seek backward.
    • CanSeekForward As Boolean
      Verifies if the media can seek forward.
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • IsPlaying As Boolean
      Tests whether the video is currently playing.
    • Pause
      Pauses the playback.
    • RemoveView
    • RequestFocus As Boolean
    • Resume
      Resumes the playback.
    • SeekTo (Milliseconds As Int)
      Seeks to specified time position. Parameters: Milliseconds - the offset in milliseconds from the start to seek to.
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (Top As Int, Left As Int, Width As Int, Height As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVideoPath (VideoPath As String)
      Set the local file path of the video to play.
      example:
      SetVideoPath(File.Combine(File.DirRootExternal, "test_video.mp4"))
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • Start
      Starts or resumes playing.
    • StopPlayback
      Stops the playback.
    Permissions:
    • android.permission.INTERNET
    • android.permission.WAKE_LOCK
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • CurrentPosition As Long [read only]
      Returns the current playback position in units of milliseconds.
    • Duration As Long [read only]
      Returns the video duration in milliseconds.
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Tag As Object
    • Top As Int
    • VideoURI As String [write only]
      Set the URI of the video to play.
      example:
      VideoURI = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
      VideoURI = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
    • Visible As Boolean
    • Width As Int

You can download the wrapper from here:
https://dl.dropboxusercontent.com/u/47808624/VLCb4a.zip

You will also need to add the attached "classes.jar" library to the same folder . Remember to refresh your library-pane in B4A.

I also attach a sample-project (vlcsample.zip) for B4A.

Note: use a real device

If and when the wrapper has reached a stage when I think it is rather mature, I will publish my sources (which I believe is requested according to the VideoLAN license).

Good luck!
Wow! Well done. I have just tried your experimetal demo and it works fine. Just in time as well because the Vitamio player that I am currently using will be blocked by Google this month due to a vulnerability.
One urgent request: Please make the CurrentPosition property writeable (if possible). In my current "TV and Video" app I make my users swipe horizontally to go fast forward and fast back (skip in increments of 1 minute).
 

Rick Harris

Well-Known Member
Licensed User
There is no ETA for next update. I am working on this project during my free time.
In the meantime, my other library wrapping FFmpeg ougth to work just fine as an alternative for Vitamio:
https://www.b4x.com/android/forum/t...peg-library-for-b4a-decoding-streaming.44476/

Thank you for the tip regarding FFmpeg. Today I have converter my entire Vitamio project to your VLCplayer.
However, I have a significant problem when loading a the next videoURL (from a listview) after a video has started to play. I cannot stop the video from playing nor load the new videoURL and the app freezes completely (without reporting any errors).
 

moster67

Expert
Licensed User
Thanks for the report. I will look into into when I've got a moment.
I wrote clearly that it is an "experimental beta" and "Work in Progress" in my description because in this moment it is far from being finished and probably not suitable for production. Try, as I wrote, my ffmpeg-wrapper instead until this library gets more stable.
 

Rick Harris

Well-Known Member
Licensed User
Thanks for the report. I will look into into when I've got a moment.
I wrote clearly that it is an "experimental beta" and "Work in Progress" in my description because in this moment it is far from being finished and probably not suitable for production. Try, as I wrote, my ffmpeg-wrapper instead until this library gets more stable.
Here is a test project that I made based on your VLC example. It crashes as soon as Button1 is pressed:
B4X:
Sub Process_Globals
End Sub

Sub Globals
    Dim VLCVideoview1 As VLCVideoView
    Dim Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    VLCVideoview1.Initialize("VLCVideoview1")
    Button1.Initialize("Button1")
    Button1.Text="LOAD"
    Activity.AddView(VLCVideoview1, 0, 0, 100%x, 100%y)
    Activity.AddView(Button1, 5%x, 5%y, 15%x, 15%y)
  
    'play local video file
    'VLCVideoview1.SetVideoPath(File.Combine(File.DirRootExternal, "z.mkv"))

    'play video in streaming
    'VLCVideoview1.VideoURI = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
    'VLCVideoview1.VideoURI = "http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
    'VLCVideoview1.VideoURI = "http://scheef.mine.nu:80/live/sys6.stream/playlist.m3u8"
    VLCVideoview1.VideoURI = "http://l2cmd9327656400055356a7e000000.3bb8f6f16a0677ff.smoote1l.npostreaming.nl/d/live/npo/tvlive/ned1/ned1.isml/ned1.m3u8"
  
    VLCVideoview1.RequestFocus
    VLCVideoview1.Start
  
    Button1.BringToFront
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
    If KeyCode = KeyCodes.KEYCODE_BACK Then
       Select Msgbox2("Quit?","My App","Yes","","No",Null)
        Case DialogResponse.POSITIVE
            VLCVideoview1.StopPlayback
          Activity.Finish
          ExitApplication
        Case Else
          Return True
        End Select
    End If
End Sub

Sub Button1_click
    Dim TVstream1 As String
    TVstream1="http://l2cmd5e06780750055356c7f000000.0ba6823bc9259f08.smoote1d.npostreaming.nl/d/live/npo/thematv/journaal24/journaal24.isml/journaal24-audio=128000-video=900000.m3u8"
  
    ProgressDialogShow2("Loading...", True)
    VLCVideoview1.StopPlayback
    VLCVideoview1.VideoURI = TVstream1
    VLCVideoview1.RequestFocus
    VLCVideoview1.Start
End Sub

Sub VLCVideoview1_onPrepared
    Log("VIDEO WAS PREPARED - IS IT PLAYING? " & VLCVideoview1.IsPlaying & " DURATION: " & VLCVideoview1.Duration)
End Sub

Sub VLCVideoview1_onError
    Log("SOME ERROR OCCURRED")
End Sub

Sub VLCVideoview1_onCompleted
    Log("VIDEO WAS COMPLETED")
End Sub
 

Rick Harris

Well-Known Member
Licensed User
Update:
This code does work! However, having to remove the VLCvideoview and then re-adding it is a bit too drastic, I believe.
B4X:
Sub Button1_click
    Dim TVstream1 As String
    TVstream1="http://l2cmd5e06780750055356c7f000000.0ba6823bc9259f08.smoote1d.npostreaming.nl/d/live/npo/thematv/journaal24/journaal24.isml/journaal24-audio=128000-video=900000.m3u8"
   
    VLCVideoview1.StopPlayback
    VLCVideoview1.RemoveView
    VLCVideoview1.Initialize("VLCVideoview1")   
    Activity.AddView(VLCVideoview1, 0, 0, 100%x, 100%y)
   
    ProgressDialogShow2("Loading...", True)
    VLCVideoview1.VideoURI = TVstream1
    VLCVideoview1.RequestFocus
    VLCVideoview1.Start
End Sub
 

moster67

Expert
Licensed User
Thanks, yes I guess there is work to do. Keep the bug reports coming :)

I normally add a panel and then attach the VideoView to the panel. Find it easier.

One urgent request: Please make the CurrentPosition property writeable (if possible). In my current "TV and Video" app I make my users swipe horizontally to go fast forward and fast back (skip in increments of 1 minute).

To "fast forward" the streaming, you can do something similar as this code (here I am using a panel longclick event just for testing) and vice-versa going backwards:

B4X:
Sub mypanel_LongClick
    If VLCVideoview1.CanSeekForward Then
        dim curpos as long = VLCVideoview1.CurrentPosition
        VLCVideoview1.SeekTo(curpos + 140000) '140000 is your value how much you want to fast forward
    End if

End Sub

This should work with local files. I have not tested this with remote-streaming...
Edit: now tried seeking with remote streaming and it worked (used the BigBuckBunny link)

Note that I wrote this from memory. Cannot check in this moment on a computer but it should work
 
Last edited:

Rick Harris

Well-Known Member
Licensed User
Thanks, yes I guess there is work to do. Keep the bug reports coming :)

I normally add a panel and then attach the VideoView to the panel. Find it easier.



To "fast forward" the streaming, you can do something similar as this code (here I am using a panel longclick event just for testing) and vice-versa going backwards:

B4X:
Sub mypanel_LongClick
    dim curpos as long = VLCVideoview1.CurrentPosition
    VLCVideoview1.SeekTo(curpos + 140000) '140000 is your value how much you want to fast forward

End Sub

This should work with local files. I have not tested this with remote-streaming...

Edit: Note that I wrote this in memory. Cannot check in this moment on a computer but it should work
Thank you. Sorry, I forgot to mention that I already found the "SeekTo" property. I have not yet tested it because so far I have been testing with "live" Dutch TV streams.
The video quality of the VLC player is better than Vitamio: Video's load much faster and playback is not jerky (Vitamio is very jerky). But VLC freezes sooner than Vitamio when buffering is not fast enough.
My impression is that my entire app totally freezes while VLC is buffering. The earlier discussed bug is probably related to this problem. Maybe adding some "DoEvents" here or there might help?
Most parts of my app are now working, so you are close to a good start! It was rather easy to do because a lot of your work is similar to Warwound's Vitamio library.
It would be nice if your library could report the width and height dimensions of the loaded videofile and videostream.
 

moster67

Expert
Licensed User
vlcb4a is different from Vitamio (for which I wrote the first wrapper back in 2012). The library for Vitamio is wrapping a VideoView-class provided by Vitamio (similar to the standard VideoView-class of Android) which is well tested and for the most bug-free. The same is true for my FFmpeg-wrapper.
With vlcb4a, I am writing the underlying VideoView class myself (there is no one available for VLC) and trying to create a VideoView-object for B4A from scratch. Therefore it will surely be prone to errors (at least in this initial phase).

Some suggestions/considerations for your app:
1) I doubt if I would use vlcb4a in production just yet...
2) In this moment, I have only furnished/compiled native so-libraries for ARM and thus (your) users with devices based on other platforms such as ARM64, X86 and MIPS will not be able to install an app using vlcb4a.
3) As I said before, I am doing this on my free time and no ETA can be given and only time will tell when there will be a stable and a more feature-rich version.
 

Rick Harris

Well-Known Member
Licensed User
vlcb4a is different from Vitamio (for which I wrote the first wrapper back in 2012). The library for Vitamio is wrapping a VideoView-class provided by Vitamio (similar to the standard VideoView-class of Android) which is well tested and for the most bug-free. The same is true for my FFmpeg-wrapper.
With vlcb4a, I am writing the underlying VideoView class myself (there is no one available for VLC) and trying to create a VideoView-object for B4A from scratch. Therefore it will surely be prone to errors (at least in this initial phase).

Some suggestions/considerations for your app:
1) I doubt if I would use vlcb4a in production just yet...
2) In this moment, I have only furnished/compiled native so-libraries for ARM and thus (your) users with devices based on other platforms such as ARM64, X86 and MIPS will not be able to install an app using vlcb4a.
3) As I said before, I am doing this on my free time and no ETA can be given and only time will tell when there will be a stable and a more feature-rich version.
Indeed there is still some work to be done. Very clever of you how you are able to develop this new VLC library!
Just to inform you that I have now three versions of my app:
1. Vitamio based
2. FFMpeg based
3. VLC based.
A test has revealed that Vitamio plays more types of files than FFMpeg. Example: Vitamio and VLC will play this stream: http://streaming3.webcam.nl/amersfoort1/amersfoort1.stream/playlist.m3u8 (a Dutch Zoo), but FFMpeg won't.
My conclusion is that my hope is now that your VLC library will be stable enough soon, because succeeding Vitamio by FFMpeg does not seem to be a good idea. I need a successor to Vitamio because Google has announced that they will block Vitamio-4 based apps from 16 March onwards due to a vulnarability.
 

Rick Harris

Well-Known Member
Licensed User
That is probably just a codec-issue and normally resolved by compiling new native so-libraries as I mentioned in the FFmpeg-thread.
Sorry but I have idea how to do that and cannot find anything about it (unless it is hidden somewhere in the long forum discussion that follows the FFMpeg description). I assume new ijkmediaplayer\res files need to be compiled to which the "additionalres" statements need to refer? If so, it would be nice if you would add the updated zip file to your library description (in thread #1). Thank you in advance.
 

moster67

Expert
Licensed User
This is better discussed in the FFmpeg-thread. However, if the problem is related to codec in the FFmpeg-wrapper, then just the build-configuration needs to be modified so new updated so-files can be compiled and replaced as explained in my first post in said thread. The wrapper-library rests in place as it is. This was made on purpose so anyone who wishes to add codecs etc can do it by their own and no one depends upon me.
 

Rick Harris

Well-Known Member
Licensed User
Thanks for the report. I will look into into when I've got a moment.
I wrote clearly that it is an "experimental beta" and "Work in Progress" in my description because in this moment it is far from being finished and probably not suitable for production. Try, as I wrote, my ffmpeg-wrapper instead until this library gets more stable.
In the FFMpeg thread you write: "You can then add the missing containers, demuxers, muxers and codec by building and recompiling the FFmpeg-libraries yourself". I have no idea how to do that. Some more guidance would be appreciated.
 
Top