Video View Fullscreen And On Top On Ouya

RedSun

Member
Licensed User
Longtime User
Is there any way to force the video view to not be fullscreen and on top?

I am creating a program on the Ouya and I want a controls overlay on top of the video playback, but the video always goes fullscreen and forces itself on top of everything else, even toast messages do not appear.

I have tried the videoviewextras, and vvelib libraries. The aspect ratio could be changed, but it still forced its way into fullscreen.

It works if I use vitamob4a library, but I would like for users not to have to download anything extra if possible as I would think that may put a lot of people off.

I am kind of thinking this may be an Ouya specific issue.

New to all this, so I am probably missing something obvious, but any help would be appreciated.

B4X:
vv.MediaControllerEnabled=False
Activity.AddView(Panel3, 0dip, 0dip, Activity.width, Activity.height)
Panel3.AddView(vv, 0dip, 0dip, Panel3.width, Panel3.height)
vv.LoadVideo("http", "videofile location")
vv.Play
Activity.AddView(Panel2, 400dip, 400dip, 60dip, 60dip)
Panel2.AddView(ImageView3, 0dip, 0dip, 60dip, 60dip)
ImageView3.Bitmap = LoadBitmap(File.DirAssets, "ouya_o.png")
ImageView3.Gravity=Gravity.fill
Panel2.BringToFront
ImageView3.BringToFront
 

warwound

Expert
Licensed User
Longtime User
As far as I know, there is nothing you as a developer can change to improve the quality unless version 4 has something new to offer (maybe hardware-decoding).

Take a look at what version 4 offers: https://github.com/yixia/VitamioBundle:
  1. The latest FFmpeg 2.0 git version, which should fix most playback issues, or bring some issues.
  2. Support most FFmpeg AVOptions, which enables custom HTTP headers support.
  3. Support more hardwares, e.g. X86 or MIPS.
  4. Improve streaming, especially support adaptive bitrate streaming, you need open manually.
  5. OpenSSL included, so some SSL related protocols, such as https, tls, rtmps, rtmpts, are supported.
  6. Playback speed control from 0.5x to 2.0x.
  7. Audio amplify to 2x volume.
  8. Improved subtitle support, including external bitmap subtitles.
  9. Cache online video to local storage and can be reused until you delete the cache file.
  10. More MediaPlayer API, e.g. getMetadata, getVideoTrack.
  11. The full Java code is open to all developers, modify and contribute is welcome.
  12. Support RGBA_8888 rendering, spport switching RGB_565 or RGBA_8888 to video rendering.
  13. Enhance the hardware decoding in Android 16+.
  14. Support ARMV6 CPU, may have some bugs.
Looks like version 4 no longer has an OnSubtitleUpdateListener interface, the rest of version 3 seems to be supported in version 4.
And there looks to be a few (or many) new classes in version 4 that might make nice additions to the b4a library.

Upgrading the version 3 b4a library to version 4 isn't just a case of swapping the native android java library versions - there's some work to be done on some other classes too and then some tests to be made.
I'm planning to work on this today so hopefully will have a working version 4 library we can compare to version 3 by tomorrow.

Martin.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Thanks for that Martin. I haven't understood if everything you listed has already been implemented in version 4 at the time of writing but the base should be the same and you could probably add (wrap) upcoming features later on quite easily.

I for sure is ready for another donation if you can make this happen :)
 
Upvote 0

RedSun

Member
Licensed User
Longtime User
Yes it does if I remember correctly. That's why I said to try toggling quality during playback.

Something like this (here I am using an Action menu - pls disregard):

B4X:
Dim action As AHActionItem
    action = ac2.getActionItem(Position)
    DoEvents

    If action.ActionId = 1 Then
        vv.setVideoQuality(16) 'High
        ToastMessageShow("Video Quality is now High.", False)
    Else If action.ActionId = 2 Then
        vv.setVideoQuality(0) 'Medium
        ToastMessageShow("Video Quality is now Medium.", False)
    Else If action.ActionId = 3 Then
        vv.setVideoQuality( - 16) 'Low
        ToastMessageShow("Video Quality is now Low.", False)
    End If

