B4A Library VitamioBundle

holdemadvantage

Active Member
Licensed User
Longtime User
Hi , thanks for this library, very interesting.
I try new lib 4.2.0 modified and with the attached example you can find here

Example works for online flv (both device samsung note III and sansung tablet GT-P5220) , for m3u8 online it works on note 3 but not on tablet (do you imagine why?)

The thing that have stopped me was the big lags during streaming

i try to VitamioVideoView1.SetVideoQuality(VitamioVideoView1.VIDEO_QUALITY_LOW)
and to
VitamioVideoView1.SetBufferSize(10000) 'increase buffering size before starts

but with no luck, still lags a lot
Any suggestions?

Tnx in advance
 

wahyuway

Member
Licensed User
Longtime User
Hi Martin,
There is no Vitamio MediaPlayer?
I cant play this stream rtmp://cdn-edge.sim-indonesia.com:443/radio

Oh, and could you update vitamio plugin to the latest version?
Tks
 

Johnmcenroy

Active Member
Licensed User
Longtime User
Hi Martin
Thank you very much for library.
It's a pity , but I have some problems. Video doesn't seem to resize to its view.It doesn't scale.
As you wrote here :
http://www.b4x.com/android/forum/th...n-and-on-top-on-ouya.31034/page-3#post-184486

There are some variants but I can't understand how to implement this in B4A through XML Layout Builder library:
http://stackoverflow.com/questions/17202603/vitamio-full-screen-videoview
http://stackoverflow.com/questions/16581273/vitamio-video-center-issue
https://github.com/yixia/VitamioBundle/tree/master/vitamio-sample/res/layout
https://bbs.vitamio.org/topics/43?locale=en

Update:
Solved this problem in this way
1. I have created an XML layout for Vitamio videoview:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
  
    <io.vov.vitamio.widget.VideoView
        android:id="@+id/surface_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
      
</RelativeLayout>
2. Then I have loaded this layout to panel:
B4X:
pnlLayout.Initialize("")

    Activity.AddView(pnlLayout,150dip,0,100%x-150dip,100%y)
    xmlLayout.LoadXmlLayout(pnlLayout,"vitamio_layout")

    VitamioVideoView1.Initialize("VitamioVideoView1")
    VitamioVideoView1 = xmlLayout.GetView ("surface_view")

So video occupy only the size of panel , but you must preserve aspect ratio of video by checking its width and height.

Thanks
John
 
Last edited:

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi All,
Can this Library also be used with B4J???
 

Swissmade

Well-Known Member
Licensed User
Longtime User
I don't know - i'll have to leave you to research the b4j options...

Martin.
Search for this already for a long time and found nothing what can be used with B4J.
Anyway thanks Martin.
 

moster67

Expert
Licensed User
Longtime User
Have you checked out VLC (Video on Lan)? Maybe it is possible to use VLC within B4J?

Many years ago I wrote a program in VB.Net where I used VLC as an object and embedded it within the program. I guess this would be possible with a Java-program as well although the procedure how to do it with B4J I don't know. Just an idea.

Edit: check the links at the bottom of this page:
https://wiki.videolan.org/LibVLC/
 

Swissmade

Well-Known Member
Licensed User
Longtime User

Yes I have Check this but this is not working nice and smoothly.
If I Really have the time to spend some weeks I will find or write this by my one.
At the moment if possible I need the easy way find a library can be used for B4J.
My need is to stream IP-Camera's with MJpeg and H264.
 

moster67

Expert
Licensed User
Longtime User
My need is to stream IP-Camera's with MJpeg and H264.

Vitamio cannot stream nor transcode. Vitamio is only for displaying an incoming stream (not for broadcasting/transmitting it). If you want to stream your source (IP-camera), then I guess I believe you need a library using for instance FFMPEG which will permit you to broadcast (or transcode) a stream. VLC is one of the solutions which comes into mind. There are other FFMPEG-products as well (google for it) however if they support Java I don't know.
 

Swissmade

Well-Known Member
Licensed User
Longtime User
I know FFMPEG good library and I use this in Visual Studio to convert streams to Images.
But for B4J we have a problem. Some while ago I have play with VLC and the Library for B4J but the result was disappointed.
 

moster67

Expert
Licensed User
Longtime User
I know FFMPEG good library and I use this in Visual Studio to convert streams to Images.
But for B4J we have a problem. Some while ago I have play with VLC and the Library for B4J but the result was disappointed.

Well, then I really don't know. In either case, I don't think Vitamio is what you are looking for as I explained in my previous post so I think it is better you open a new thread for your query in order to keep this thread focused on Vitamio.

If something comes into my mind, I will let you know.
 

Swissmade

Well-Known Member
Licensed User
Longtime User

Thanks
 

merlin2049er

Well-Known Member
Licensed User
Longtime User
Hmm, can you add the vitamio videoview in the designer , instead of using activity.addview(etc...) in code.
 

merlin2049er

Well-Known Member
Licensed User
Longtime User


Hmm, great.

I wanted my videoview to be @ 90%x & 90%y;

I had in my code...
B4X:
VitamioVideoView1.Initialize("VitamioVideoView1")
Activity.AddView(VitamioVideoView1, 0%x, 0%y,  90%x, 90%y)

But it just ignores it, and takes up the full screen. Where do you put the xml file?
 

Johnmcenroy

Active Member
Licensed User
Longtime User

Hi Merlin
See XML Layout Builder library for this

Regards
John
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…