Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlackVue video to image processing not working on Windows 10 #340

Closed
robertaustinbell opened this issue Apr 8, 2019 · 12 comments
Closed

Comments

@robertaustinbell
Copy link

When I run the command to extract the images from the BlackVue video it processes the first video clip but fails after that.

Here is what I am getting in powershell.

PS C:\Users\abell\Downloads> .\mapillary_tools.exe video_process --import_path ".\Front" --video_import_path ".\Front" --user_name "i_drive_alot" --advanced --geotag_source "blackvue_videos" --geotag_source_path ".\Front" --use_gps_start_time --interpolate_directions --video_sample_interval 0.2 --device_make "Blackvue" --device_model "DR900S-1CH" --overwrite_EXIF_gps_tag
Extracting video frames: 0%| | 0/74 [00:00<?, ?it/s]Video sampling path set to C:\Users\abell\Downloads\Front\mapillary_sampled_video_frames\20190408_093433_NF
Traceback (most recent call last):
File "mapillary_tools", line 76, in
File "mapillary_tools\commands\video_process.py", line 146, in run
File "mapillary_tools\process_video.py", line 96, in sample_video
File "mapillary_tools\process_video.py", line 140, in extract_frames
File "mapillary_tools\process_video.py", line 214, in get_video_start_time
File "mapillary_tools\process_video.py", line 158, in get_video_duration
IndexError: list index out of range
[13652] Failed to execute script mapillary_tools

Capture

Capture

Here is some other FFMPEG commands for context

PS C:\Users\abell\Downloads> ffprobe -show_streams front\20190408_093433_NF.mp4
ffprobe version N-93542-gecdaa4b4fa Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20190212
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 48.101 / 58. 48.101
libavformat 58. 27.100 / 58. 27.100
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002426d2bbf80] Found duplicated MOOV Atom. Skipped it
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'front\20190408_093433_NF.mp4':
Metadata:
creation_time : 2019-04-08T13:35:34.000000Z
major_brand : mp42
minor_version : 1
compatible_brands: mp42mp42
Duration: 00:01:00.98, start: 0.000000, bitrate: 25798 kb/s
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160, 25140 kb/s, 29.99 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:
creation_time : 2019-04-08T13:35:34.000000Z
handler_name : PittaSoft Video Media Handler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, stereo, fltp, 47 kb/s (default)
Metadata:
creation_time : 2019-04-08T13:35:34.000000Z
handler_name : PittaSoft Sound Media Handler
[STREAM]
index=0
codec_name=hevc
codec_long_name=H.265 / HEVC (High Efficiency Video Coding)
profile=Main
codec_type=video
codec_time_base=15253/457500
codec_tag_string=hvc1
codec_tag=0x31637668
width=3840
height=2160
coded_width=3840
coded_height=2160
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuvj420p
level=153
color_range=pc
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=30/1
avg_frame_rate=457500/15253
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=60978
duration=60.978000
bit_rate=25140602
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=1830
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2019-04-08T13:35:34.000000Z
TAG:language=eng
TAG:handler_name=PittaSoft Video Media Handler
[/STREAM]
[STREAM]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/16000
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=16000
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=0
start_time=0.000000
duration_ts=60928
duration=60.928000
bit_rate=47180
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=953
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2019-04-08T13:35:34.000000Z
TAG:language=eng
TAG:handler_name=PittaSoft Sound Media Handler
[/STREAM]
PS C:\Users\abell\Downloads>

@bob3bob3
Copy link

bob3bob3 commented Apr 8, 2019

Seems you have a similar failure to @mikelo with a Gopro

I dont have an answer. I am running the Blackvue on Linux without fault.

@mikelortega
Copy link
Contributor

Indeed, as @bob3bob3 says, I have exactly the same problem with a GoPro Session 4. Here is a link to the forum post. I also think it has something to do with ffprobe.

@mikelortega
Copy link
Contributor

I'm just trying to guess, but I think this commit can be related:
revert: duration extraction - master v0.5.0 - commit ead2c0ed0ff5b85c7074f8862e9db5288370161f

@josealb
Copy link
Contributor

josealb commented Apr 11, 2019

Hi @robertaustinbell, I will look into this issue.
However, if you have a Blackvue, I recommend you just upload the videos with the new tools send_videos_for_processing command, these are then processed on the cloud, which is more practical than sampling it on your device.
You can read more about it here:
https://github.com/mapillary/mapillary_tools#blackvue

