playing media on linux

Deploying to Linux? Get penguinated here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3468
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

playing media on linux

Post by mwieder » Fri Jul 29, 2022 2:41 am

I've had some success playing videos on linux now using mplayer.
Had to trick it, of course, by placing a substack over an invisible player object.
No onscreen controls but I can pause, unpause, and stop a playing video by sending commands to the process.

When I tried including a sample video in the zip file and the Supid Web Forum software complained that the file was too large.
Yes, it's a kludge, but I hope this is useful to someone.
Attachments
Mplayer.livecode.zip
(1.99 KiB) Downloaded 57 times

PaulDaMacMan
Posts: 564
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: playing media on linux

Post by PaulDaMacMan » Wed Dec 07, 2022 12:05 am

Just getting back into running Linux a lot, and remembered how broken multimedia playback is on that version engine, so this is great! Thanks Mark!

I was just reading over the old thread about the MPlayer-based Player object on Linux, but now I'm pretty sure this could be done with Extension Builder to get window ID of the view-port the engine creates, the 'my native view'. Maybe can use MPlayer directly, as a library if available (libMPlayer?).
My LCB Repos: https://github.com/PaulMcClernan/
My LiveCode YouTube Videos: PlayList

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3468
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: playing media on linux

Post by mwieder » Wed Dec 07, 2022 1:12 am

I looked into that, but it seems that there's no separate windowID for the player object, so there's nothing to grab onto. The stack itself is the only object that gets a real windowID.

PaulDaMacMan
Posts: 564
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: playing media on linux

Post by PaulDaMacMan » Fri Dec 09, 2022 5:05 am

mwieder wrote:
Wed Dec 07, 2022 1:12 am
I looked into that, but it seems that there's no separate windowID for the player object, so there's nothing to grab onto. The stack itself is the only object that gets a real windowID.
Hmm, I've actually seen double windows on certain window managers for the Browser Widget, which definitely draws on top of the stack window ( or tries too)
on Linux you can try this if you see the window, it reports it has an Window ID ref and no name.
put shell(xwininfo)

and then click the window you want to get info for
My LCB Repos: https://github.com/PaulMcClernan/
My LiveCode YouTube Videos: PlayList

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3468
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: playing media on linux

Post by mwieder » Fri Dec 09, 2022 4:53 pm

Have been there.
Remember that the LC browser widget doesn't work on linux.
And for the record, there's only one window id. Here's the result of a new blank stack with a player control:

xwininfo: Window id: 0x640016f "Untitled 1 *"

Absolute upper-left X: 2252
Absolute upper-left Y: 235
Relative upper-left X: 10
Relative upper-left Y: 38
Width: 400
Height: 400
Depth: 32
Visual: 0x104
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x640016e (not installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +2252+235 -2788+235 -2788-445 +2252-445
-geometry 400x400+2252+235

PaulDaMacMan
Posts: 564
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: playing media on linux

Post by PaulDaMacMan » Tue Jan 17, 2023 4:37 am

mwieder wrote:
Fri Dec 09, 2022 4:53 pm
Have been there.
Remember that the LC browser widget doesn't work on linux.
And for the record, there's only one window id. Here's the result of a new blank stack with a player control:

xwininfo: Window id: 0x640016f "Untitled 1 *"
I looked into that, but it seems that there's no separate windowID for the player object, so there's nothing to grab onto. The stack itself is the only object that gets a real windowID.
Hmm, I've actually seen double windows on certain window managers for the Browser Widget, which definitely draws on top of the stack window ( or tries too)
on Linux you can try this if you see the window, it reports it has an Window ID ref and no name.
put shell(xwininfo)

I was using Enlightenment OS (Pantheon) and there was visibly two window frames with that, so I had two windows to click on, the stack window and a separate visible window behind it with no image inside (perhaps it's creating a window for the offscreen pre-drawing buffer of web content?). Now I was running this on my sons old ChromeBook-like thing from ASUS so I thought maybe it's something with the lame GPU or graphics driver issue but it displayed the same issue running EnlightenmentOS inside a VirtualBox VM. Ubuntu Studio (w KDE Plasma) doesn't have the issue, but does seem to have focus issues at least with certain window' modes (modal, modeless, etc.). It would be great if the issues with various Linux DE's could be aggregated into a list.

I'd say that the Browser Widget does in fact work on Linux 64bit (not running 32bit desktops too often these days anyway), it's just that it may not work correctly and have focus issues depending on the windowing framework the Linux is running. In fact there is a note about that window focus issue with Linux 'native layer' (FFI/GTK) widgets in the LCB docs from years ago (and I suspect not much was done to fix it).
My LCB Repos: https://github.com/PaulMcClernan/
My LiveCode YouTube Videos: PlayList

Post Reply

Return to “Linux”