Player does not show on ubuntu

Deploying to Linux? Get penguinated here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

sandoval31
Posts: 9
Joined: Wed Dec 14, 2016 3:44 pm

Player does not show on ubuntu

Post by sandoval31 » Fri Feb 16, 2018 11:15 am

Hi,

I would like to continue to develop a livecode project that I started on windows, but I changed my laptop and I am now on Ubuntu.
I installed Livecode 8 and Livecode 9.
When I try to use or to add a player, there is no button on it (so I can't use it). Any idea ?

Thanks

Live code 9.0.0-dp-11
Ubuntu 16.04 LTS

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Fri Feb 16, 2018 2:27 pm

Well, I see the player here on lubuntu, Lc 8.1.9, so I don't think you mean the button for the player. It played the sample movie, so I don't think you mean that.

Are you talking about the controller not showing up?
Image

MaxV
Posts: 1489
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Player does not show on ubuntu

Post by MaxV » Fri Feb 16, 2018 5:19 pm

The player on linux uses MPLAYER.
Mplayer doesn't have visible controls, but you can add easily with livecode 8)
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

sandoval31
Posts: 9
Joined: Wed Dec 14, 2016 3:44 pm

Re: Player does not show on ubuntu

Post by sandoval31 » Tue Feb 20, 2018 10:41 pm

Thanks for your answers,

Yes, I mean the buttons for the player AND the time-line.

How can I add control buttons for the MPlayer ?
Does it mean that I have to develop a specific version for linux ?

Moreover, I made specific development that allows the user to select a segment with the boundaries of the time-line. Is it available on linux ?

Thanks again,

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Tue Feb 20, 2018 11:02 pm

My guess (meaning I haven't messed with video much on any system) would be that you'd roll your own buttons, then script those to the properties, which is a lot easier than it sounds. If your going to design your own buttons/controls, instead of making it a linux only thing I'd just go with em for any system your going to put this out for.

However, it is certainly feasible to use an if/then or case/switch structure to decide if you need them based on Os.
Image

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

Re: Player does not show on ubuntu

Post by mwieder » Thu Feb 22, 2018 3:04 am

Note also if you're developing this for more than just your own system that mplayer isn't necessarily installed by default on all linux systems.

Note #2: I've never gotten the "stop" command to stop a playing video on linux. Once it starts playing you have to wait for the end.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5939
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Player does not show on ubuntu

Post by FourthWorld » Thu Feb 22, 2018 4:34 am

mwieder wrote:
Thu Feb 22, 2018 3:04 am
I've never gotten the "stop" command to stop a playing video on linux. Once it starts playing you have to wait for the end.
Me neither.

Have you found any Linux movie player which offers a command line API that lets us start, stop, and play from specific time points in the media?

If we had that I'd write us a player control.

But if I have to use the C APIs don't hold your breath....
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Thu Feb 22, 2018 4:40 am

I thought in that area VLC was the wunderkind of players, no matter what platform.

Mind you though, I still think an internal one should be developed, as universal as VLC can be, not everyone likes it.
Image

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

Re: Player does not show on ubuntu

Post by mwieder » Thu Feb 22, 2018 5:10 am

Yeah, VLC is my goto video player on any platform.
In a previous life I made an LC external to interface to the vlc sdk.
But that was then, and it was under contract, and I no longer have the files.
Plus it would be easier now with LCB.

Anyone? Bueller?
https://www.videolan.org/developers/vlc.html
https://wiki.videolan.org/Developers_Corner

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Thu Feb 22, 2018 5:33 am

You mean -hh hasn't already done this? :shock:
Image

MaxV
Posts: 1489
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Player does not show on ubuntu

Post by MaxV » Thu Feb 22, 2018 3:35 pm

Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Thu Feb 22, 2018 4:24 pm

Well I knew xanim was originally the player used for linux, but that is new (to me). Thank you Max!

I was thinking you'd have to shell out to use another player.

*Edit - my mojo must be weakening, I could not get this to work haha. On the other side of that, VLC sure does have a lot of options. I'm stuffing this in a code block simply due to the amount of stuff on the help line. Funny note, this isn't even including the "advanced" options :shock:

Code: Select all

VLC media player 2.2.8 Weatherwax (revision 2.2.7-14-g3cc1d8cba9)
Usage: vlc [options] [stream] ...
You can specify multiple streams on the commandline.
They will be enqueued in the playlist.
The first item specified will be played first.

Options-styles:
  --option  A global option that is set for the duration of the program.
   -option  A single letter version of a global --option.
   :option  An option that only applies to the stream directly before it
            and that overrides previous settings.

Stream MRL syntax:
  [[access][/demux]://]URL[#[title][:chapter][-[title][:chapter]]]
  [:option=value ...]

  Many of the global --options can also be used as MRL specific :options.
  Multiple :option=value pairs can be specified.

URL syntax:
  file:///path/file              Plain media file
  http://host[:port]/file        HTTP URL
  ftp://host[:port]/file         FTP URL
  mms://host[:port]/file         MMS URL
  screen://                      Screen capture
  dvd://[device]                 DVD device
  vcd://[device]                 VCD device
  cdda://[device]                Audio CD device
  udp://[[<source address>]@[<bind address>][:<bind port>]]
                                 UDP stream sent by a streaming server
  vlc://pause:<seconds>          Pause the playlist for a certain time
  vlc://quit                     Special item to quit VLC


 core program (core)

 Audio
      --audio, --no-audio        Enable audio (default enabled)
      --spdif, --no-spdif        Use S/PDIF when available (default disabled)
      --force-dolby-surround {0 (Auto), 1 (On), 2 (Off)} 
                                 Force detection of Dolby Surround
      --audio-replay-gain-mode {none,track,album} 
                                 Replay gain mode
      --audio-replay-gain-preamp <float> 
                                 Replay preamp
      --audio-replay-gain-default <float> 
                                 Default replay gain
      --audio-time-stretch, --no-audio-time-stretch 
                                 Enable time stretching audio (default enabled)
      --audio-filter <string>    Audio filters
      --audio-visual <string>    Audio visualizations

 Video
  -f, --fullscreen, --no-fullscreen 
                                 Fullscreen video output (default disabled)
      --overlay, --no-overlay    Overlay video output (default enabled)
      --video-on-top, --no-video-on-top 
                                 Always on top (default disabled)
      --video-wallpaper, --no-video-wallpaper 
                                 Enable wallpaper mode  (default disabled)
      --video-title-show, --no-video-title-show 
                                 Show media title on video (default enabled)
      --video-title-timeout <integer [-2147483648 .. 2147483647]> 
                                 Show video title for x milliseconds
      --video-title-position {0 (Center), 1 (Left), 2 (Right), 4 (Top), 8 (Bottom), 5 (Top-Left), 6 (Top-Right), 9 (Bottom-Left), 10 (Bottom-Right)} 
                                 Position of video title
      --mouse-hide-timeout <integer [-2147483648 .. 2147483647]> 
                                 Hide cursor and fullscreen controller after x
                                 milliseconds
   Snapshot:
      --snapshot-path <string>   Video snapshot directory (or filename)
      --snapshot-prefix <string> Video snapshot file prefix
      --snapshot-format {png,jpg,tiff} 
                                 Video snapshot format
      --snapshot-preview, --no-snapshot-preview 
                                 Display video snapshot preview (default
                                 enabled)
      --snapshot-sequential, --no-snapshot-sequential 
                                 Use sequential numbers instead of timestamps
                                 (default disabled)
   Window properties:
      --crop <string>            Video cropping
      --custom-crop-ratios <string> 
                                 Custom crop ratios list
      --aspect-ratio <string>    Source aspect ratio
      --autoscale, --no-autoscale 
                                 Video Auto Scaling (default enabled)
      --scale <float>            Video scaling factor
      --custom-aspect-ratios <string> 
                                 Custom aspect ratios list
      --deinterlace {0 (Off), -1 (Automatic), 1 (On)} 
                                 Deinterlace
      --deinterlace-mode {discard,blend,mean,bob,linear,x,yadif,yadif2x,phosphor,ivtc} 
                                 Deinterlace mode
      --video-filter <string>    Video filter module
      --video-splitter <string>  Video splitter module

 Subpictures
   On Screen Display:
      --spu, --no-spu            Enable sub-pictures (default enabled)
      --osd, --no-osd            On Screen Display (default enabled)
   Subtitles:
      --sub-file <string>        Use subtitle file
      --sub-autodetect-file, --no-sub-autodetect-file 
                                 Autodetect subtitle files (default enabled)
   Overlays:
      --sub-source <string>      Subpictures source module
      --sub-filter <string>      Subpictures filter module
   Track settings:
      --audio-language <string>  Audio language
      --sub-language <string>    Subtitle language
      --menu-language <string>   Menu language
      --preferred-resolution {-1 (Best available), 1080 (Full HD (1080p)), 720 (HD (720p)), 576 (Standard Definition (576 or 480 lines)), 360 (Low Definition (360 lines)), 240 (Very Low Definition (240 lines))} 
                                 Preferred video resolution
   Playback control:
      --input-repeat <integer [-2147483648 .. 2147483647]> 
                                 Input repetitions
      --input-fast-seek, --no-input-fast-seek 
                                 Fast seek (default disabled)
      --rate <float>             Playback speed
   Default devices:
      --dvd <string>             DVD device
      --vcd <string>             VCD device
      --cd-audio <string>        Audio CD device
   Advanced:
      --input-title-format <string> 
                                 Change title according to current media

 Input
      --stream-filter <string>   Stream filter module

 Playlist
   Performance options:
  -Z, --random, --no-random      Play files randomly forever (default disabled)
  -L, --loop, --no-loop          Repeat all (default disabled)
  -R, --repeat, --no-repeat      Repeat current item (default disabled)
      --play-and-exit, --no-play-and-exit 
                                 Play and exit (default disabled)
      --play-and-stop, --no-play-and-stop 
                                 Play and stop (default disabled)
      --playlist-autostart, --no-playlist-autostart 
                                 Auto start (default enabled)
      --playlist-cork, --no-playlist-cork 
                                 Pause on audio communication (default enabled)
      --media-library, --no-media-library 
                                 Use media library (default disabled)
      --playlist-tree, --no-playlist-tree 
                                 Display playlist tree (default disabled)
      --open <string>            Default stream
      --auto-preparse, --no-auto-preparse 
                                 Automatically preparse files (default enabled)
      --metadata-network-access, --no-metadata-network-access 
                                 Allow metadata network access (default
                                 disabled)
  -v, --verbose <integer [-2147483648 .. 2147483647]> 
                                 Verbosity (0,1,2)
  -q, --quiet, --no-quiet        Be quiet (default disabled)
      --pidfile <string>         Write process id to file
      --advanced, --no-advanced  Show advanced options (default disabled)
      --interact, --no-interact  Interface interaction (default enabled)
  -I, --intf <string>            Interface module
      --extraintf <string>       Extra interface modules
      --control <string>         Control interfaces

 Hot keys
      --hotkeys-mousewheel-mode {2 (Ignore), 0 (Volume Control), 1 (Position Control)} 
                                 MouseWheel up-down axis Control
      --global-key-toggle-fullscreen <string> 
                                 Fullscreen
      --key-toggle-fullscreen <string> 
                                 Fullscreen
      --global-key-leave-fullscreen <string> 
                                 Exit fullscreen
      --key-leave-fullscreen <string> 
                                 Exit fullscreen
      --global-key-play-pause <string> 
                                 Play/Pause
      --key-play-pause <string>  Play/Pause
      --global-key-faster <string> 
                                 Faster
      --key-faster <string>      Faster
      --global-key-slower <string> 
                                 Slower
      --key-slower <string>      Slower
      --global-key-rate-normal <string> 
                                 Normal rate
      --key-rate-normal <string> Normal rate
      --global-key-rate-faster-fine <string> 
                                 Faster (fine)
      --key-rate-faster-fine <string> 
                                 Faster (fine)
      --global-key-rate-slower-fine <string> 
                                 Slower (fine)
      --key-rate-slower-fine <string> 
                                 Slower (fine)
      --global-key-next <string> Next
      --key-next <string>        Next
      --global-key-prev <string> Previous
      --key-prev <string>        Previous
      --global-key-stop <string> Stop
      --key-stop <string>        Stop
      --global-key-jump-extrashort <string> 
                                 Very short backwards jump
      --key-jump-extrashort <string> 
                                 Very short backwards jump
      --global-key-jump+extrashort <string> 
                                 Very short forward jump
      --key-jump+extrashort <string> 
                                 Very short forward jump
      --global-key-jump-short <string> 
                                 Short backwards jump
      --key-jump-short <string>  Short backwards jump
      --global-key-jump+short <string> 
                                 Short forward jump
      --key-jump+short <string>  Short forward jump
      --global-key-jump-medium <string> 
                                 Medium backwards jump
      --key-jump-medium <string> Medium backwards jump
      --global-key-jump+medium <string> 
                                 Medium forward jump
      --key-jump+medium <string> Medium forward jump
      --global-key-jump-long <string> 
                                 Long backwards jump
      --key-jump-long <string>   Long backwards jump
      --global-key-jump+long <string> 
                                 Long forward jump
      --key-jump+long <string>   Long forward jump
      --global-key-frame-next <string> 
                                 Next frame
      --key-frame-next <string>  Next frame
      --global-key-quit <string> Quit
      --key-quit <string>        Quit
      --global-key-vol-up <string> 
                                 Volume up
      --key-vol-up <string>      Volume up
      --global-key-vol-down <string> 
                                 Volume down
      --key-vol-down <string>    Volume down
      --global-key-vol-mute <string> 
                                 Mute
      --key-vol-mute <string>    Mute
      --global-key-audio-track <string> 
                                 Cycle audio track
      --key-audio-track <string> Cycle audio track
      --global-key-audiodevice-cycle <string> 
                                 Cycle through audio devices
      --key-audiodevice-cycle <string> 
                                 Cycle through audio devices
      --global-key-subtitle-track <string> 
                                 Cycle subtitle track
      --key-subtitle-track <string> 
                                 Cycle subtitle track
      --global-key-subtitle-toggle <string> 
                                 Toggle subtitles
      --key-subtitle-toggle <string> 
                                 Toggle subtitles
      --global-key-program-sid-next <string> 
                                 Cycle next program Service ID
      --key-program-sid-next <string> 
                                 Cycle next program Service ID
      --global-key-program-sid-prev <string> 
                                 Cycle previous program Service ID
      --key-program-sid-prev <string> 
                                 Cycle previous program Service ID
      --global-key-aspect-ratio <string> 
                                 Cycle source aspect ratio
      --key-aspect-ratio <string> 
                                 Cycle source aspect ratio
      --global-key-crop <string> Cycle video crop
      --key-crop <string>        Cycle video crop
      --global-key-toggle-autoscale <string> 
                                 Toggle autoscaling
      --key-toggle-autoscale <string> 
                                 Toggle autoscaling
      --global-key-incr-scalefactor <string> 
                                 Increase scale factor
      --key-incr-scalefactor <string> 
                                 Increase scale factor
      --global-key-decr-scalefactor <string> 
                                 Decrease scale factor
      --key-decr-scalefactor <string> 
                                 Decrease scale factor
      --global-key-deinterlace <string> 
                                 Toggle deinterlacing
      --key-deinterlace <string> Toggle deinterlacing
      --global-key-deinterlace-mode <string> 
                                 Cycle deinterlace modes
      --key-deinterlace-mode <string> 
                                 Cycle deinterlace modes
      --global-key-intf-show <string> 
                                 Show controller in fullscreen
      --key-intf-show <string>   Show controller in fullscreen
      --global-key-wallpaper <string> 
                                 Toggle wallpaper mode in video output
      --key-wallpaper <string>   Toggle wallpaper mode in video output
      --global-key-random <string> 
                                 Random
      --key-random <string>      Random
      --global-key-loop <string> Normal/Loop/Repeat
      --key-loop <string>        Normal/Loop/Repeat
   Zoom:
      --global-key-zoom-quarter <string> 
                                 1:4 Quarter
      --key-zoom-quarter <string> 
                                 1:4 Quarter
      --global-key-zoom-half <string> 
                                 1:2 Half
      --key-zoom-half <string>   1:2 Half
      --global-key-zoom-original <string> 
                                 1:1 Original
      --key-zoom-original <string> 
                                 1:1 Original
      --global-key-zoom-double <string> 
                                 2:1 Double
      --key-zoom-double <string> 2:1 Double
   Jump sizes:
      --extrashort-jump-size <integer [-2147483648 .. 2147483647]> 
                                 Very short jump length
      --short-jump-size <integer [-2147483648 .. 2147483647]> 
                                 Short jump length
      --medium-jump-size <integer [-2147483648 .. 2147483647]> 
                                 Medium jump length
      --long-jump-size <integer [-2147483648 .. 2147483647]> 
                                 Long jump length
      --bookmark1 <string>       Playlist bookmark 1
      --bookmark2 <string>       Playlist bookmark 2
      --bookmark3 <string>       Playlist bookmark 3
      --bookmark4 <string>       Playlist bookmark 4
      --bookmark5 <string>       Playlist bookmark 5
      --bookmark6 <string>       Playlist bookmark 6
      --bookmark7 <string>       Playlist bookmark 7
      --bookmark8 <string>       Playlist bookmark 8
      --bookmark9 <string>       Playlist bookmark 9
      --bookmark10 <string>      Playlist bookmark 10
  -h, --help, --no-help          print help for VLC (can be combined with
                                 --advanced and --help-verbose) (default
                                 disabled)
  -H, --full-help, --no-full-help 
                                 Exhaustive help for VLC and its modules
                                 (default disabled)
      --longhelp, --no-longhelp  print help for VLC and all its modules (can be
                                 combined with --advanced and --help-verbose)
                                 (default disabled)
      --help-verbose, --no-help-verbose 
                                 ask for extra verbosity when displaying help
                                 (default disabled)
  -l, --list, --no-list          print a list of available modules (default
                                 disabled)
      --list-verbose, --no-list-verbose 
                                 print a list of available modules with extra
                                 detail (default disabled)
  -p, --module <string>          print help on a specific module (can be
                                 combined with --advanced and --help-verbose).
                                 Prefix the module name with = for strict
                                 matches.
      --ignore-config, --no-ignore-config 
                                 no configuration option will be loaded nor
                                 saved to config file (default enabled)
      --reset-config, --no-reset-config 
                                 reset the current config to the default values
                                 (default disabled)
      --reset-plugins-cache, --no-reset-plugins-cache 
                                 resets the current plugins cache (default
                                 disabled)
      --version, --no-version    print version information (default disabled)
      --config <string>          use alternate config file

Note: add --advanced to your command line to see advanced options.

To get exhaustive help, use '-H'.
Image

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

Re: Player does not show on ubuntu

Post by mwieder » Thu Feb 22, 2018 11:16 pm

MaxV- AFAICT the player control will *only* use mplayer on linux, and the xanim link is only for videoclips and audioclips. Please do correct me if I'm wrong about that. Also, the last xanim release was 1999 (version 2.80.1), it's not available in current distros - has to be downloaded from the developer's site and built locally, Videoclips and audioclips have, imo, very limited uses on linux.

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Player does not show on ubuntu

Post by bogs » Thu Feb 22, 2018 11:38 pm

The player control yah, but what he is talking about (videoClipPlayer) says you can set the path to *any* player, not just xanim, it was introduced around Lc 1. Or at least thats what it seems to suggest here (bold by me) -
Use the videoClipPlayer property to specify the video player used on Unix systems.

Value:
The videoClipPlayer is a string consisting of the file path of a program.

Comments:
LiveCode uses the program specified by the videoClipPlayer when you use the play command.
Selection_003.png
Despite all that, I still haven't been able to get it to work, so it is quite possible there is some fault of mine preventing me from understanding what it requires.
Image

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

Re: Player does not show on ubuntu

Post by mwieder » Fri Feb 23, 2018 1:11 am

The player control yah, but what he is talking about (videoClipPlayer) says you can set the path to *any* player, not just xanim
I'm not convinced that's what the documentation means there. There's code in the engine to set and retrieve the global setting for the videoclip player (MCLegacySetVcPlayer and MCLegacyGetVcPlayer functions), but the MCLegacyGetVcPlayer function is never invoked.

As an example,
import the "Sample.mpg" file as a videoclip
set the videoclipplayer to "/usr/bin/mplayer"
and then have a button that

Code: Select all

on mouseUp
  play videoclip "Sample.mpg"
end mouseUp
and then restart LC after it crashes (exit on signal 11).

Post Reply

Return to “Linux”