Thanks will give that a try, will let you know.

Take a look at what version 4 offers: https://github.com/yixia/VitamioBundle:
  1. The latest FFmpeg 2.0 git version, which should fix most playback issues, or bring some issues.
  2. Support most FFmpeg AVOptions, which enables custom HTTP headers support.
  3. Support more hardwares, e.g. X86 or MIPS.
  4. Improve streaming, especially support adaptive bitrate streaming, you need open manually.
  5. OpenSSL included, so some SSL related protocols, such as https, tls, rtmps, rtmpts, are supported.
  6. Playback speed control from 0.5x to 2.0x.
  7. Audio amplify to 2x volume.
  8. Improved subtitle support, including external bitmap subtitles.
  9. Cache online video to local storage and can be reused until you delete the cache file.
  10. More MediaPlayer API, e.g. getMetadata, getVideoTrack.
  11. The full Java code is open to all developers, modify and contribute is welcome.
  12. Support RGBA_8888 rendering, spport switching RGB_565 or RGBA_8888 to video rendering.
  13. Enhance the hardware decoding in Android 16+.
  14. Support ARMV6 CPU, may have some bugs.
Looks like version 4 no longer has an OnSubtitleUpdateListener interface, the rest of version 3 seems to be supported in version 4.
And there looks to be a few (or many) new classes in version 4 that might make nice additions to the b4a library.

Upgrading the version 3 b4a library to version 4 isn't just a case of swapping the native android java library versions - there's some work to be done on some other classes too and then some tests to be made.
I'm planning to work on this today so hopefully will have a working version 4 library we can compare to version 3 by tomorrow.

Martin.

That looks good Martin, if you need any help testing let me know.

Still need to test a local storage based file.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Right, i have updated the library so it now wraps Vitamio version 4 and is ready for testing.

