neuralnine / vidstream Goto Github PK
View Code? Open in Web Editor NEWStreaming video data via networks
Home Page: https://pypi.org/project/vidstream/
License: MIT License
Streaming video data via networks
Home Page: https://pypi.org/project/vidstream/
License: MIT License
Any way to stream specific window name?
and is there a way to simply make the remote stream control the mouse movement and clicks?
it doesn't work on linux it teling me to install python-tk ad python-dev using the apt package manager but i'm in arch linux sooo i try pacman to install these dependencies but there isn't please give a solution because i'm using your module on my project
Thanks
Sharing screen on Operating systems like Fedora 33 (Workstation Edition) that use wayland windowing system doesn't work.
when i tried run client.py i get this error:
raise NotImplementedError('"scrot" must be installed to use screenshot functions in Linux. Run: sudo apt-get install scrot')
how ever i fixed this issue by installing scrot-0.8-21.x86_64.rpm
but screen share just give me black screen,
then i notice Wayland appears to break every screenshot application except gnome-screenshot for backend because of "Security".
is it good idea to add new shutter system specific for wayland ?
I am using python 3.9.1, already installed cpp tools
(c) Microsoft Corporation. Tutti i diritti sono riservati.
C:\Users\Paolo>pip install vidstream
Collecting vidstream
Using cached vidstream-0.0.14-py3-none-any.whl (8.0 kB)
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Collecting opencv-python
Using cached opencv_python-4.5.2.52-cp39-cp39-win_amd64.whl (34.7 MB)
Requirement already satisfied: pyautogui in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from vidstream) (0.9.52)
Requirement already satisfied: numpy>=1.19.3 in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from opencv-python->vidstream) (1.20.3)
Requirement already satisfied: pymsgbox in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyautogui->vidstream) (1.0.9)
Requirement already satisfied: PyTweening>=1.0.1 in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyautogui->vidstream) (1.0.3)
Requirement already satisfied: pyscreeze>=0.1.21 in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyautogui->vidstream) (0.1.26)
Requirement already satisfied: pygetwindow>=0.0.5 in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyautogui->vidstream) (0.0.9)
Requirement already satisfied: mouseinfo in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyautogui->vidstream) (0.1.3)
Requirement already satisfied: pyrect in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pygetwindow>=0.0.5->pyautogui->vidstream) (0.1.4)
Requirement already satisfied: pyperclip in c:\users\paolo\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from mouseinfo->pyautogui->vidstream) (1.8.2)
Using legacy 'setup.py install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio, opencv-python, vidstream
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Paolo\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Paolo\\AppData\\Local\\Temp\\pip-install-b7zq22gv\\pyaudio_b830f3e2b0944c3fa8d74d92980fd2ce\\setup.py'"'"'; __file__='"'"'C:\\Users\\Paolo\\AppData\\Local\\Temp\\pip-install-b7zq22gv\\pyaudio_b830f3e2b0944c3fa8d74d92980fd2ce\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Paolo\AppData\Local\Temp\pip-record-cgki3q6_\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Paolo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyaudio'
cwd: C:\Users\Paolo\AppData\Local\Temp\pip-install-b7zq22gv\pyaudio_b830f3e2b0944c3fa8d74d92980fd2ce\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1264.0_x64__qbz5n2kfra8p0\include\pyconfig.h(117): warning C4005: 'MS_WIN64': ridefinizione macro
src/_portaudiomodule.c: note: vedere la precedente definizione di 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Non Š possibile aprire il file inclusione: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Paolo\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Paolo\\AppData\\Local\\Temp\\pip-install-b7zq22gv\\pyaudio_b830f3e2b0944c3fa8d74d92980fd2ce\\setup.py'"'"'; __file__='"'"'C:\\Users\\Paolo\\AppData\\Local\\Temp\\pip-install-b7zq22gv\\pyaudio_b830f3e2b0944c3fa8d74d92980fd2ce\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Paolo\AppData\Local\Temp\pip-record-cgki3q6_\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Paolo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the 'C:\Users\Paolo\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
C:\Users\Paolo>
``` THE ERROR CHANGED
Hey so I've been experimenting with this module. It's honestly great but the screen sharing window is too small. Is their an option to maybe resize it? Make it bigger? Thanks in advance!
The weird thing is, if my computer streams its screen to the laptop it works fine(on localhost (the computer) it also works fine with itself both ways(server and client)). But when I reverse it (so the laptop streams its screen to the computer) it suddenly doesnt work anymore and i get the folowing error:
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I know this is a very general and non specific error but I still would like to know if more people have problems with the usage of vidstream or have tips.
IMPORTANT NOTE: I did use pyinstaller for my laptop (since it does not have python or any packages related to python) to turn it into an exe (with hidden_imports enabled, so that is not the problem). Firewall is also disabled so the problem also doenst lay there. The .exe does work both ways on localhost. Update: after installing python3.9, newest version on pycharm, pyaudio, vidstream on laptop and just running client/sender.py it still won't send that way but does send it other way. So it has nothing to do with pyinstaller or converting it to exe.
TLDR;
Timeout occurs when client runs vidstream client.py and tries to stream screen to server.But it does work the other way around so that the client runs server.py and server runs client.py (so that the server streams is screen, but the other way is what is needed).
I get this error every time i try to connect to a public IP adress, even 127.0.0 doesn't work, I'm trying to make it to work so anyone can use it but so far it only works with private IP adresses
On MacOS there is a limitation: You can't run a gui outside the MAIN Thread. @NeuralNine please find a way to run the the gui in the Main Thread to have compatability with MacOS.
i can't install vidstream i tried to upgrade pip but it did not work.***
There is an error with ubuntu installation using this command:
pip3 install vidstream
I got this output:
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Building wheel for PyTweening (setup.py) ... done
Created wheel for PyTweening: filename=PyTweening-1.0.3-py3-none-any.whl size=3815 sha256=4e313c153b5275cc2ae128cb57bda63b5a1c4956c0cdcb8939615aca0452276d
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/e7/50/20/790fbd95739abfdf0348bef99d5cc0c7c2930a19a91f602ddc
Building wheel for mouseinfo (setup.py) ... done
Created wheel for mouseinfo: filename=MouseInfo-0.1.3-py3-none-any.whl size=10906 sha256=f9ee8e44d222001ec65d06f15870af5f73a7b4469bf717d361cb58abf9130614
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/d1/72/fb/35f403de66285df8ecca7049bcc61bfb57aba0f76d1f08f7eb
Building wheel for pygetwindow (setup.py) ... done
Created wheel for pygetwindow: filename=PyGetWindow-0.0.9-py3-none-any.whl size=11082 sha256=e17303e47a2887373dce782d4715be3502564cbeeec2d3414f0b35de2940508f
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/91/e3/04/184bda98ec7f7d5f0ba1f372bcf7b3ba86325151ae1dd690fe
Building wheel for pymsgbox (PEP 517) ... done
Created wheel for pymsgbox: filename=PyMsgBox-1.0.9-py3-none-any.whl size=7420 sha256=694e43383993f5baa56d1448d313d12f1a534e002f8c282ace2825911d685798
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/91/28/0d/f4eb606d38276836237d6dc2abf094241e6db5682a126e0389
Building wheel for pyscreeze (PEP 517) ... done
Created wheel for pyscreeze: filename=PyScreeze-0.1.27-py3-none-any.whl size=12864 sha256=05e42625d6ec6fde656b867feb05738e66c56d73856abba3c983b2f60219defa
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/f7/91/eb/c0fa176c095c77460a579ef339f24a377474b041e5543d1a00
Building wheel for python3-Xlib (setup.py) ... done
Created wheel for python3-Xlib: filename=python3_xlib-0.15-py3-none-any.whl size=109517 sha256=0859297f444517971f4e69fcdba47467d5d2af7317f47813cac6c279d35aa033
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/46/4e/a7/90774eeed70e4e93598bf4cbb1ef00c56e6bdc0fb99cc4215d
Building wheel for pyperclip (setup.py) ... done
Created wheel for pyperclip: filename=pyperclip-1.8.2-py3-none-any.whl size=11107 sha256=1191ecf648577bb1e43da2a7d277d509320d7b252d5eb3791da39fd7b1b60b8f
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/7f/1a/65/84ff8c386bec21fca6d220ea1f5498a0367883a78dd5ba6122
Building wheel for pyrect (setup.py) ... done
Created wheel for pyrect: filename=PyRect-0.1.4-py2.py3-none-any.whl size=9547 sha256=e7a98c5df0fe3fbd28b7afbef16d682527f3c69dfc5de53f392a2ee19ac771d8
Stored in directory: /home/alyferryhalo/.cache/pip/wheels/d1/e4/47/c62f8291b16b6df7e89ac885881ff71f35ca04c6e384251de9
Successfully built pyautogui PyTweening mouseinfo pygetwindow pymsgbox pyscreeze python3-Xlib pyperclip pyrect
Failed to build pyaudio
Installing collected packages: opencv-python, PyTweening, pyperclip, python3-Xlib, mouseinfo, pyrect, pygetwindow, pymsgbox, pyscreeze, pyautogui, pyaudio, vidstream
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c4urybjp/pyaudio/setup.py'"'"'; file='"'"'/tmp/pip-install-c4urybjp/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-i93v236h/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/alyferryhalo/.local/include/python3.8/pyaudio
cwd: /tmp/pip-install-c4urybjp/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying src/pyaudio.py -> build/lib.linux-x86_64-3.8
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
29 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c4urybjp/pyaudio/setup.py'"'"'; file='"'"'/tmp/pip-install-c4urybjp/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-i93v236h/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/alyferryhalo/.local/include/python3.8/pyaudio Check the logs for full command output.
So I use this:
How can I install vidstream?
I am receiving an error upon install. Anybody know why this is happening and how to fix it?
ERROR:
Command errored out with exit status 1:
command:
'c:\users\USER\appdata\local\programs\python\python38\python.exe' -u -c'import io, os, sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-h69c5cy6\\pyaudio_da82baec7670489bbcc156db2a19a7de\\setup.py'"'"';
__file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-h69c5cy6\\pyaudio_da82baec7670489bbcc156db2a19a7de\\setup.py'"'"';
f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');
code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');
f.close();
exec(compile(code, __file__, '"'"'exec'"'"'))'
install --record 'C:\Users\USER\AppData\Local\Temp\pip-record-3el35qod\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\USER\appdata\local\programs\python\python38\Include\pyaudio'```
I am not able to install this package because of pyaudio error...................
Hi,
I have followed your tutorial on youtube and I have created the sender and receiver files. The test on the local machine is working fine with the private IPv4 number. Sadly I can not get it to work on another Windows machine in the same network. I am getting the following error:
receiver = StreamingServer('192.168.0.39', 5123)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 10049] The requested address is not valid in this context
On the local machine, I used the same IP address for the sender and the receiver and it worked. When connecting to the other machine, I used the local IP as well as the public IP address from the sender machine in the receiver script with the same result.
How can I fix this issue?
When I build an exe with pyinstaller when I have vidstream imported the exe gives errors and quits, when I dont import vidstream everything works perfectly. Any fix for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.