Posts: 1,027
Threads: 16
Joined: Dec 2016
It also depends on the operating system.
Pyqt5 / PySide2 or Gtk3 with python.
Look at at python-mpv
There are examples for embedding in a widget and using playlists.
Posts: 18
Threads: 3
Joined: Feb 2021
TY for info and links!
I will check out both.
My os is Mint 20
Posts: 1,027
Threads: 16
Joined: Dec 2016
(Feb-17-2021, 12:54 PM)rfeyer Wrote: My os is Mint 20
I use that too. I used python-mpv for a live stream TV player
https://github.com/Axel-Erfurt/LiveStrea...er-Deutsch
Posts: 18
Threads: 3
Joined: Feb 2021
Great!
So, python-MPV will allow me to create a GUI, usable over LAN and possibly Web?
I will look at python-MPV after chores! TY
Posts: 1,027
Threads: 16
Joined: Dec 2016
If you want to display a webcam or wifi camera, a browser widget is sufficient.
I use this to show 2 Cameras,
from PyQt5.QtWidgets import QWidget, QMainWindow, QApplication, QHBoxLayout
from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebEngineView
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.setWindowTitle("Camera")
self.setGeometry(0, 28, 700, 300)
self.centralWidget = QWidget(self)
self.webView = QWebEngineView()
self.webView.setUrl(QUrl("http://192.168.2.103:4747/video"))
self.webView2 = QWebEngineView()
self.webView2.setUrl(QUrl("http://192.168.2.112:4747/video"))
self.wid = QWidget()
self.hbox = QHBoxLayout()
self.hbox.addWidget(self.webView)
self.hbox.addWidget(self.webView2)
self.wid.setLayout(self.hbox)
self.setCentralWidget(self.wid)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
win = MainWindow()
win.show()
sys.exit(app.exec_())
Posts: 18
Threads: 3
Joined: Feb 2021
Hey - that is something I can explore! Ty for that!
I actually found something this morning: the tkinter is single threaded, so, I will have to explore how to do multi threading!
However, pyQT5 may do this inherently?
Posts: 18
Threads: 3
Joined: Feb 2021
Hi all,
my little program actually seems to work - fast over Ethernet, not so fast over WiFi.
But, it controls and views clips and images produced by motion, and it allows for moving (archiving), copying, and deleting images or clips.
If it is OK, I would like to post the whole thing either for comments or suggestions. And,if anyone thinks it's usable, go ahead, use.
Is it OK to post here?
Posts: 3,458
Threads: 101
Joined: Sep 2016
Sure. If it's on github, a link to the repo is also fine.
Posts: 18
Threads: 3
Joined: Feb 2021
(Mar-07-2021, 12:49 PM)rfeyer Wrote: Hi all,
my little program actually seems to work - fast over Ethernet, not so fast over WiFi.
But, it controls and views clips and images produced by motion, and it allows for moving (archiving), copying, and deleting images or clips.
If it is OK, I would like to post the whole thing either for comments or suggestions. And,if anyone thinks it's usable, go ahead, use.
Is it OK to post here?
I will try to figure out how to do it with GitHub. I would be a bit embarrassed because it is not much, and I am certainly not able to give people great insight since I am new to Python. Still do it?
The code is 240+ lines - I can insert it into here also? I am not looking for fame and certainly not money, just hoping someone else can also use it who uses motion durveillance.
Rainer
|