Python Forum
mpv window freeze before video end
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mpv window freeze before video end
#11
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.
Reply
#12
TY for info and links!
I will check out both.
My os is Mint 20
Reply
#13
(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
Reply
#14
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
Reply
#15
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_())
Reply
#16
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?
Reply
#17
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?
Reply
#18
Sure. If it's on github, a link to the repo is also fine.
Reply
#19
(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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to call and focus any popup window outside of the main window app? Valjean 6 1,788 Oct-02-2023, 04:11 PM
Last Post: deanhystad
  Tkinter + Multiprocessing startmap makes UI Freeze sunny9495 4 1,400 Nov-13-2022, 12:49 PM
Last Post: sunny9495
  Pyspark Window: perform sum over a window with specific conditions Shena76 0 1,180 Jun-13-2022, 08:59 AM
Last Post: Shena76
  Install Python 3.8 for EduPython and Cx-Freeze mederic39 1 1,795 Jul-24-2020, 01:24 PM
Last Post: Larz60+
  Cx Freeze to exe - HELP WBPYTHON 5 3,877 Apr-09-2020, 01:34 PM
Last Post: WBPYTHON
  A software freeze ! HELP ! redorc15 1 1,793 Oct-10-2019, 10:54 PM
Last Post: Larz60+
  cx-Freeze exe doesn't work ammann 1 4,319 Mar-19-2018, 10:58 AM
Last Post: buran
  Pyusb freeze when using Dev.read(nr,nr,timeout=1000) bojane 3 7,539 Jan-11-2017, 10:17 AM
Last Post: bojane

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020