Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recording video from app #51

Closed
3 tasks done
pawelkulig1 opened this issue Apr 5, 2018 · 7 comments · Fixed by #62
Closed
3 tasks done

Recording video from app #51

pawelkulig1 opened this issue Apr 5, 2018 · 7 comments · Fixed by #62

Comments

@pawelkulig1
Copy link
Collaborator

pawelkulig1 commented Apr 5, 2018

There is no option to record video right now, research need to be done, to find best fitting technology:

  • OpenCV - record video
  • QtGui.QPixmap.grabWindow() - convert slides to video
  • QWidget.grab() - previous is deprecated in Qt5.
@LemurPwned
Copy link
Owner

Yeah, forgot about this one, it was done in previous version and worked pretty well. It seems that recording has to be done as composition of frames (screenshots).

I can take it if you dont mind.

@pawelkulig1
Copy link
Collaborator Author

I wanted to improve previous solution, If you really want u can take that one. I will pick something else from to do list. Most important part is to do one issue at the time, to avoid messing things up.

@LemurPwned
Copy link
Owner

Sure, but I dont think this is much of the problem as long as you can keep track of your branches. Working on multiple issues is normal workflow- but we should limit ourselves to a single merge request per person - unlike I've done several days ago. Any other branches that have been completed during should be included in that pull request. How about that?

@pawelkulig1
Copy link
Collaborator Author

As far as I am concerned it's not proper way of dealing with bigger projects but ok, this may cause mess and it has negative impact on programmer performance. It's up to you.

@pawelkulig1 pawelkulig1 removed their assignment Apr 5, 2018
@LemurPwned
Copy link
Owner

there are several issues connected to the proposed solutions:

  • OpenCV
    is not an optimal solution, it is better to use scikitimage which has been tested to be faster and more reliable with less overhead.
  • Instead of QWidget.grab() one could use glgrabFrameBuffer() which seems to be called anyway by QWidget.grab() as overriden method for QOpenGLWidget.
    This is working functionally but it seems to require a current thread which is not always available to call: i.e
AbstractGLContext.py
...
 def set_i(self, value):
        self.i = value
        self.i %= self.iterations
        self.grabframeBuffer() <--- causes SIGABRT 
        self.update()

causes program to crash since in that context set_i is executed in a separate thread, so from OpenGL context function call comes from a different thread - thus an error. A typical solution could be to move OpenGL contexts into a separate thread, which has been tested by me and confirmed not to work because of the fact that Widgets in general are not allowed to run in a separate QThread.
Therefore, right now the frame buffer is called from within the OpenGL context.

However, I must confirm whether it produces black (empty) screenshots because of empty framebuffers or it's just os-specific problem.

@LemurPwned LemurPwned mentioned this issue Apr 11, 2018
LemurPwned added a commit that referenced this issue Apr 11, 2018
@LemurPwned
Copy link
Owner

It seems that this issue is strictly connected to Intel Graphics Cards,
@pawelkulig1 can you confirm it if you have any other GPU at disposal?

@LemurPwned LemurPwned reopened this Apr 13, 2018
@LemurPwned
Copy link
Owner

Don't need a confirmation, it is indeed Intel problem, however, I have managed to get i working on branch #62 . movies are composed provided ffmpeg is installed

  • Add support for Windows if no ffmpeg is installed ? (if doable)

@LemurPwned LemurPwned mentioned this issue Apr 20, 2018
LemurPwned added a commit that referenced this issue Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants