Gambas & VLC player

Post

Posted
Rating:
#1 (In Topic #1335)
Regular
Umbridge is in the usergroup ‘Regular’
Good afternoon) Tell me, is there an opportunity in Gambas to connect VLC player to play streaming videos?
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
No not in any "beginners" capacity.

you can probably use the vlc api library  libVLC media player, Open Source video framework for every OS! - VideoLAN.

mpv or mplayer has a command argument that lets you provide an x11 window Id and it auto embeds into that window but that won't work on wayland.
Online now: No Back to the top

Post

Posted
Rating:
#3
Guru
BruceSteers is in the usergroup ‘Guru’
The gambas MediaPlayer i believe can play streaming videos
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
vuott is in the usergroup ‘Regular’

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
Umbridge is in the usergroup ‘Regular’
How to play a video over the web using mediaplayer. I didn't see an opportunity to insert a link.
7.51.131.147/-wvhttp-01-/GetOneShot?image_size=1280x720&frame_count=1000000000
Online now: No Back to the top

Post

Posted
Rating:
#6
Guru
BruceSteers is in the usergroup ‘Guru’
You didn't see URL ?
/comp/gb.media/mediaplayer/url - Gambas Documentation

then i'd guess you didn't even look?
Online now: No Back to the top

Post

Posted
Rating:
#7
Guru
BruceSteers is in the usergroup ‘Guru’
Or do you mean did not see a button?

The gambas player does not have a button for opening files/URLs.

you'll have to program one to enter the url into the player.

Code (gambas)

  1.  
  2. Dim sURL As String = InputBox("Enter URL")
  3. If sURL Then MediaPlayer1.URL = sURL
  4.  
  5.  
Online now: No Back to the top

Post

