16lemoing / dot

Dense Optical Tracking: Connecting the Dots
https://16lemoing.github.io/dot
MIT License
217 stars 11 forks source link

Failed to save the result #4

Closed sfen779 closed 5 months ago

sfen779 commented 6 months ago

Hi, great work! But when I was trying to run the demo on my own pc, this error comes up.

Traceback (most recent call last): File "D:\codes\dot\demo.py", line 310, in main(args) File "D:\codes\dot\demo.py", line 305, in main visualizer(data, mode=mode) File "C:\Users\SHUO\anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\codes\dot\demo.py", line 36, in forward File "D:\codes\dot\dot\utils\io.py", line 82, in write_video write_video_to_file(video, path, channels) File "D:\codes\dot\dot\utils\io.py", line 92, in write_video_to_file File "C:\Users\SHUO\anaconda3\Lib\site-packages\torchvision\io\video.py", line 134, container.mux(packet) File "av\container\output.pyx", line 211, in av.container.output.OutputContainer.mux File "av\container\output.pyx", line 217, in av.container.output.OutputContainer.mux_one File "av\container\output.pyx", line 172, in av.container.output.OutputContainer.start_encoding File "av\error.pyx", line 336, in av.error.err_check av.error.ValueError: [Errno 22] Invalid argument

the demo.py can do the tracking and refine part, takes a long time to wait, but it cannot save the final result, which is really disappointing.😭Do you know how to solve this problem? I really what to use this to process my own video! Thank you!

16lemoing commented 6 months ago

Hi! This is an error thrown by the "av" package which is responsible for saving the video.

It looks like you are on Windows and that it does not allow colons ":" in file names. By default the folder where videos are saved contains the time-stamp of when the video was created:

https://github.com/16lemoing/dot/blob/6c524982a0c95e65e03fa64fc1a1290904575d99/dot/utils/options/base_options.py#L59

So I have removed colons from the folder name in 6c524982a0c95e65e03fa64fc1a1290904575d99. Let me know if this solves your issue.

sfen779 commented 6 months ago

Thank you for your solution! That works!