Looks like tkvideo is not running on Win 10 64bit (error below)
Does this mean, I must compile myself?
Is there another source for the compiled version other than http://patthoyts.tk/tkvideo/?
Is there another package that can play video inside a Tcl/Tk widget?
Thanks
Alexandru
---------------------------
Error in startup script
---------------------------
couldn't load library "C:/Tcl/lib/tkvideo140/tkvideo140.dll": Bad exe format. Possibly a 32/64-bit mismatch.
while executing
"load C:/Tcl/lib/tkvideo140/tkvideo140.dll"
("package ifneeded tkvideo 1.4.0" script)
invoked from within
"package require tkvideo 1.4.0"
(file "C:/Tcl/lib/tkvideo140/demos/demo.tcl" line 12)
invoked from within
"source [file join $::starkit::topdir demos demo.tcl]"
invoked from within
"if {[starkit::startup] ne "sourced"} {
source [file join $::starkit::topdir demos demo.tcl]
}"
(file "C:\Tcl\lib\tkvideo140\main.tcl" line 2) ---------------------------
OK
---------------------------
Howdy Alexandru,
guess you're searching for video playback only.
This might do the job: https://github.com/ray2501/tkvlc
And this would be interesting, too: https://github.com/ray2501/tcl-opencv
it you manage to build it on Windows.
BR,
Christian
I couldn't find any precompiled package of tkvlc.
Compiling seems to require the libVLC SDk, which I also couldn't find.
At least not in 10 min of internet search.
Any hidden links?
BTW, I've demo'ed tkvlc on EuroTcl 2019, see https://youtu.be/kBn_oGdA4jE?t=779Incredible demo! Nice work.
Alexandru schrieb am Montag, 24. Januar 2022 um 22:58:25 UTC+1:
I couldn't find any precompiled package of tkvlc.A fossil clone of www.androwish.org has the tkvlc source in the .../undroid/tkvlc directory.
Compiling seems to require the libVLC SDk, which I also couldn't find.
At least not in 10 min of internet search.
Any hidden links?
It contains a compat directory with required VLC headers and builds tkvlc to runtime link VLC libraries which you need to install separately.
Good luck,
Christian
PS: alternatively, extract the matching tkvlc.dll from a vanillawish binary of 2019 using 7z. In any case, you need a separate VLC install for this extension.
Christian Werner schrieb am Dienstag, 25. Januar 2022 um 08:08:53 UTC+1:
Alexandru schrieb am Montag, 24. Januar 2022 um 22:58:25 UTC+1:
I couldn't find any precompiled package of tkvlc.A fossil clone of www.androwish.org has the tkvlc source in the .../undroid/tkvlc directory.
Compiling seems to require the libVLC SDk, which I also couldn't find.
At least not in 10 min of internet search.
Any hidden links?
It contains a compat directory with required VLC headers and builds tkvlc to runtime link VLC libraries which you need to install separately.
Good luck,
Christian
PS: alternatively, extract the matching tkvlc.dll from a vanillawish binary of 2019 using 7z. In any case, you need a separate VLC install for this extension.
I guess, the need for a VLC install is the party braker for me.
So currently there is no precompiled, stand alone package that can play videos for TCL, right?
I guess, ffmpeg is an option after all.
So the idea with ffmpeg would be to extract the single frames from the video and than display them in a cycle inside a tk widget?
Am 28.01.22 um 14:19 schrieb Alexandru:
Christian Werner schrieb am Dienstag, 25. Januar 2022 um 08:08:53 UTC+1:
Alexandru schrieb am Montag, 24. Januar 2022 um 22:58:25 UTC+1:
I couldn't find any precompiled package of tkvlc.A fossil clone of www.androwish.org has the tkvlc source in the .../undroid/tkvlc directory.
Compiling seems to require the libVLC SDk, which I also couldn't find. >>> At least not in 10 min of internet search.
Any hidden links?
It contains a compat directory with required VLC headers and builds tkvlc to runtime link VLC libraries which you need to install separately.
Good luck,
Christian
PS: alternatively, extract the matching tkvlc.dll from a vanillawish binary of 2019 using 7z. In any case, you need a separate VLC install for this extension.
I guess, the need for a VLC install is the party braker for me.Maybe you could ship an mplayer or ffmpeg binary? They are comparatively small / standalone. Under Linux, there is an option to make mplayer
So currently there is no precompiled, stand alone package that can play videos for TCL, right?
render into a Tk container frame (option -wid), however I fear that this
does not work on Windows.
https://wiki.tcl-lang.org/page/How+to+embed+a+non-Tk+GUI+into+a+Tk+frame
Christian
Am 28.01.22 um 15:45 schrieb Alexandru:
I guess, ffmpeg is an option after all.
So the idea with ffmpeg would be to extract the single frames from the
video and than display them in a cycle inside a tk widget?
That could work, but only for rather small videos, due to the overhead
of transferring the data to disk, then Tk, then to the screen...
The idea was rather to tell ffmpeg to play the video (ffplay) to the
screen. Then you just need a way to reposition or reparent the playback window. Maybe TWAPI can do that or ffmpeg hsa some kind of slave mode.
Am 28.01.22 um 15:45 schrieb Alexandru:
I guess, ffmpeg is an option after all.That could work, but only for rather small videos, due to the overhead
So the idea with ffmpeg would be to extract the single frames from the video and than display them in a cycle inside a tk widget?
of transferring the data to disk, then Tk, then to the screen...
The idea was rather to tell ffmpeg to play the video (ffplay) to the
screen. Then you just need a way to reposition or reparent the playback window. Maybe TWAPI can do that or ffmpeg hsa some kind of slave mode.
Christian
Looks like tkvideo is not running on Win 10 64bit (error below)
Does this mean, I must compile myself?
Is there another source for the compiled version other than http://patthoyts.tk/tkvideo/?
Is there another package that can play video inside a Tcl/Tk widget?
Thanks
Alexandru
---------------------------
Error in startup script
---------------------------
couldn't load library "C:/Tcl/lib/tkvideo140/tkvideo140.dll": Bad exe format. Possibly a 32/64-bit mismatch.
while executing
"load C:/Tcl/lib/tkvideo140/tkvideo140.dll"
("package ifneeded tkvideo 1.4.0" script)
invoked from within
"package require tkvideo 1.4.0"
(file "C:/Tcl/lib/tkvideo140/demos/demo.tcl" line 12)
invoked from within
"source [file join $::starkit::topdir demos demo.tcl]"
invoked from within
"if {[starkit::startup] ne "sourced"} {
source [file join $::starkit::topdir demos demo.tcl]
}"
(file "C:\Tcl\lib\tkvideo140\main.tcl" line 2)
---------------------------
OK
---------------------------
Speaking of performance:rederer..
The process in my case is:
1. Download the video using http::get
2. Play the video in a separate ttk::frame or toplevel together with other widgets such as pictures and text.
Other way to see it: I need tooltips that can show web content.
The idea of using an html parser/renderer also came to my mind (http://tkhtml.tcl.tk/index.html). But since I only need simple tooltips consisting of few images, text and videos, a direct implementation would be more light than a full blown html
Or even not: MPlayer can also play a video directly from an HTTP server,
so if you tell it to open something like
http://myserver.de/path/tovideo.mp4 on your own server then it will play
the video instantly, i.e. stream it from the URL.
Christian
I have been down this road. MCI doesn't work either
The most straight forward solution begins with: http://www.mplayerhq.hu/design7/dload.html
MPlayer files in the the directory referenced in the command line. You can save them whereever. Also, download the 'slave' documentation.
Please don't laugh at my code.
Rick
proc mplayer {f args} {
set options {-width 940 -height 788}
while {[string match -* $args]} {
if {[lindex $args 0] eq "--"} then {
set args [lrange $args 1 end]
break
} else {
set args [lassign $args key val]
dict set options $key $val
}
}
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]
}
}]
bind .tMPlayer.$f <1> [list focus .tMPlayer.$f]
bind .tMPlayer.$f <Map> [list focus .tMPlayer.$f]
bind .tMPlayer.$f <space> "$f cmd pause"
bind $f <Return> "$f cmd pt_step 1"
bind $f <less> "$f cmd pt_step -1"
bind $f <Right> "$f cmd seek 10"
bind $f <Left> "$f cmd seek -10"
bind $f <Down> "$f cmd seek -100"
bind $f <Up> "$f cmd seek 100"
bind .tMPlayer.$f <question> "$f cmd osd_show_progression"
bind $f 9 "$f cmd volume -1"
bind $f 0 "$f cmd volume 1"
puts "[set f]"
}
toplevel .tMPlayer -background #0000ff -width 1000 -height 900
mplayer movieplayer
movieplayer cmd loadfile http or your file name.mp4
update
Or even not: MPlayer can also play a video directly from an HTTP server,
so if you tell it to open something like http://myserver.de/path/tovideo.mp4 on your own server then it will play the video instantly, i.e. stream it from the URL.
ChristianOh, that's key information. I'm starting to like mplayer.
Thanks!
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 07:43:04 |
| Calls: | 12,100 |
| Calls today: | 8 |
| Files: | 15,003 |
| Messages: | 6,517,934 |
| Posted today: | 1 |