I just tried a test using RedSun's video link from post #17 in this thread.
On my 7" Galaxy Tab2 it looked pretty impressive - certainly no playback problems and in my opinion the quality was very good too.
(I must admit i didn't have time to view the same video using the Vitamio version 3 library).

Anyway let's see what results other get on different devices...

First you'll need version 4 of the b4a Vitamio library: SEE POST #26 FOR LINK.

Then the example b4a project: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_alpha_example_project.zip, 7.44MBs in size.

The b4a project contains all the res folder contents that are also in the library download - that's why it's a massive 7.44MBs in size.

There's a few syntax changes to note from version 3, but as there's only a handful of b4a users that had access to version 3 that shouldn't be a problem.

The main changes are with the methods that handled sub-titles, version 4 of Vitamio calls sub-titles timed text.
moster might note i've changed the VitamioVideoView GetLayout method to GetVideoLayout so it better matches it's corresponding SetVideoLayout method.
Finally VitamioVideoView has a new method SetVideoChroma(Chroma As Int).

So if you'd like to give it a test and post your results, once we're all happy with it i'll properly release it to all forum members.

Martin.
 
Last edited:
Upvote 0

RedSun

Member
Licensed User
Longtime User
Right, i have updated the library so it now wraps Vitamio version 4 and is ready for testing.

I just tried a test using RedSun's video link from post #17 in this thread.
On my 7" Galaxy Tab2 it looked pretty impressive - certainly no playback problems and in my opinion the quality was very good too.
(I must admit i didn't have time to view the same video using the Vitamio version 3 library).

Anyway let's see what results other get on different devices...

First you'll need version 4 of the b4a Vitamio library: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_alpha_library_files.zip, 8.55MBs in size.

Then the example b4a project: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_alpha_example_project.zip, 7.44MBs in size.

The b4a project contains all the res folder contents that are also in the library download - that's why it's a massive 7.44MBs in size.

There's a few syntax changes to note from version 3, but as there's only a handful of b4a users that had access to version 3 that shouldn't be a problem.

The main changes are with the methods that handled sub-titles, version 4 of Vitamio calls sub-titles timed text.
moster might note i've changed the VitamioVideoView GetLayout method to GetVideoLayout so it better matches it's corresponding SetVideoLayout method.
Finally VitamioVideoView has a new method SetVideoChroma(Chroma As Int).

So if you'd like to give it a test and post your results, once we're all happy with it i'll properly release it to all forum members.

Martin.


Hi Martin,

That looks great. Just tested the V4 project on my Note a few times and the results are a huge improvement! :D

-No stuttering of video or audio.
-From what I could see the audio stayed in sync.
-The gradient banding is hugely improved.

I will test it on my Ouya, along with a few other devices and get back to you.

Excellent work, you have my thanks.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Great - look like version 4 will be noticeably better than version 3.

I've been busy updating the version 4 library.
  • The OutlineTextView has now been implemented so that'll enable someone (?) to test the VitamioMediaController SetInfoView (OutlineTextView1 As OutlineTextView) method.
  • VitamioVideoView now has a GetMediaPlayer As VitamioMediaPlayer method which: Returns the underlying MediaPlayer used by the VitamioVideoView. The VitamioMediaPlayer has various methods which may be useful.
  • The new VitamioMediaPlayer has methods that allow you to: get the current frame as a bitmap, enable/disable interlacing, enable/disable adaptive stream support and also set the playback speed.
  • The VitamioMediaPlayer also has a method GetTrackInfo As VitamioTrackInfo[] which returns an array of VitamioTrackInfo objects - presumably giving you detailed info about the tracks being played.
  • Lastly i have added some more of the class constants in VitamioVideoView.

Most of these updates are untested - i'll upload the new version and make time to play with the new methods later.
Updated library files available here: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_library_files_20130725.zip.
Demo b4a project link is in my previous post.

Martin.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
And here for everyone's information is the current VitamioBundle4 library reference:

VitamioBundle4
Comment:
The VitamioBundle wraps version 4.0 of the Android Vitamio multimedia framework.
It enables you to fully embed Vitamio into your application.
There is no longer a requirement for you application user to install a separate Vitamio plug-in from the Play Store.
Author: Martin Pearman / Mikael Osterhed
Version: 4
  • OutlineTextView
    Methods:
    • BringToFront
    • Initialize
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetShadowLayer (Radius As Float, DX As Float, DY As Float, Color As Int)
    • SetText (Text As String)
    • SetTextColor (Color As Int)
    • SetTextSize (Size As Float)
    • SetTypeface (Typeface1 As Typeface)
    • SetTypeface2 (Typeface1 As Typeface, Style As Int)
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int
  • VitamioMediaController
    Events:
    • Hidden
    • Shown
    Methods:
    • BringToFront
    • Hide
    • 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
    • SetAnchorView (View1 As View)
      Set the View that acts as the anchor for the controller view.
      This can for example be a VideoView, or your Activity's main view.
    • SetAnimationStyle (AnimationStyle As Int)
      Set the animation style resource for this controller.
      If the controller is showing, calling this method will take effect only the next time the controller is shown.
      Set to -1 for the default animation, 0 for no animation, or a resource identifier for an explicit animation.
    • SetBackgroundImage (arg0 As Bitmap)
    • SetFileName (FileName As String)
      Set the content of the TextView that displays the filename of the playing video.
    • SetInfoView (OutlineTextView1 As OutlineTextView)
      Set the View to hold some information when interact with the MediaController.
      This method is currently of little use, the Vitamio OutlineTextView needs to be wrapped into this library in order to use this method.
      Wrapping OutlineTextView into this library is planned as a future update.
    • SetInstantSeeking (SeekWhenDragging As Boolean)
      Control the action when the seekbar is dragged by user.
      If True the media will seek periodically when the seekbar is dragged.
      Default value is True.
    • Show
      Show the controller on screen.
      It will go away automatically after a default 3000 milliseconds of inactivity.
    • Show2 (Timeout As Int)
      Show 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
    • Tag As Object
    • Visible As Boolean
  • VitamioVideoView
    Events:
    • BitmapSubtitleUpdated (Bitmap1() As Byte, Width As Int, Height As Int)
    • Buffering (Percent As Int)
    • Complete
    • Error (MEDIA_ERROR As Int) As Boolean
    • Info (What As Int, Extra As Int) As Boolean
    • Prepared
    • SeekComplete
    • TextSubtitleUpdated (SubText As String)
    Fields:
    • MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK As Int
    • MEDIA_ERROR_UNKNOWN As Int
    • VIDEO_LAYOUT_ORIGIN As Int
    • VIDEO_LAYOUT_SCALE As Int
    • VIDEO_LAYOUT_STRETCH As Int
    • VIDEO_LAYOUT_ZOOM As Int
    • VIDEO_QUALITY_HIGH As Int
    • VIDEO_QUALITY_LOW As Int
    • VIDEO_QUALITY_MEDIUM As Int
    Methods:
    • AddTimedTextSource (SubtitlePath As String)
    • BringToFront
    • CanPause As Boolean
    • CanSeekBackward As Boolean
      Verifies if the media can seek backward.
    • CanSeekForward As Boolean
      Verifies if the media can seek forward.
    • CheckVitamioLibs As Boolean
      Returns whether the core Vitamio library files have been installed.
      If these files have not been installed, this method returns False and launches the Vitamio installer Activity.
      Your Activity's Finish method will be called and your Activity restarted once the files are installed.
      The installer will typically only run when your installed application is first run.
    • GetAudioTrack As Int
      Get the index of the audio track playing or to be played.
    • GetAudioTrackMap (Encoding As String) As Map
      Get the audio tracks embedded in the movie.
      Parameters: Encoding - the encoding to format String, will detect it if Null.
      Returns: Map of track number and track name (e.g. 3, "English"), the Map will not be initialized if no audio tracks are present.
    • GetBufferPercentage As Int
      Returns currently used buffer percentage.
    • GetCurrentPosition As Long
      Returns the current playback position in units of milliseconds.
    • GetDuration As Long
      Returns the video duration in milliseconds.
    • GetMetaEncoding As String
      Get the encoding.
    • GetSubTrackMap (Encoding As String) As Map
      Get the subtitles embedded in the movie.
      Parameter: encoding - the encoding to format String, will detect it if Null.
      Returns: Map of track number and track name (e.g. 3, "English"), the Map will not be initialized if no subtitles are present.
    • GetTimedTextLocation As Int
      Returns:
      SUBTITLE_INTERNAL or 0 = the displayed subtitle is embedded in the movie.
      SUBTITLE_EXTERNAL or 1 = the displayed subtitle is part of an external file.
    • GetTimedTextPath As String
      Returns the file-path of the external subtitle in use.
      (Null if there is no external subtitle).
    • GetTimedTextTrack As Int
      Get the subtitle track number in playback.
    • GetVideoAspectRatio As Float
      Returns the aspect ratio of the video. Result: the aspect ratio of the video, or 0 if there is no video, or the width and height if not available.
    • GetVideoHeight As Int
      Returns the height of the video.
    • GetVideoLayout As Int
      Returns current VideoLayout.
      Layout parameters: VIDEO_LAYOUT_ORIGIN or 0, VIDEO_LAYOUT_SCALE or 1, VIDEO_LAYOUT_STRETCH or 2, VIDEO_LAYOUT_ZOOM or 3.
    • GetVideoWidth As Int
      Returns the width of the video.
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsBuffering As Boolean
      Checks whether the buffer is filled or not.
      Returns False if buffer is filled
    • IsInitialized As Boolean
    • IsPlaying As Boolean
      Tests whether the video is currently playing.
    • IsValid As Boolean
    • Pause
      Pauses the playback.
    • RemoveView
    • RequestFocus As Boolean
    • Resume
      Resumes the playback.
    • SeekTo (Milliseconds As Long)
      Seeks to specified time position.
      Parameters: Milliseconds - the offset in milliseconds from the start to seek to.
    • SendToBack
    • SetAudioTrack (AudioIndex As Int)
      Set the audio track to play, must an integer key from GetAudioTrackMap.
      Parameters: AudioIndex - the track number.
    • SetBackgroundImage (arg0 As Bitmap)
    • SetBufferSize (BufferSize As Int)
      Set the buffer size to fill before playback starts.
      Default is 1024KB.
    • SetLayout (Top As Int, Left As Int, Width As Int, Height As Int)
    • SetMediaController (MediaController1 As MediaController)
    • SetMetaEncoding (Encoding As String)
      Set the encoding that will be used to determine the metadata.
      Parameter: encoding - e.g. "UTF-8".
    • SetSubTrack (TrackId As Int)
      Set the subtitle track to display, must an integer key from GetSubTrackMap.
    • SetTimedTextEncoding (Encoding As String)
      Set the encoding that will be used.
      Parameter: Encoding - e.g. "UTF-8".
    • SetTimedTextShown (Shown As Boolean)
      Set show subtitle or not.
      Parameter: Shown - true to show subtitle
    • SetVideoChroma (Chroma As Int)
    • SetVideoLayout (VIDEO_LAYOUT As Int, AspectRatio As Float)
      Set the display options.
      Default is VIDEO_LAYOUT_SCALE or 1.
      Layout parameters: VIDEO_LAYOUT_ORIGIN or 0, VIDEO_LAYOUT_SCALE or 1, VIDEO_LAYOUT_STRETCH or 2, VIDEO_LAYOUT_ZOOM or 3.
      AspectRatio - video aspect ratio, will auto detect if 0.
    • SetVideoPath (VideoPath As String)
      Set the URI of the video to play.
      Pass either a URL or a file system path, an example: SetVideoPath(File.Combine(File.DirRootExternal, "test_video.mp4"))
    • SetVideoQuality (VIDEO_QUALITY As Int)
      Set the quality when playing video.
      If there is too much lag, try VIDEOQUALITY_LOW.
      If there is too much pixeling, set the value to VIDEOQUALITY_HIGH.
      Suggestion: use VIDEOQUALITY_HIGH or VIDEOQUALITY_MEDIUM (most modern android-devices can cope with higher settings).
      Default value is VIDEOQUALITY_LOW.
      Quality-Parameters: VIDEOQUALITY_HIGH or 16, VIDEOQUALITY_MEDIUM or 0, VIDEOQUALITY_LOW or -16
    • SetVideoUri (Uri1 As Uri)
      This method may be of limited use as the Uri object is not yet supported in B4A.
      The method is included though for future compatibility.
    • SetVolume (LeftVolume As Float, RightVolume As Float)
      Sets the volume.
      Unknown ranges to use (perhaps 1 to 15).
      Might be better to use Phone-library in B4A.
    • Start
      Starts or resumes playing.
    • StopPlayback
      Stops the playback.
    • Suspend
    Permissions:
    • android.permission.INTERNET
    • android.permission.WAKE_LOCK
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Position As Long
      Gets or sets the playing position (in milliseconds).
      Not an official Vitamio API method, used for compatibility with B4A's VideoView.
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int


Martin.
 
Last edited:
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
Hi Martin,

How to display external subtitile? I tried:

B4X:
VitamioVideoView1.AddTimedTextSource("http://www.abc.com/subtitle.srt")
VitamioVideoView1.SetTimedTextShown(True)

But it not work.
And thank you for big update!
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Hi susu.

To be honest i'm not at all sure how you'd use a sub-title file that is located online.
I'd have assumed that to be impossible and that you'd have to download the sub-title file and then use a local file based path in the AddTimedTextSource method...

I just took a look in the source code and the comments in the source state:

/**
* Set the file-path of an external timed text.
*
* @param path must be a local file
*/
public native void addTimedTextSource(String path);

So there's the answer path must be a local file.

Just out of interest did the version 3 VitamioBundle allow you to set a sub-title file using a URL instead of a local file system path?

Martin.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Yep, I think Martin is right. You may recall that I experimented a lot with the subtitles. There are two kinds of subtitles:
1) those you load externally (but local)
2) those that are embedded in a video (stream)

