Highlights
- Pro
Pinned Loading
-
How to display opencv video in pyqt ...
How to display opencv video in pyqt apps 1The code for this tutorial is [here](https://github.com/docPhil99/opencvQtdemo)
23Opencv provides are useful, but limited, method of building a GUI. A much more complete system could be acheived using pyqt.
4The question is, how do we display images. There are quite a few possible routes but perhaps the easiest is to use `QLabel` since it has a `setPixmap` function. Below is some code that creates two labels. It then creates a grey pixmap and displays it one of the labels. [code: staticLabel1.py](https://github.com/docPhil99/opencvQtdemo/blob/master/staticLabel1.py)
5 -
Mac webcam FFmpeg
Mac webcam FFmpeg 1#Capture and stream a webcam
2To capture using the iSight camera on a Mac, or infact any other webcam connected to the Mac, we can use FFmpeg. First get a list of the devices installed.
34```
5ffmpeg -f avfoundation -list_devices true -i ""
-
-
How to write lossless video in Python
How to write lossless video in Python 1OpenCV does a reasonable job of reading videos from file or webcams. It's simple and mostly works. When it comes to writing videos,
2it however leaves a lot to be desired. There is little control over the codecs and it is almost impossible to know which codecs are installed. It also wants to know things like the frame size at intailisation. This isn't always a problem, but if you don't know it yet it means you have to set up the video writer inside your main processing loop.
34To make something as cross-platform compatible as possible it would be nice to use FFmpeg. There are a few python wrappers around, but as far as I can tell they are mainly used for transcoding type applications. One solution is run FFmpeg as a subprocess and set its input to accept a pipe. Then every video frame is passed through the pipe. You write this yourself, in fact it's only a few lines of code. However, the [scikit-video](http://www.scikit-video.org/stable/index.html) package will do this for us, with some nice boilerplate to make life easier.
5
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.