mapillary / mapillary_tools

Command line tools for processing and uploading Mapillary imagery
BSD 2-Clause "Simplified" License
267 stars 138 forks source link

sample_video deletes the movie file from disk! #267

Closed jose1711 closed 6 years ago

jose1711 commented 6 years ago

Basic information

Steps to reproduce behavior

➜  test ls -l
total 5132
-rw------- 1 jose users 5254883 Jan  1  1970 GOPR0001.MP4
➜  test mapillary_tools sample_video --import_path . --video_file GOPR0001.MP4 --advanced
No module named pynmea2
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Warning, video start time not provided and could not be extracted from the video file, default video start time set to 0 milliseconds since UNIX epoch.
➜  test ls -l
total 0
➜  test cd ..
➜  goprotest cd test
➜  test ls -l
total 0
➜  test find .
.
./.mapillary
./.mapillary/logs
./.mapillary/logs/GOPR0001
./.mapillary/logs/GOPR0001/video_process.json

and bam, the video is gone :-/

Expected behaviour

keep the video file intact

jernejaMislej commented 6 years ago

Hi sorry for the late reply, I m on vacation until 10th August with limited access to internet. @ybkuang will try to address the issues while I m gone.

ybkuang commented 6 years ago

@jose1711 The script should not delete any files. We will dig deeper and before that you should put your uploads on hold. Sorry about the delay.

jose1711 commented 6 years ago

current revision (r723.1b62f07) shows slightly different message - still, the video is deleted.

Warning, /tmp/mt/GOPR2161.MP4 has already been sampled into /tmp/mt, previously sampled frames will be deleted

apparently the script does not like to be given the current directory (.) as an argument to --import_path.

jernejaMislej commented 6 years ago

hi thank you very much for reporting this i looked into it and realized there is a major bug in the tools when it comes to video sampling in order to ensure a clean sampling and further alignment with the geotag data , the specified import path was deleted and re created in case it existed. I have changed this and made a new release v0.1.5, so please install the latest version in case you use commands that include video sampling. I apologize for any inconvenience this might have caused and again thank you very much for reporting this.