Even DLNA-software I think requires the subtitles to be local (if you use srt-format)
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Martin,

I haven't been able yet to test version 4. Did you by any chance include the possibility to handle the loading of the vitamio-library in case the cpu is not supported (such as MIPS)? We discussed this briefly with version 3 although I never had a chance to test it because my beta-tester never cambe back to me with the result :(
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
@moster67 Would you believe the class that i used in version 3 (io.vov.utils.CPU.java) to establish whether the device CPU supported Vitamio is not present in version 4!

Did the creators of Vitamio assume that they now support all (or most?) types of CPUs found on android devices so no longer included the class to enable us to check for support?

I've just uploaded the javadoc for the native library, you can find it here: http://android.martinpearman.co.uk/b4a/temp/vitamiobundle_4_doc/doc/.
There's lots of new classes but not one that looks like it detects CPU support.

If you have a browse and find such a class let me know.
And if you (or anyone else) see any other classes that might be useful and want them in the version 4 b4a library let me know that too.

Martin.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Did the creators of Vitamio assume that they now support all (or most?) types of CPUs found on android devices so no longer included the class to enable us to check for support?

Maybe your other post offers an explanation (see bold line below)

Take a look at what version 4 offers: https://github.com/yixia/VitamioBundle:
  1. The latest FFmpeg 2.0 git version, which should fix most playback issues, or bring some issues.
  2. Support most FFmpeg AVOptions, which enables custom HTTP headers support.
  3. Support more hardwares, e.g. X86 or MIPS.
  4. Improve streaming, especially support adaptive bitrate streaming, you need open manually.
