B4J Question MediaView Linux

Luis Felipe Andrade

Member
Licensed User
Hello, I am installing an application made in B4X-B4J that requires playing a video, in Windows it works perfectly, but in Linux Ubuntu 22.04 I cannot get MediaView to work, do you know the reason? I have also tried VLC but in all cases it tells me that VLC is not installed even though it is actually already installed. In Ubuntu with mediaview I am running the program in two ways, the first using Wine and executing the EXE and the second directly in Linux using the .jar file of the application but in both cases the video is not showing, Also I try with Erel's MediaView Example, I have been installed Java 11, I will appreciate your help, thanks in advance!
 
Solution
I think you are using wrong Java JDK. See my terminal has JavaFX modules.

VirtualBox_Debian 12_30_01_2024_03_01_21.png

Luis Felipe Andrade

Member
Licensed User
Is it because of the forward/backward slash directory or path?
At the beginning of the transfer when I went from Windows to Linux that happened to me and I realized that the paths and slashes must indeed be modified, but now it is not a problem that it cannot find the file, the problem I think is that the driver does not have the capacity to play in Linux, at least I have made sure that the file can be loaded with the correct path, because at the same time I also load images and the images load without problem as well as text files, the connections with the databases in website, etc., but only the video is the one that is not shown, I would appreciate any comments, greetings
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Does it work in Debug mode?

VirtualBox_Debian 12_30_01_2024_02_06_21.png

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    B4XPages.SetTitle(Me, "MediaView Example")
    Root = Root1
    Root.LoadLayout("MainPage")
    MediaViewController1.SetMediaView(MediaView1)
    'MediaView1.Source = "https://player.vimeo.com/external/354886143.hd.mp4?s=2e182d1b22282a63a9533ffda5bb0b2295cdb8e6&profile_id=175"
    'Dim FilePath As String = "file:///" & File.Combine(File.DirApp, "1.mp4").Replace("\", "/")
    Dim FilePath As String = "file://" & File.Combine(File.DirApp, "1.mp4")
    MediaView1.Source = FilePath
    MediaView1.Volume = 1
End Sub
 
Last edited:
Upvote 0

Luis Felipe Andrade

Member
Licensed User
Does it work in Debug mode?

View attachment 150172
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    B4XPages.SetTitle(Me, "MediaView Example")
    Root = Root1
    Root.LoadLayout("MainPage")
    MediaViewController1.SetMediaView(MediaView1)
    'MediaView1.Source = "https://player.vimeo.com/external/354886143.hd.mp4?s=2e182d1b22282a63a9533ffda5bb0b2295cdb8e6&profile_id=175"
    'Dim FilePath As String = "file:///" & File.Combine(File.DirApp, "1.mp4").Replace("\", "/")
    Dim FilePath As String = "file:///" & File.Combine(File.DirApp, "1.mp4")
    MediaView1.Source = FilePath
    MediaView1.Volume = 1
End Sub
No, same result with debug or with BJ4 Bridge, Woooo!, it works on debian!, attached the same Erel's Example on windows, then on linux, maybe I've to try debian, I will do that then let you know the result, thank you!!
 

Attachments

  • Captura.JPG
    Captura.JPG
    65.6 KB · Views: 27
  • caplinux.jpg
    caplinux.jpg
    91.8 KB · Views: 27
Upvote 0

aeric

Expert
Licensed User
Longtime User
No, same result with debug or with BJ4 Bridge, Woooo!, it works on debian!, attached the same Erel's Example on windows, then on linux, maybe I've to try debian, I will do that then let you know the result, thank you!!
Do not run the exe using Wine.
Try run from debug using B4J-Bridge.
You need to compile it using B4JPackager11 with package.json file to create a release version for Linux.
Search the forum for tutorials.
 
Upvote 0

Luis Felipe Andrade

Member
Licensed User
Do not run the exe using Wine.
Try run from debug using B4J-Bridge.
You need to compile it using B4JPackager11 with package.json file to create a release version for Linux.
Search the forum for tutorials.
If I Run Using the Bridge on the linux side do not do anythining, on the B4J show the error: Error: --add-modules= requires modules to be specified, now I will try to run with the jar file.
About the SMM_VIDEO yes is set, that way I get sucsess in windows.
Thank you very much,
 

Attachments

  • Captura2.JPG
    Captura2.JPG
    197 KB · Views: 32
  • cap3.jpg
    cap3.jpg
    238.6 KB · Views: 28
Upvote 0
Top