gopro-dashboard crashes parsing timestamp in MP4
tve opened this issue · 4 comments
tve commented
$ gopro-dashboard.py --layout xml --layout-xml /home/tve/Projects/Navigation/gopro-overlay/gopro_overlay/layouts/tve-2704x1520.xml GH040134.MP4 GH040134-ov.mp4
Input file has size Dimension(x=2704, y=1520)
Timer(loading timeseries - Called: 1, Total: 1.42918, Avg: 1.42918, Rate: 0.70)
Timer(program - Called: 1, Total: 1.42923, Avg: 1.42923, Rate: 0.70)
Traceback (most recent call last):
File "/home/tve/Projects/Navigation/gopro-overlay/bin/gopro-dashboard.py", line 92, in <module>
gopro_timeseries = timeseries_from(input_file, units=units,
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 479, in timeseries_from
return timeseries_from_data(load_gpmd_from(filepath), **kwargs)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 473, in timeseries_from_data
i.accept(visitor)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 172, in accept
i.accept(container_visitor)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 172, in accept
i.accept(container_visitor)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 217, in accept
getattr(visitor, method)(self)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 373, in vi_GPSU
self._basetime = interpret_item(item)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 128, in interpret_item
return interpreters[item.fourcc](item, scale)
File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpmd.py", line 43, in _interpret_timestamp
return datetime.datetime.strptime(item.rawdata.decode('utf-8', errors='replace'), '%y%m%d%H%M%S.%f').replace(
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data '6349825525584010' does not match format '%y%m%d%H%M%S.%f'
Other files from the same gopro capture work fine...
time4tea commented
Interesting. Are you able to share a section of the capture? The gopro-cut.py program may work to isolate just a section of the file, if you can find a small bit that shows the issue.
time4tea commented
If you could share a bit of the file, using the gopro-cut
and gopro-extract
you should be able to just get a small section of data.. otherwise it's a bit tricky to see in what conditions this situation may occur.
tve commented
I inadvertently deleted the source files, so I can't reproduce :-(. If it recurs, I'll reopen with a sample.
time4tea commented
There is a workaround for this in 0.124.0 - Should be available in PyPI very soon.