I noticed the sync client example doesn't seem to work at all. It connects, but none of the controller actions work and it quickly disconnects the session.
The async example seems to work well as it waits for the session to be fully established and then begins sending actions which successfully get sent to the playstation. However if I try to look at video frames within the button action loop, device.sessions.receiver.video_frames results in error: File "<string>", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'video_frames' . The same is true for device.session.receiver.get_video_frame and device.session.receiver.get_latest_video_frame .
Is there any chance you can provide an example of how to get a video frame in the async example?
I read the docs on PyAV and it shows there is a method: VideoFrame.to_image that works if you have PIL or Pillow, but I haven't been able to test it yet since I can't get a video frame.
I noticed the sync client example doesn't seem to work at all. It connects, but none of the controller actions work and it quickly disconnects the session.
The async example seems to work well as it waits for the session to be fully established and then begins sending actions which successfully get sent to the playstation. However if I try to look at video frames within the button action loop,
device.sessions.receiver.video_frames
results in error:File "<string>", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'video_frames'
. The same is true fordevice.session.receiver.get_video_frame
anddevice.session.receiver.get_latest_video_frame
.Is there any chance you can provide an example of how to get a video frame in the async example?
I read the docs on PyAV and it shows there is a method:
VideoFrame.to_image
that works if you havePIL
orPillow
, but I haven't been able to test it yet since I can't get a video frame.