If I find time this weekend, I will recompile one of my apps and use your latest wrapper of vitamio4 and send it off to a tester hoping he'll get back to me this time.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
So there's the answer path must be a local file.

Hi Martin,

I changed my code to
B4X:
VitamioVideoView1.AddTimedTextSource(File.Combine(File.DirAsset, "subtitle.srt"))
VitamioVideoView1.SetTimedTextShown(True)

but it didn't work too :(
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
@susu

Have you got this working yet?
Do you see anything relevant in the logs?

I'd guess that the sub-title file has to be on internal or external memory and not in File.DirAssets.

Can you copy the sub-title file from assets to say external memory and try again?

Martin.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
@susu

Have you got this working yet?
Do you see anything relevant in the logs?

I'd guess that the sub-title file has to be on internal or external memory and not in File.DirAssets.

Can you copy the sub-title file from assets to say external memory and try again?

Martin.

Hi Martin,

I tried to copy sub file to root external but it didn't work too.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Can you put together a simple project which includes a subtitle file and upload it.

I'll take a look.

Martin.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
Great - look like version 4 will be noticeably better than version 3.

I've been busy updating the version 4 library.
  • The OutlineTextView has now been implemented so that'll enable someone (?) to test the VitamioMediaController SetInfoView (OutlineTextView1 As OutlineTextView) method.
  • VitamioVideoView now has a GetMediaPlayer As VitamioMediaPlayer method which: Returns the underlying MediaPlayer used by the VitamioVideoView. The VitamioMediaPlayer has various methods which may be useful.
  • The new VitamioMediaPlayer has methods that allow you to: get the current frame as a bitmap, enable/disable interlacing, enable/disable adaptive stream support and also set the playback speed.
  • The VitamioMediaPlayer also has a method GetTrackInfo As VitamioTrackInfo[] which returns an array of VitamioTrackInfo objects - presumably giving you detailed info about the tracks being played.
  • Lastly i have added some more of the class constants in VitamioVideoView.