@robertaustinbell
Copy link
Author

So when I run that command I get the same error. Also worth noting that I am on the most recent version of the package.

PS C:\Users\abell\Downloads> .\mapillary_tools.exe send_videos_for_processing --advanced --video_import_path "D:\BlackVue\Record" --user_name "i_drive_alot"
Traceback (most recent call last):
File "mapillary_tools", line 76, in
File "mapillary_tools\commands\send_videos_for_processing.py", line 43, in run
File "mapillary_tools\uploader.py", line 922, in send_videos_for_processing
File "mapillary_tools\uploader.py", line 168, in get_upload_url
File "urllib2.py", line 154, in urlopen
File "urllib2.py", line 435, in open
File "urllib2.py", line 548, in http_response
File "urllib2.py", line 473, in error
File "urllib2.py", line 407, in _call_chain
File "urllib2.py", line 556, in http_error_default
urllib2.HTTPError: HTTP Error 401: Unauthorized
[19340] Failed to execute script mapillary_tools

@velmyshanovnyi
Copy link

v-0.5.0 Win10
BlackVue 900 ch1 30fps

CMD

F:\mapicam2upload\20190403-test>D:\mapicam\tools\mapillary\mapillary_tools.exe sample_video --advanced --import_path "F:\mapicam2upload\20190403-test\Record\10fps" --video_import_path "F:\mapicam2upload\20190403-test\Record" --video_sample_interval 0.1
Extracting video frames: 0%| | 0/1 [00:00<?, ?it/s]Video sampling path set to F:\mapicam2upload\20190403-test\Record\10fps\mapillary_sampled_video_frames\20190403_182624_NF
Traceback (most recent call last):
File "mapillary_tools", line 76, in
File "mapillary_tools\commands\sample_video.py", line 28, in run
File "mapillary_tools\process_video.py", line 96, in sample_video
File "mapillary_tools\process_video.py", line 140, in extract_frames
File "mapillary_tools\process_video.py", line 214, in get_video_start_time
File "mapillary_tools\process_video.py", line 158, in get_video_duration
IndexError: list index out of range
[13212] Failed to execute script mapillary_tools

@josealb
Copy link
Contributor

josealb commented Apr 23, 2019

We are looking into the issue @robertaustinbell do you only get this error when using the send_videos_for_processing command? Can you use mapillary_tools successfully with other cameras otherwise?

@velmyshanovnyi can you try using the send_videos_for_processing command as suggested to @robertaustinbell above? This is the recommended method for Blackvue uploads from now on

@mikelortega
Copy link
Contributor

I'd like to mention that I upgraded to the last version (Apr 16, 2019) and now it works correctly. I posted in the forum the workflow I'm using to upload videos. Thank you.

@velmyshanovnyi
Copy link

thnx

your fix is working! :)

im use video_process_and_upload

%MapiCamMapillaryTools% video_process_and_upload --advanced --version --verbose --import_path "%BlackVueFolder%\Record%BlackVueFPS%fps" --video_import_path "%BlackVueFolder%\Record" --user_name %MapiCamUsernameAtMapillary% --geotag_source "blackvue_videos" --geotag_source_path "%BlackVueFolder%\Record" --offset_angle %BlackVueOffsetAngle% --use_gps_start_time --interpolate_directions --duplicate_distance %BlackDuplicateDistance% --video_sample_interval %BlackVueInterval% --device_make "Blackvue" --device_model "DR900S-1CH" --overwrite_EXIF_gps_tag >> %MapiCamLOG%

@josealb
Copy link
Contributor

josealb commented Apr 25, 2019

@robertaustinbell we could reproduce the Unauthorized error on our machines. You can fix it by re-authenticating with mapillary_tools authenticate --advanced
Could you try that and let me know?

@DavidMetcalfe
Copy link

@josealb Just want to point out that send_videos_for_processing is not viable for videos where only a portion of the contents is viable for upload (such as completing a portion of a street and then turning into a driveway). Being able to process locally, and selectively upload the portion that will be of use to the community without the rest of the content is important, and if I upload, the content is automatically published and requires me to delete one image at a time.

@ptpt
Copy link
Member

ptpt commented Jun 28, 2022

Please try the latest version: mapillary_tools upload_blackvue path/to/blackvue_videos which is equivalent to send_videos_for_processing

@ptpt ptpt closed this as completed Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants