• MPV Video Player and Tk

    From Westermeyer@21:1/5 to All on Mon Jun 27 22:25:14 2022
    Hello All,

    I've got a question about the MPV video player and possible Tk bindings...

    From their page, there is a link to the language bindings: https://github.com/mpv-player/mpv/wiki/Language-bindings

    Would it be possible to implement a player in Tcl/Tk?

    Thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From apn@21:1/5 to Westermeyer on Wed Jun 29 21:47:39 2022
    On 6/28/2022 10:55 AM, Westermeyer wrote:
    Hello All,

    I've got a question about the MPV video player and possible Tk bindings...

    From their page, there is a link to the language bindings: https://github.com/mpv-player/mpv/wiki/Language-bindings

    Would it be possible to implement a player in Tcl/Tk?

    Thanks

    There is an implementation somewhere on the wiki. Not sure how old or
    how complete.

    Also seems like something you could bind with either cffi or ffidl
    without too much effort.

    /Ashok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From apn@21:1/5 to apn on Wed Jun 29 22:38:35 2022
    On 6/29/2022 9:47 PM, apn wrote:
    Also seems like something you could bind with either cffi or ffidl
    without too much effort.

    /Ashok

    To follow up on the above, here is an interactive session to play mp4
    using cffi. This is of course very rudimentary, frail and probably not
    optimal cffi definitions. A real package for mpv will need considerable
    work to understand the api and map it to cffi. Still, just for grins...

    (in wish)

    % package req cffi
    1.0.7
    % cd d:/src/libmpv
    % dir
    D:/src/libmpv:
    include libmpv.dll.a mpv-2.dll mpv.def
    % cffi::Wrapper create libmpv mpv-2.dll
    ::libmpv
    % libmpv function mpv_create pointer.mpv_handle {}
    ::mpv_create
    % libmpv function mpv_initialize int {ctx pointer.mpv_handle}
    ::mpv_initialize
    % libmpv function mpv_destroy void {ctx {pointer.mpb_handle dispose}} ::mpv_destroy
    % set ctx [mpv_create]
    0x000001841cb77a00^::mpv_handle
    % mpv_initialize $ctx
    0
    % libmpv function mpv_command int {ctx pointer.mpv_handle args
    {pointer[3] nullok}}
    ::mpv_command
    % cd {C:\Users\ashok\Videos\Captures}
    % dir
    C:/Users/ashok/Videos/Captures:
    mpv-test.mp4
    % set cmd [cffi::memory fromstring "loadfile"]
    0x000001841a32c570^
    % set file [cffi::memory fromstring mpv-test.mp4]
    0x000001841a32dd10^
    % set args [list $cmd $file NULL]
    0x000001841a32c570^ 0x000001841a32dd10^ NULL
    % mpv_command $ctx $args
    0

    The video is playing at this point.

    The above was translated from the C sample at https://github.com/mpv-player/mpv-examples/blob/master/libmpv/simple/simple.c

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to Westermeyer on Thu Jun 30 10:43:01 2022
    On Monday, June 27, 2022 at 10:25:19 PM UTC-7, Westermeyer wrote:
    Hello All,

    I've got a question about the MPV video player and possible Tk bindings...

    From their page, there is a link to the language bindings: https://github.com/mpv-player/mpv/wiki/Language-bindings

    Would it be possible to implement a player in Tcl/Tk?

    Thanks
    A snit player is documented in the WIKI. It uses mplayer. sample code follows employing version from www.mplayerhq.hu

    frame .tMPlayer.$f -class Mplayer -background yellow -container yes {*}$options
    set bOK [button .tMPlayer.bOK -text OK]
    pack $bOK .tMPlayer.$f -side left
    pack propagate .tMPlayer 0
    set wid [winfo id .tMPlayer.$f]

    # have -colorkey match window background
    set channel \
    [open [concat | ../shared/snitMP/mplayer.exe -quiet -idle -slave -vo directx -colorkey 0xff0000 -wid $wid $args] r+]
    flush $channel
    bind .tMPlayer.$f <Destroy> [subst {
    catch {
    rename .tMPlayer.$f ""
    puts $channel quit
    flush $channel
    close $channel
    }
    }]
    #rename $f "_$f"

    proc $f {cmd args} [subst -nocommand {
    puts \$cmd
    puts \$args
    if {\$cmd eq "cmd"} then {
    puts $channel \$args
    flush $channel
    } else {
    _$f \$cmd [list \$args]
    }
    }]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Westermeyer@21:1/5 to [email protected] on Fri Jul 1 06:17:46 2022
    On Thursday, June 30, 2022 at 10:43:05 AM UTC-7, [email protected] wrote:
    On Monday, June 27, 2022 at 10:25:19 PM UTC-7, Westermeyer wrote:
    Hello All,

    I've got a question about the MPV video player and possible Tk bindings...

    From their page, there is a link to the language bindings: https://github.com/mpv-player/mpv/wiki/Language-bindings

    Would it be possible to implement a player in Tcl/Tk?

    Thanks
    A snit player is documented in the WIKI. It uses mplayer. sample code follows employing version from www.mplayerhq.hu

    frame .tMPlayer.$f -class Mplayer -background yellow -container yes {*}$options
    set bOK [button .tMPlayer.bOK -text OK]
    pack $bOK .tMPlayer.$f -side left
    pack propagate .tMPlayer 0
    set wid [winfo id .tMPlayer.$f]

    # have -colorkey match window background
    set channel \
    [open [concat | ../shared/snitMP/mplayer.exe -quiet -idle -slave -vo directx -colorkey 0xff0000 -wid $wid $args] r+]
    flush $channel
    bind .tMPlayer.$f <Destroy> [subst {
    catch {
    rename .tMPlayer.$f ""
    puts $channel quit
    flush $channel
    close $channel
    }
    }]
    #rename $f "_$f"

    proc $f {cmd args} [subst -nocommand {
    puts \$cmd
    puts \$args
    if {\$cmd eq "cmd"} then {
    puts $channel \$args
    flush $channel
    } else {
    _$f \$cmd [list \$args]
    }
    }]

    This is great - thanks for the leads!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et4@21:1/5 to All on Fri Jul 1 15:06:08 2022
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use
    linux. Many of the functions you might want to use are available through
    their http interface.

    Being an http interface, one could even direct it from another machine.

    I use a portable version, and the documentation for how to control it is
    found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http
    requests to VLC.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Westermeyer@21:1/5 to All on Fri Jul 1 22:05:12 2022
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use
    linux. Many of the functions you might want to use are available through their http interface.

    Being an http interface, one could even direct it from another machine.

    I use a portable version, and the documentation for how to control it is found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http requests to VLC.

    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Alexandru on Sat Jul 2 00:49:06 2022
    Alexandru schrieb am Samstag, 2. Juli 2022 um 09:43:50 UTC+2:
    Westermeyer schrieb am Samstag, 2. Juli 2022 um 07:05:15 UTC+2:
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use linux. Many of the functions you might want to use are available through their http interface.

    Being an http interface, one could even direct it from another machine.

    I use a portable version, and the documentation for how to control it is found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http requests to VLC.
    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...
    Setting up VLC to accept http requests is rather complicated: Activate http, restart VLC, setup a password...
    As a personal solution no problem. As part of a public software, no go.
    Tcl really lacks a ready to use solution for playing movies in an embeded way.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Westermeyer on Sat Jul 2 00:43:48 2022
    Westermeyer schrieb am Samstag, 2. Juli 2022 um 07:05:15 UTC+2:
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use linux. Many of the functions you might want to use are available through their http interface.

    Being an http interface, one could even direct it from another machine.

    I use a portable version, and the documentation for how to control it is found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http requests to VLC.
    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...

    Setting up VLC to accept http requests is rather complicated: Activate http, restart VLC, setup a password...
    As a personal solution no problem. As part of a public software, no go.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Sat Jul 2 10:36:11 2022
    Am 02.07.22 um 09:49 schrieb Alexandru:
    Alexandru schrieb am Samstag, 2. Juli 2022 um 09:43:50 UTC+2:
    Setting up VLC to accept http requests is rather complicated: Activate http, restart VLC, setup a password...
    As a personal solution no problem. As part of a public software, no go.
    Tcl really lacks a ready to use solution for playing movies in an embeded way.

    The reason is that "playing videos" is a huge and complicated topic. The easiest way to implement this in a cross-platform way would probably be
    ffmpeg. In addition to the technical issues, however, there is an
    enormous legal trap involved. Most video codecs are protected by
    patents, and integrating ffmpeg into some software to play a video
    strictly violates patents and licenses.

    The other solution would be to interface the OSes native video solution,
    which would be possible for Windows and macOS (there is no such thing
    for Linux), and Android. This again means you need to design an
    interface that works for all platforms etc. and lots of work to test this.

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et4@21:1/5 to Westermeyer on Sat Jul 2 02:31:11 2022
    On 7/1/2022 10:05 PM, Westermeyer wrote:
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use
    linux. Many of the functions you might want to use are available through
    their http interface.

    Being an http interface, one could even direct it from another machine.

    I use a portable version, and the documentation for how to control it is
    found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http
    requests to VLC.

    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...

    Christian and Alexandru have excellent points.

    Being retired, I write boss-free dangerous code for my own personal pleasure. With that caveat clearly understood:

    Here's a tk example. The comments show how to get the VLC settings right. If you startup a single VLC with some video, the script has 3 buttons to skip and pause. It uses localhost ip and default port built in is 8080.

    VLC portable (on windows, I don't use on linux) is self contained in it's own directory tree. The config is there, not in some windows directory. That's how it's portable. (I get the win vlc portable from portableapps.com)

    I only run vlc on a fire-walled lan, and so I don't worry about hard-coding in the password, since it's not very secure anyway. Change it below in the argument {password xyz}. Leave username blank.


    # vlc example http
    # console show
    # see this to set config https://wiki.videolan.org/Documentation:Modules/http_intf/
    # for pref's all prefs -> main interfaces -> turn on Web, and enter http as shown

    # Also, under main interfaces -> Lua, under lua http enter a password, example: xyz
    # The username needs to be sent in, but must be blank
    #
    package require http
    package require base64 ;#There's a built-in command now to do this, this code is old

    set playerhost 127.0.0.1
    set port 8080 ;# vlc default

    button .b1 -text "\u2190 3s" -command {skip -1 3} -font {TkDefaultFont 24} button .b2 -text "\u23f8/\u25b6" -command {pause} -font {TkDefaultFont 24} button .b3 -text "3s \u2192" -command {skip 1 3} -font {TkDefaultFont 24}

    pack .b1 .b2 .b3 -fill both -expand true -side left

    proc http_geturl_auth {url {username {}} {password xyz}} { ;# blank user, and password xyz
    set auth "Basic [base64::encode $username:$password]"
    set headerl [list Authorization $auth]
    set tok [http::geturl $url -headers $headerl -timeout 200]
    set result [http::data $tok]
    http::cleanup $tok
    # puts "result= |$result| " ;# lots of player status returned here
    return $result
    }
    proc pause {} {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=pl_pause" ;# toggle pause/play
    }

    proc skip {direction secs} {
    if { $direction < 0 } {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=-${secs}s"
    } else {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=%2B${secs}s"
    }
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Westermeyer@21:1/5 to All on Sat Jul 2 06:17:55 2022
    On Saturday, July 2, 2022 at 2:31:16 AM UTC-7, et4 wrote:
    On 7/1/2022 10:05 PM, Westermeyer wrote:
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller
    in tcl/tk for it that runs on windows but I'm sure you could also use
    linux. Many of the functions you might want to use are available through >> their http interface.

    Being an http interface, one could even direct it from another machine. >>
    I use a portable version, and the documentation for how to control it is >> found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too.

    If you're interested, I can post a bit of the code I use to send http
    requests to VLC.

    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...
    Christian and Alexandru have excellent points.

    Being retired, I write boss-free dangerous code for my own personal pleasure. With that caveat clearly understood:

    Here's a tk example. The comments show how to get the VLC settings right. If you startup a single VLC with some video, the script has 3 buttons to skip and pause. It uses localhost ip and default port built in is 8080.

    VLC portable (on windows, I don't use on linux) is self contained in it's own directory tree. The config is there, not in some windows directory. That's how it's portable. (I get the win vlc portable from portableapps.com)

    I only run vlc on a fire-walled lan, and so I don't worry about hard-coding in the password, since it's not very secure anyway. Change it below in the argument {password xyz}. Leave username blank.


    # vlc example http
    # console show
    # see this to set config https://wiki.videolan.org/Documentation:Modules/http_intf/
    # for pref's all prefs -> main interfaces -> turn on Web, and enter http as shown

    # Also, under main interfaces -> Lua, under lua http enter a password, example: xyz
    # The username needs to be sent in, but must be blank
    #
    package require http
    package require base64 ;#There's a built-in command now to do this, this code is old

    set playerhost 127.0.0.1
    set port 8080 ;# vlc default

    button .b1 -text "\u2190 3s" -command {skip -1 3} -font {TkDefaultFont 24} button .b2 -text "\u23f8/\u25b6" -command {pause} -font {TkDefaultFont 24} button .b3 -text "3s \u2192" -command {skip 1 3} -font {TkDefaultFont 24}

    pack .b1 .b2 .b3 -fill both -expand true -side left

    proc http_geturl_auth {url {username {}} {password xyz}} { ;# blank user, and password xyz
    set auth "Basic [base64::encode $username:$password]"
    set headerl [list Authorization $auth]
    set tok [http::geturl $url -headers $headerl -timeout 200]
    set result [http::data $tok]
    http::cleanup $tok
    # puts "result= |$result| " ;# lots of player status returned here
    return $result
    }
    proc pause {} {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=pl_pause" ;# toggle pause/play
    }

    proc skip {direction secs} {
    if { $direction < 0 } {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=-${secs}s"
    } else {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=%2B${secs}s"
    }
    }

    Thanks very much for the suggestions, they're more than I was anticipating. I'm looking for a solution that is cross-platform and part of an educational package, so widely available. I'm not trained as a computer scientist, so I find that Tcl/Tk a bit
    overwhelming, but it becomes a bit much when the solution looks to involve sophisticated C programming (the cffi package looks promising, and might be a solution, thanks Ashok!).
    The closest that I've come to a solution is simply using the default movie player on the user's machine, and this is launched with either auto_execok (win), open (mac), or xdg-open (linux). While not elegant, it is strangely robust...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et4@21:1/5 to Westermeyer on Sat Jul 2 10:46:19 2022
    On 7/2/2022 6:17 AM, Westermeyer wrote:

    The closest that I've come to a solution is simply using the default movie player on the user's machine, and this is launched with either auto_execok (win), open (mac), or xdg-open (linux). While not elegant, it is strangely robust...

    Seems like an acceptable solution to me :)

    I mentioned VLC because it seems to be the most capable free-ware video player. And with the http interface, I've tinkered together a use for my old android phones, a vlc remote using androwish.

    Since you're already launching a player by commandline, you could probably avoid all the config stuff using command line options for the interface and port number. And who knows, maybe some of your users are like me and have VLC as their default video
    player anyway.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Westermeyer@21:1/5 to Westermeyer on Sat Jul 2 10:40:11 2022
    On Saturday, July 2, 2022 at 6:17:58 AM UTC-7, Westermeyer wrote:
    On Saturday, July 2, 2022 at 2:31:16 AM UTC-7, et4 wrote:
    On 7/1/2022 10:05 PM, Westermeyer wrote:
    On Friday, July 1, 2022 at 3:06:13 PM UTC-7, et4 wrote:
    If you don't mind running an external program to handle the video, I
    would recommend the VLC media player. I've written a remote controller >> in tcl/tk for it that runs on windows but I'm sure you could also use >> linux. Many of the functions you might want to use are available through
    their http interface.

    Being an http interface, one could even direct it from another machine. >>
    I use a portable version, and the documentation for how to control it is
    found in the readme here:

    C:\PortableApps\VLCPortable\App\vlc\lua\http\requests\readme.txt

    I wrote mine long ago, and I forget some details. You would have to
    enable the http interface and I think you need to set a password too. >>
    If you're interested, I can post a bit of the code I use to send http >> requests to VLC.

    That''s a pretty interesting approach, using the portable version might mean a cross-platform solution - I'd be interested to see your code...
    Christian and Alexandru have excellent points.

    Being retired, I write boss-free dangerous code for my own personal pleasure. With that caveat clearly understood:

    Here's a tk example. The comments show how to get the VLC settings right. If you startup a single VLC with some video, the script has 3 buttons to skip and pause. It uses localhost ip and default port built in is 8080.

    VLC portable (on windows, I don't use on linux) is self contained in it's own directory tree. The config is there, not in some windows directory. That's how it's portable. (I get the win vlc portable from portableapps.com)

    I only run vlc on a fire-walled lan, and so I don't worry about hard-coding in the password, since it's not very secure anyway. Change it below in the argument {password xyz}. Leave username blank.


    # vlc example http
    # console show
    # see this to set config https://wiki.videolan.org/Documentation:Modules/http_intf/
    # for pref's all prefs -> main interfaces -> turn on Web, and enter http as shown

    # Also, under main interfaces -> Lua, under lua http enter a password, example: xyz
    # The username needs to be sent in, but must be blank
    #
    package require http
    package require base64 ;#There's a built-in command now to do this, this code is old

    set playerhost 127.0.0.1
    set port 8080 ;# vlc default

    button .b1 -text "\u2190 3s" -command {skip -1 3} -font {TkDefaultFont 24} button .b2 -text "\u23f8/\u25b6" -command {pause} -font {TkDefaultFont 24} button .b3 -text "3s \u2192" -command {skip 1 3} -font {TkDefaultFont 24}

    pack .b1 .b2 .b3 -fill both -expand true -side left

    proc http_geturl_auth {url {username {}} {password xyz}} { ;# blank user, and password xyz
    set auth "Basic [base64::encode $username:$password]"
    set headerl [list Authorization $auth]
    set tok [http::geturl $url -headers $headerl -timeout 200]
    set result [http::data $tok]
    http::cleanup $tok
    # puts "result= |$result| " ;# lots of player status returned here
    return $result
    }
    proc pause {} {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=pl_pause" ;# toggle pause/play
    }

    proc skip {direction secs} {
    if { $direction < 0 } {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=-${secs}s"
    } else {
    http_geturl_auth "http://$::playerhost:$::port/requests/status.xml?command=seek&val=%2B${secs}s"
    }
    }
    Thanks very much for the suggestions, they're more than I was anticipating. I'm looking for a solution that is cross-platform and part of an educational package, so widely available. I'm not trained as a computer scientist, so I find that Tcl/Tk a bit
    overwhelming, but it becomes a bit much when the solution looks to involve sophisticated C programming (the cffi package looks promising, and might be a solution, thanks Ashok!).
    The closest that I've come to a solution is simply using the default movie player on the user's machine, and this is launched with either auto_execok (win), open (mac), or xdg-open (linux). While not elegant, it is strangely robust...

    #!/bin/sh
    # -*- tcl -*-
    # The next line is executed by /bin/sh, but not tcl \
    exec tclsh "$0" ${1+"$@"}

    package require Tk

    button .b -text "Launch Video" -command playMovie
    button .c -text "Exit" -command exit

    proc playMovie {} {

    global tcl_platform

    if {$tcl_platform(platform) eq "windows"} {

    set filename "C:\\Users\\ssche\\Dropbox\\Videos\\Mp4\\test.mp4"
    set command [list {*}[auto_execok start] {}]

    } elseif {$tcl_platform(os) eq "Darwin"} {

    set filename "/Users/stephenscherer/Dropbox/Videos/Mp4/test.mp4"
    set command [list open]

    } else {

    set filename "/home/stephen/Dropbox/Videos/Ogg/test.ogg"
    set command [list xdg-open]

    }

    exec {*}$command $filename &

    }

    pack .b
    pack .c

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to Westermeyer on Tue Jul 5 09:58:55 2022
    On Monday, June 27, 2022 at 10:25:19 PM UTC-7, Westermeyer wrote:
    Hello All,

    I've got a question about the MPV video player and possible Tk bindings...

    From their page, there is a link to the language bindings: https://github.com/mpv-player/mpv/wiki/Language-bindings

    Would it be possible to implement a player in Tcl/Tk?

    Thanks
    the educational solution you seem to be seeking is an all tcl\tk training solution which can be seen at www.verbaltransacrions.com. It leverages the simulation training package developed by Advertech, Ltd. It provides for the needs you have described
    including a video widget, embeddable StroyLine, and browser. Additionally, an of particular relevance, it has been in trial at Microsoft, globally.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)