Most of these updates are untested - i'll upload the new version and make time to play with the new methods later.
Updated library files available here: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_library_files_20130725.zip.
Demo b4a project link is in my previous post.

Martin.
Great - look like version 4 will be noticeably better than version 3.

I've been busy updating the version 4 library.
  • The OutlineTextView has now been implemented so that'll enable someone (?) to test the VitamioMediaController SetInfoView (OutlineTextView1 As OutlineTextView) method.
  • VitamioVideoView now has a GetMediaPlayer As VitamioMediaPlayer method which: Returns the underlying MediaPlayer used by the VitamioVideoView. The VitamioMediaPlayer has various methods which may be useful.
  • The new VitamioMediaPlayer has methods that allow you to: get the current frame as a bitmap, enable/disable interlacing, enable/disable adaptive stream support and also set the playback speed.
  • The VitamioMediaPlayer also has a method GetTrackInfo As VitamioTrackInfo[] which returns an array of VitamioTrackInfo objects - presumably giving you detailed info about the tracks being played.
  • Lastly i have added some more of the class constants in VitamioVideoView.

Most of these updates are untested - i'll upload the new version and make time to play with the new methods later.
Updated library files available here: http://android.martinpearman.co.uk/b4a/temp/VitamioBundle4_library_files_20130725.zip.
Demo b4a project link is in my previous post.

