ktnrg45 / pyremoteplay

Python API for using PlayStation Remote Play
https://pyremoteplay.readthedocs.io/
GNU General Public License v3.0
29 stars 11 forks source link

How to get video frames as images #12

Closed ccarterc closed 2 years ago

ccarterc commented 2 years ago

I am trying to modify client example so I can get video frames and feed them into another system. Ideally these would be readable by cv2. I would like to setup a machine learning experiment and this library seems perfect for it!

I have looked at a lot of the source code, but I still am unable to get an image that can be converted to a jpeg or png. I am open to other solutions, but ultimately need a video frame -> image that can be ingested by an ML algorithm. I was unable to get any video frames from the async client example. In the client example I have been unsuccessful in using the devices.session.receiver.video_frames for anything useful.

ktnrg45 commented 2 years ago

The video frames are PYAV Video Frames. I would read its documentation. There are multiple ways of using these frames