pupil-labs / pupil

Open source eye tracking
https://pupil-labs.com
GNU Lesser General Public License v3.0
1.47k stars 675 forks source link

Recording error: #2244

Closed ChiwoongLEE closed 2 years ago

ChiwoongLEE commented 2 years ago

hello. After running main.py pupil, Clicking the button R on the world process gives the following warning message:

world - [INFO] recorder: Started Recording. world - [ERROR] launchables.world: Process Capture crashed with trace: Traceback (most recent call last): File "/home/kaai/pupil/pupil_src/launchables/world.py", line 761, in world p.recent_events(events) File "/home/kaai/pupil/pupil_src/shared_modules/recorder.py", line 484, in recent_events self.writer.write_video_frame(frame) File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 199, in write_video_frame for packet in self.encode_frame(input_frame, pts): File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 320, in encode_frame packet.payload = input_frame.jpeg_buffer AttributeError: 'av.packet.Packet' object has no attribute 'payload'

Run: darknet_images.py or:

python.exe darknet_video.py --data_file cfg/coco.data --config_file cfg/yolov4.cfg --weights yolov4.weights --input test.mp4

Estimated / selected altsetting bandwith : 151 / 256. !!!!Packets per transfer = 32 frameInterval = 82712 eye0 - [ERROR] launchables.eye: Process Eye0 crashed with trace: Traceback (most recent call last): File "/home/kaai/pupil/pupil_src/launchables/eye.py", line 758, in eye g_pool.writer.write_video_frame(frame) File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 199, in write_video_frame for packet in self.encode_frame(input_frame, pts): File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 320, in encode_frame packet.payload = input_frame.jpeg_buffer AttributeError: 'av.packet.Packet' object has no attribute 'payload'

Estimated / selected altsetting bandwith : 151 / 256. !!!!Packets per transfer = 32 frameInterval = 82712 eye1 - [ERROR] launchables.eye: Process Eye1 crashed with trace: Traceback (most recent call last): File "/home/kaai/pupil/pupil_src/launchables/eye.py", line 758, in eye g_pool.writer.write_video_frame(frame) File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 199, in write_video_frame for packet in self.encode_frame(input_frame, pts): File "/home/kaai/pupil/pupil_src/shared_modules/av_writer.py", line 320, in encode_frame packet.payload = input_frame.jpeg_buffer AttributeError: 'av.packet.Packet' object has no attribute 'payload'

Any solution?

papr commented 2 years ago

@ChiwoongLEE Looks like you have installed the official pyav, not the Pupil Labs fork. Please run

pip uninstall av
pip install "av @ git+https://github.com/pupil-labs/PyAV@v0.4.6"

To build the package, ffmpeg is required to be installed.

sudo apt install -y libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev ffmpeg x264 x265