Martin.



following with interest devolpments regarding vitamio bundle 4. i have used the wrapper 1.05 with a fair amount of success.
there are a few quirks (eg, not being able to play certain .flv files and crashing the app occasionally after stopping one video and switching to another one, but with no reliable way of recreating the crash at will.), but for a personal app, they are liveable. i did contact the vitamio forum about the
.flv issue but no response.

i recently updated my nexus 4.2x to 4.3. as soon as the home screen appears, i see a message:
"unfortunately vitamio has stopped". (version 3, with the 1.05 b4a wrapper.) i click ok and the message appears a second time. i click ok.
i had not seen this before the update. curious, i launch my app. the message appears again. i click ok. i proceed to my menu selections, choose a
video stream and watch the video without a problem. i choose another stream, no problem. i choose a radio stream, no problem. in any case, i mention this because, regardless of whether you have vitamio library 3 or 4, there may be some issue with android 4.3's interaction with vitamio. if you don't have 4.3, you just haven't seen it yet. but your users with 4.3 will. that vitamio appears to continue to work even though android says it has stopped may or may not be of consequence. it certainly is confusing for the user. as, indicated, i see the message with vitamio library 3. i can't see it with bundle 4 yet, for the following reason:

i downloaded bundle 4 library and sample and read (and followed) the instructions regarding the library. i then built the sample and copied it over to the emulator. when i run it, "unfortunately vitamio has stopped running appears", but this time for real. when i click ok, the app stops.
the log reports:
java.lang.UnsatisfiedLinkError: Native method not found: io.vov.vitamio.MediaPlayer.unloadOMX_native:()V
at io.vov.vitamio.MediaPlayer.unloadOMX_native(Native Method)
at io.vov.vitamio.MediaPlayer.<init>(MediaPlayer.java:204)
at io.vov.vitamio.MediaPlayer.<init>(MediaPlayer.java:174)
at io.vov.vitamio.widget.VideoView.openVideo(VideoView.java:389)
at io.vov.vitamio.widget.VideoView.access$21(VideoView.java:377)
at io.vov.vitamio.widget.VideoView$3.surfaceCreated(VideoView.java:150)
at android.view.SurfaceView.updateWindow(SurfaceView.java:543)
at android.view.SurfaceView.access$000(SurfaceView.java:81)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:169)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:671)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1820)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)


when i deploy the sample to my nexus, the same "unfortunately..." message appears.

i'm guessing the unsatisfied link error is at the heart of it. is there some linker setting needed on the java side for this to work? i assumed that, for a test, the sample would build and run out of the box. is there some back end step needed, eg in eclipse...? thanks
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
I see the same exception here with the last compiled version - i must have made a mistake when i last compiled it and failed to properly test it!

I'll be trying to fix it later this morning and post again.

Martin.
 
Upvote 0
Top