uzh-rpg / DSEC

MIT License
138 stars 17 forks source link

Can't convert events to video #47

Closed msjun23 closed 1 year ago

msjun23 commented 1 year ago

Hi.

I'm trying to run events_to_video.py, but AssertionError is occurred. My env and error code is like below.

OS: Ubuntu 20.04 Python: 3.8.10 Not use conda but venv

Error code is here.

(DSEC) user@user:~/python_ws/DSEC/scripts$ python3 events_to_video.py event_file /home/user/Datasets/DSEC/train/interlaken_00_c/events/left/events.h5 
Traceback (most recent call last):
  File "events_to_video.py", line 43, in <module>
    writer = skvideo.io.FFmpegWriter(video_filepath)
  File "/home/user/python_ws/DSEC/lib/python3.8/site-packages/skvideo/io/ffmpeg.py", line 88, in __init__
    super(FFmpegWriter,self).__init__(*args, **kwargs)
  File "/home/user/python_ws/DSEC/lib/python3.8/site-packages/skvideo/io/abstract.py", line 366, in __init__
    assert str.encode(
AssertionError: Unknown encoder extension: .h5

If this issue is duplicated, I'm sorry, but could you attach the link?

Thank you.

magehrig commented 1 year ago

Your arguments are not correct: https://github.com/uzh-rpg/DSEC/blob/6da101d9f8fea4cabe6b7fd71c456c4bfbffe03d/scripts/events_to_video.py#L29-L30

The first argument is the path to the h5 file and the second path is the path to the video file that you want to write. E.g.

python events_to_video.py /path/to/events.h5 output.mp4