Ticket Hash: | d2c58a74223093636b06ec2d7e6636bdb951e690 | ||
Title: | jsmpeg w/ Raspbian 9.0 undroidwish-e5dc71ed9d-raspi fails with error | ||
Status: | Review | Type: | Code_Defect |
Severity: | Important | Priority: | Immediate |
Subsystem: | Resolution: | Open | |
Last Modified: |
2019-09-08 19:21:19 5.63 years ago |
Created: |
2019-08-11 20:24:03 5.71 years ago |
Version Found In: | undroidwish-e5dc71ed9d-raspi |
User Comments: | ||||
anonymous added on 2019-08-11 20:24:03:
I am attempting to get the jsmpeg working in Raspbian. I originally attempted to compile it (single core RP1 at 700mhz...2 days compile time :) ). Both that one and undroidwish-e5dc71ed9d-raspi return the following error: root@raspberrypi:~# SDL_VIDEODRIVER=jsmpeg ./undroidwish-e5dc71ed9d-raspi builtin:widget -sdlwidth 800 -sdlheight 600 CRITICAL: Couldn't initialize SDL: jsmpeg not available CRITICAL: application-specific initialization failed: couldn't connect to display ":0.0" CRITICAL: Error in startup script: package "Tk" isn't loaded statically while executing "load {} Tk" ("package ifneeded Tk 8.6.9" script) invoked from within "package require Tk 8.5" (file "/root/undroidwish-e5dc71ed9d-raspi/sdl2tk8.6/demos/widget" line 13) invoked from within "source [file dirname [info script]]/sdl2tk8.6/demos/widget" (file "/root/undroidwish-e5dc71ed9d-raspi/widget" line 1) Am I missing dependencies or does jsmpeg not work in raspi undroidwish? Thanks, Bill chw added on 2019-08-12 05:58:32: On Debian 9 and 10 based systems a apt-get install libavcodec-extra57 should pull in the required runtime dependencies. For recompiling undroidwish additional development packages may be required, e.g. apt-get install libavcodec-dev libswscale-dev However, I bet you will not be happy with the jsmpeg video driver on a single core Raspberry since it simply has not enough horse power for realtime mpeg coding ("The discovery of slowness"). And even a four cylinder RPI 3B+ doesn't feel exactly snappy. anonymous added on 2019-08-22 01:50:26: Hmm..seems like same error after adding libavcodec-extra57 root@tardus:~# lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 9.4 (stretch) Release: 9.4 Codename: stretch root@tardus:~# cat /etc/debian_version 9.4 root@tardus:~# dpkg -l libavcodec-extra57 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii libavcodec-ext 7:3.2.14-1~d armhf FFmpeg library with additional de root@tardus:~# SDL_VIDEODRIVER=jsmpeg ./undroidwish-65f348db8d-raspi builtin:widget -sdlwidth 800 -sdlheight 600 CRITICAL: Couldn't initialize SDL: jsmpeg not available CRITICAL: application-specific initialization failed: couldn't connect to display ":0.0" CRITICAL: Error in startup script: package "Tk" isn't loaded statically while executing "load {} Tk" ("package ifneeded Tk 8.6.8" script) invoked from within "package require Tk 8.5" (file "/root/undroidwish-65f348db8d-raspi/sdl2tk8.6/demos/widget" line 13) invoked from within "source [file dirname [info script]]/sdl2tk8.6/demos/widget" (file "/root/undroidwish-65f348db8d-raspi/widget" line 1) anonymous added on 2019-08-22 02:35:02: Still trying to get this to work. Based on "Windows, the required DLLs are avutil-56.dll, avcodec-58.dll, swresample-3.dll, and swscale-5.dll " I was wondering if the raspbian versions needed the same versions of libraries as mentioned above. My debian 9 stretch has: i A libavutil55 i libavcodec-extra57 i A libswresample2 i A libswscale4 and i A libsdl2-2.0-0 I still think CRITICAL: Couldn't initialize SDL: jsmpeg not available means something important. I can do a ssh -X, tchsh8.5, package require Tk without getting the "CRITICAL: Error in startup script: package "Tk" isn't loaded statically" error. I think this must have to do with SDL failing to setup the frame buffer for undroidwish. Ideas? chw added on 2019-08-22 04:12:25: The relevant code is in .../jni/SDL2/src/video/jsmpeg/SDL_jsmpeg.c, see [6bb638e594b9e24a] where you can find the names of the shared libraries. Try to start the undroidwish with the additional command line option "-sdllog 1" in order to see more error messages. However, the smallest Raspi I ever tried was a Raspi Zero. anonymous added on 2019-09-07 23:11:50: Ok, so I got it to work, thanks for the assistance. My solution (I had a stock raspbian stretch) was to "apt-get update" then "apt-get upgrade". Then the "./undroidwish-e5dc71ed9d-raspi builtin:widget -sdllog 1 -sdlwidth 800 -sdlheight 600" worked. From another host I could open my browser to "http://<raspiip>:8080" worked to show the widget demos. Results: - cursor tracking is abysmally slow - window/graphic updates arent that bad So if the cursor tracking issue was faster maybe with a local cursor and the remote hidden, I think it would be functional. This is a GREAT solution because the application can be fully developed on my desktop and then exported via jsmpeg to a web browser. This is AWESOME. Forget most web technologies, just stick with plain jane tcl/tk. So, what to do or random ideas about professionalizing / productizing this prototype. - any other options than jsmpeg. I've thought Xvnc + a javascript browser hosted vncviewer might be another method? This means no code change to undroidwish and the solution would work for other apps. vnc has some good encodings that make full desktop remote access quick over my slow cellular vpn'ized connection. - fix the local cursor vs remote cursor to make jsmpeg undroidwish viable - make this tie into other browsers to allow user/password logins, ssl, ... - Must handle resizing to the size of the broweser window...the inbetween SDL and jsmpeg or vnc are the tough parts...if wish gets a window resize and we're using pack, the gui fixes itself. - I had a bunch of other ideas 2 weeks ago. This ticket is probably closeable. Anyone want to try to make this into a valid solution for web development. It is sooo simple compared to making an web browser/html/framework/javascript/lots of diff browsers do something simple like "put 3 buttons on the screen, when a button is clicked, switch my NAT based router to drop one cell tether and switch to a different cell, while keeping bytes used in a persistent sqlite3 db to make sure each cell is not wiped out, while watching all MAC addresses on this wifi network to block anything that hasnt been previously allowed". Like 3 hours in tcl, like 3 months in html/javascript/... (use vtcl to gen a gui and 10 mins and then plugin the functional tcl to complete...perhaps 1 to 2 hours) Hoping someone wants to push this forward, Bill chw added on 2019-09-08 09:19:40: Bill, thanks for your comments and ideas and of course for verifying the jsmpeg driver on a Raspi. Let's keep the ticket still open and see if even more thoughts come up. Agreed, VNC technology might be more appropriate on slow devices w.r.t. round trip times and overall requirements especially computing power. However, VNC is a GPL minefield. I'm afraid using libvncserver even when run-time linked by an SDL video driver could put the entire piece of art under the GPL. I wish there were a BSD licensed alternative. anonymous added on 2019-09-08 19:21:19: So I was going to do my budget today. I needed something to avoid doing that. Spent some time on the net looking for any time of remote desktop protocol that has a BSD license. I didn't find much. So to compile it into undroidwish, it has to be BSD. Correct? Can undroidwish dynamically load non-BSD licensed libraries and use those? Is that good enough? Here is random stuff I found that might help: https://www.spice-space.org/faq.html Under what license is Spice distributed? Most of Spice sources are distributed under GPL v2. For some exceptions the project uses LGPL or BSD style licenses. Documents are distributed under Creative Commons Attribution-Share Alike 3.0 license. (no idea what that means or if the code that could be a simple server / javascript/HTML5 client could be BSD or not) https://www.uvnc.com/ site describes licensing well (1) GPL doesn't allow bunding of GPL and non GPL software. If you want to use Ultra VNC or Ultra VNC SC in combination with a commercial software you need to create a seperate installer or let your installer download Ultra VNC. PcHelpware or con2me can be bundled without restriction. https://www.uvnc.com/license.html The problem in relation to undroidwish is that pchelpware appears to be Windows only. What has PCHelpWare in common with UltraVNC "Single click" ? PCHelpware has been made compatible with the helpdesk.txt (UltraVNC SC custom.zip file). But internally, all has been rewritten from scratch to be able to easily handle encryption, unicode and intel performance libraries. PCHelpWare capture, display and communication engine comes from a commercial real time remote screen application... it has his own protocole and is not compatible with UltraVNC or any other VNC flavor To use PCHelpware you need to use both its server and viewer https://github.com/novnc/noVNC HTML5 VNC client, kinda claims Mozilla but also has BSD mentions. Wonder if this could be used and would be 1/2 the problem (vnc client) https://github.com/novnc/noVNC/blob/master/LICENSE.txt .NET C# VNC client/server w/ BSD license https://www.zer7.com/software/remoteviewing how hard is a port I dont understand this but hmm.. https://github.com/cedrozor/myrtille https://en.wikipedia.org/wiki/Comparison_of_remote_desktop_software x2x but this is only mouse and keyboard https://github.com/GothAck/javascript-x-server LICENSE Added FreeBSD Simplified license https://github.com/ttaubert/x-server-js/blob/master/LICENSE MIT license Could this be used to connect to the other protocols without violating licenses? https://github.com/araujobsd/libhyve-remote https://guacamole.apache.org/ apache license 2.0 Can't procrastinate anymore...back to the budget. Bill |