playing media on linux
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
playing media on linux
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.
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 284 times
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- Posts: 670
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: playing media on linux
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?).
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?).
Re: playing media on linux
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- Posts: 670
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: playing media on linux
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
Re: playing media on linux
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
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
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- Posts: 670
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: playing media on linux
mwieder wrote: ↑Fri Dec 09, 2022 4:53 pmHave 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 *"
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)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.
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).
-
- Livecode Opensource Backer
- Posts: 9761
- Joined: Fri Feb 19, 2010 10:17 am
Re: playing media on linux
AND the player object: does it, or does it not on Linux?
-
-
-
- Posts: 670
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: playing media on linux
The player does work...well it sort of works, but there are no 'transport' (Play,Pause,etc.) controls when running under Linux, but you can make it work via scripting.