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
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).
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
Take a look at what version 4 offers: https://github.com/yixia/VitamioBundle:
Looks like version 4 no longer has an OnSubtitleUpdateListener interface, the rest of version 3 seems to be supported in version 4.
- The latest FFmpeg 2.0 git version, which should fix most playback issues, or bring some issues.
- Support most FFmpeg AVOptions, which enables custom HTTP headers support.
- Support more hardwares, e.g. X86 or MIPS.
- Improve streaming, especially support adaptive bitrate streaming, you need open manually.
- OpenSSL included, so some SSL related protocols, such as https, tls, rtmps, rtmpts, are supported.
- Playback speed control from 0.5x to 2.0x.
- Audio amplify to 2x volume.
- Improved subtitle support, including external bitmap subtitles.
- Cache online video to local storage and can be reused until you delete the cache file.
- More MediaPlayer API, e.g. getMetadata, getVideoTrack.
- The full Java code is open to all developers, modify and contribute is welcome.
- Support RGBA_8888 rendering, spport switching RGB_565 or RGBA_8888 to video rendering.
- Enhance the hardware decoding in Android 16+.
- Support ARMV6 CPU, may have some bugs.
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.
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.
/**
* Set the file-path of an external timed text.
*
* @param path must be a local file
*/
public native void addTimedTextSource(String path);
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?
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.Take a look at what version 4 offers: https://github.com/yixia/VitamioBundle:
- The latest FFmpeg 2.0 git version, which should fix most playback issues, or bring some issues.
- Support most FFmpeg AVOptions, which enables custom HTTP headers support.
- Support more hardwares, e.g. X86 or MIPS.
- Improve streaming, especially support adaptive bitrate streaming, you need open manually.
So there's the answer path must be a local file.
VitamioVideoView1.AddTimedTextSource(File.Combine(File.DirAsset, "subtitle.srt"))
VitamioVideoView1.SetTimedTextShown(True)
@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.
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.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?