Posted
Rating:
#8
Regular
Umbridge is in the usergroup ‘Regular’
 Is this a media player?

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#9
Regular
Umbridge is in the usergroup ‘Regular’
 the components only have this(I can't put the latest version on astra linux 1.7 SE

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#10
Regular
Umbridge is in the usergroup ‘Regular’
 Should this element be used in conjunction with the gb.media component?

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#11
Regular
Umbridge is in the usergroup ‘Regular’
 it is not possible to figure out whether the class needs to be connected and how to do it correctly, or it is enough to tick the media component.gb problems with English, I use a translator(

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#12
Regular
Umbridge is in the usergroup ‘Regular’
 what am I doing wrong)?

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#13
Guru
BruceSteers is in the usergroup ‘Guru’

Umbridge said

Is this a media player?

No i think that program is for making sausages.
 :roll:
Online now: No Back to the top

Post

Posted
Rating:
#14
Regular
vuott is in the usergroup ‘Regular’
If you want to play video by using <COLOR color="#800000">gb.media</COLOR> Component, I suggest reading these pages:
   La gestione del video e dei file video con il componente gb.media - Gambas-it.org - Wikipedia

If you want to play video by using <COLOR color="#800000">gb.media.form</COLOR> Component, I suggest:
   La gestione dei dati video con la Classe MediaView del componente gb.media.form - Gambas-it.org - Wikipedia

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#15
Online now: No Back to the top

Post

Posted
Rating:
#16
Regular
Umbridge is in the usergroup ‘Regular’
Your link is working! I wonder why mine doesn't work (I just need to play RTSP streaming video. The browser plays my link, and so does VlC player. What could be the matter?


Code

Public Sub Button1_Click()
MediaView1.URL = "http://47.51.131.147/-wvhttp-01-/GetOneShot?image_size=1280x720&frame_count=1000000000"
  'MediaView1.URL = "https://cdn.flowplayer.com/a30bd6bc-f98b-47bc-abf5-97633d4faea0/hls/de3f6ca7-2db3-4689-8160-0f574a5996ad/playlist.m3u8"
  MediaView1.Play

End
Online now: No Back to the top

Post

Posted
Rating:
#17
Regular
vuott is in the usergroup ‘Regular’
Using gb.media resources, your link does not work for me either.

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#18
Guru
BruceSteers is in the usergroup ‘Guru’
I think the URL is not so much a video stream as it is web content.

vlc player must be designed to handle that but gb.media is not (gb.media is just a GStreamer interface).

I got it to work by not using gb.media but using gb.gui.webview and the WebView component that is for loading web urls not video streams.

/comp/gb.gui.webview - Gambas Documentation

Code (gambas)

  1. Public Sub Form_Open()
  2.  
  3.   WebView1.Url = "http://47.51.131.147/-wvhttp-01-/GetOneShot?image_size=1280x720&frame_count=1000000000"
  4.  
  5.  

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#19
Regular
vuott is in the usergroup ‘Regular’

BruceSteers said

vlc player must be designed to handle that but gb.media is not (gb.media is just a GStreamer interface).
Hi, BruceSteers,
as you know, Claus Dietrich ("crabman" on the German forum) has tried at both gb.media and libvlc resources for viewing web video and web-TV.
He has repeatedly told me that he has noticed that gb.media cannot handle web-video and web-TV perfectly, as libvlc can.  :|

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#20
Regular
Umbridge is in the usergroup ‘Regular’
 Tell me, what type of project should I use for your last example? Graphical Aplication? Can you tell me which components to choose from the available ones?

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#21
Guru
BruceSteers is in the usergroup ‘Guru’
Probably because it is not video gb.media as you know plays video files.

I used the HttpClient class to read the incoming data from the page.

it starts like a HTTP image request with some CRLF terminated strings, then the data much like a HTTP image request a browser shows.
Is just shows a jpeg image, over and over again..
maybe this IS correct RTSP protocol? i don't know

this is the received data…

Code

--boundary
Content-Type: image/jpeg
Content-Length: 34634

image data starts here

How to process the data from there i do not know.

I seems to repeatedly re-send the image type, image size and then the data like HTTP1/1
Online now: No Back to the top

Post

Posted
Rating:
#22
Regular
Umbridge is in the usergroup ‘Regular’
 It turned out to add these, it conflicts with others, I would like to know the combination of components for my version of gambas 3.12.

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#23
Guru
BruceSteers is in the usergroup ‘Guru’

Umbridge said

Tell me, what type of project should I use for your last example? Graphical Aplication? Can you tell me which components to choose from the available ones?

your gambas is very old and outdated , 3.12 was a very long time ago and is what shipped with debian bullseye , are you sure you have debian 12 bookworm?

WebView is with current stable gambas

webkit for old versions.
(webkit is now depreciated)

or update to latest gambas stable version and use gb.gui.webview.
Online now: No Back to the top

Post

Posted
Rating:
#24
Guru
BruceSteers is in the usergroup ‘Guru’
Upgrade your gambas like this…

you will find the commands to install debian 12 in the .gitlab-ci.yml file

<HIGHLIGHT highlight="shell">

# get dependencies
sudo apt-get update
sudo apt-get install -y build-essential g++ automake autoconf libbz2-dev libzstd-dev default-libmysqlclient-dev unixodbc-dev libpq-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git libssl-dev qt6-base-dev qt6-webengine-dev qt6-svg-dev libmongoc-dev

# clone gambas stable to ~/gambas-source folder
cd $HOME
git clone Gambas / gambas · GitLab –depth=1 –branch=stable gambas-source
cd ./gambas-source

./reconf-all
./configure -C –disable-keyring –disable-sqlite2 –disable-qt4
make -j$(nproc)

sudo apt-get remove gambas3*  # gotta remove the old apt gambas version before installing new

sudo make install

</HIGHLIGHT>
Online now: No Back to the top

Post

Posted
Rating:
#25
Regular
Umbridge is in the usergroup ‘Regular’
 unfortunately, this component is not available to me (for my version of astra linux 1.7 se maximum gambas 3.12. In the next post I asked about the repositories for astra linux 1.8 se, it is already based on debian 12, but I do not know where to get the repository addresses.

Image

(Click to enlarge)

Online now: No Back to the top
1 guest and 0 members have just viewed this.