I am starting out on a project in which I need to build a customized annotation tool for movies and video. Some person (not technically minded) will need to pop open a GUI that I create, open either a video file or a directory of frames that result from chopping up a video file, and then use a window (much like QuickTime or VLC player, etc., i.e. a video window with a simple slider bar allowing the user to move back and forth at will). In this window, the user will be able to click on interesting points, give them semantic labels and meta-data (such as whether or not the point is occluded by something else in the picture), and then basically "press go" and start a tracker. The tracker will follow the points, frame by frame and the user can press the space bar or something to move forward and backward. The idea is to allow the human to intervene any time the tracker gets confused, but hopefully the tracker works well enough that humans don't have to hand-label every frame in an entire multi-thousand frame video sequence.
I am planning to do this all in Python, (a) because it is the language I know best for non-trivial programming, (b) I have easy access to both OpenCV Python (for image processing algorithms) and PyQt which seems to have a powerful enough GUI toolbox for what I want to do and (c) some other aspects of this same project are being developed by other programmers to work in Python and with MySQL databases. Python just seems like the natural choice to streamline it all together.
I am experienced using computer vision algorithms for the tracking, and I am reasonably sure that I can figure out simple PyQt GUI devices for making points clickable, buttons, entering simple text data, etc. However, the part I am having trouble understanding is how to actually construct my own video window with a slider bar that either moves ahead according to a frame's number or else is actually manipulating a video file. Can I leverage other movie players like VLC from within PyQt when programming in Python? Any suggestions or links that describe similar movie/video editing GUIs and how to develop them at home would be greatly appreciated.
Qt(PyQt) has a good multimedia support via Phonon module. You can easily use that module to achieve Video window, it can provide an easy-to-use video player and you can get playing position etc.
Related
I have recently started learning python and decided that a fun way to learn would be to use pygame.
The following is some code that sets up the the window.
screen = pygame.display.set_mode((1200,800))
Would pygame be a file in which the file display is located?
I assume display refers to a file in which the method set_mode() is located.
If you already have a basic understanding of Object-Oriented Programming but are learning python through pygame, then Have a read through this tutorial: pygame - Setting Display Modes
Setting the display mode in pygame creates a visible image surface on the monitor. This surface can either cover the full screen or be windowed on platforms that support a window manager. The display surface is nothing more than a standard pygame surface object.
If you are starting to learn python and or programming from scratch, you might find more value in learning some basic programming and problem-solving concepts first, then come back to pygame.
I'm not affiliated but find the Hacker Rank 30-day challenge as a great learning tool, it is unique in tutorial sites as it is language agnostic and allows you to learn multiple languages at the same time if you wish to do so! It is also a good environment to learn in as there are fewer IDE features, forcing you to understand more before you can move on.
The average desktop IDE is not a great place to learn how to program because it will often have features like Intellisense, Autocomplete and other smart refactoring tools that allow us to write code quickly, but they allow you to "cheat" and skip over vital underlying mechanics that you need to understand if want to take advantage of abstract knowledge resources you may find around the web, like solutions in Stack Overflow!
Once you have a better understanding of syntax and how to use your chosen IDE, then go back to your pygame learning, walk before you run.
I am a developer with low vision. Right now I am working on a personal project to improve my ability to make use of large screens and play video games.
Sometimes when using a widescreen monitor up close (within 4-8 inches) I have trouble reading the screen along the edges. This is particularly troublesome when trying to read the clock or use a mini map in a game. It would be nice if I could temporarily switch the edge of the screen with the center.
I have successfully been able to move parts of the screen using screen captures and PyQt (screenshot).
This is nice but I would like to do this while preserving my ability to click or select text in the region. This seems like a rather involved process If I want to use PyQt and somehow pass clicks through to the screen.
For example:
Is there a lower level api that would allow me to tinker with the screen's output? Any suggestions are welcome!
Thanks
I am writing a program for audio-visual experiments, which will present a pre-generated list of audio-only and video-with-audio stimuli to experiment subjects. I have decided to use PyQT and Phonon for this, despite the fact that I'm fairly new to writing QT-based programs (and GUI programming in general).
The issue I'm having is that, when the previous file played was video (.mov in this case), and the current file is audio-only (.wav file), the image from the last frame of the video file remains on the screen while the audio file is playing. The video image remains until the next .mov file rolls around in the stimulus list.
Is there a way to clear the Phonon screen, in order to show just an empty black screen while the audio-only files are playing? I've done a fair bit of poking around with Google, and though this question has been asked by a number of people on different forums, it seems to have gone unanswered.
Any suggestions will be greatly appreciated!
This seems to be a bug, or missing feature, and it's hard to come up with a good workaround.
One somewhat hacky solution is to force a resize of the video widget:
size = self.video.size()
self.video.resize(0, 0)
self.video.resize(size)
but I wouldn't bet on this working on all platforms.
A more reliable workaround would be to put the video-widget inside a container widget with a black background, and then simply hide/show the video-widget when stopping/starting the media.
I am looking to make a GUI in python but currently do not have much experience. The GUI must have a few key features, namely a slider bar to control audio, and a few basic menu buttons. I realize essentially all GUI development tools could handle these simple features, but I am also interested in some custom content as well. The basic look of the GUI I am looking to create is shown here:
In the image, the slider volume bar, "button1," "button2," the colored circles, and any slice of the circle (one highlighted section is shown) needs to be clickable and interactive. Moreover, the small colored circles must be able to dynamically revolve around the edge of the circle and remain clickable at all times. I have not used any GUI development tools yet, but have looked into pyGTK, pyQT, wxWidgets, and Kivy. Can anyone who has used these tools recommend which would be best suited? As far as shapes of buttons, am I restricted?
You can use pyopengl, pygame , pygtk .
I have one example how to show this images if you want take a look at :
http://free-tutorials.org software free section is decor.tgz example.
In my opinion you can use pyOpenGL is very portable to another language like C,C++ and also you can make it to Linux , Windows , Android.
So I've been tinkering with a few different GUI's but I haven't been able to even find a point to begin researching this question:
How do I make a GUI like Steam (Digital distribution app) has? More specifically, I'm interested in how they manage to make their SHIFT+TAB menu pop up in-game, without disrupting/pausing/effecting the game. I've been somewhat successful in making a GUI window "stay on top" when a game is in window mode, but Steam pops this little menu up over the top of a running, fullscreen game.
That's what I'm interested in learning about. Any info would be much appreciated. :)
Sorry if this isn't the correct place to post this. I wasn't sure exactly where to ask.
PS> Preferably something I could implement in Python!!!
The Steam overlay/notification system hooks into games via Direct3D or OpenGL in Windows (depending on the game) from my understanding (as it doesn't work for games that aren't Direct3d/OpenGL like Diablo).
It uses the same rendering libraries that the game uses and thus can overlay their menus natively.
As for Python implementations, you can check out http://directpython.sourceforge.net/ and http://pyopengl.sourceforge.net/ as a start (for DirectX and OpenGL libraries respectively) but can I warn you that I don't think this is as simple as you're hoping.
Hmm, that looks very much like they are using Adobe AIR or maybe Flash.