You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this will not work with MP4 novatek (gps box is not detected, as it is a subatom under moov)
Quick workaround: change "gps" to "moov" if box.type.decode("utf-8") == "moov": #has Novatek-specific stuff
In MP4 Novatek files you could expect 1-2 additional GPS location packets which are carried over between the files.
So it's typical to have 61 or 181 gps packets ('freeGPS') for 60 or 180 sec video
As a result, fps is calculated incorrectly and image sampling gets broken.
For 180 sec video with 1 sec sampling interval you will get 187 frames
20210426103432_001156.MP4
Novatek MP4 T
FPS : 30.0; LEN: 5400
GPS data analysis ended, no of points 181
Frames per point: 29.834254143646408
Video extraction started
20210426103432_001156.MP4 processed, 187 images extracted
and while packetno=181 (contains one extra gps packet), resulting FPS is not correct and this breaks the sampling
Frames per point: 29.834254143646408
Extra images are produced (not @ 1fps interval defined) and coordinates are assigned incorrectly.
Similar issue will occur if some of there will be a temp gpsfix loss. (i.e. in the tunnel) Packet will not be captured and counted and fps calculation will be completely erroneous
IMO, original approach works excellent (fps extracted by cv2) and there is no need to redefine it.
Quick workaround: delete or comment lines 559-561
Novatek MP4 detection not working
random-mapillary-stuff/ts_processor.py
Line 259 in 53896f8
this will not work with MP4 novatek (gps box is not detected, as it is a subatom under moov)
Quick workaround: change "gps" to "moov"
if box.type.decode("utf-8") == "moov": #has Novatek-specific stuff
new FPS calculation approach is buggy.
random-mapillary-stuff/ts_processor.py
Line 562 in 53896f8
In MP4 Novatek files you could expect 1-2 additional GPS location packets which are carried over between the files.
So it's typical to have 61 or 181 gps packets ('freeGPS') for 60 or 180 sec video
As a result, fps is calculated incorrectly and image sampling gets broken.
For 180 sec video with 1 sec sampling interval you will get 187 frames
How to reproduce:
Sample video: https://drive.google.com/file/d/14AXSVYlToIxUmoGPPmq-lGHsb2S8PWTH/view?usp=sharing
Script parameters:
ts_processor.py --input 20210426103432_001156.MP4 --sampling_interval 1
Output:
So, at first FPS is detected properly by cv2
random-mapillary-stuff/ts_processor.py
Line 541 in 53896f8
but later it get's overwritten by
random-mapillary-stuff/ts_processor.py
Line 562 in 53896f8
and while packetno=181 (contains one extra gps packet), resulting FPS is not correct and this breaks the sampling
Frames per point: 29.834254143646408
Extra images are produced (not @ 1fps interval defined) and coordinates are assigned incorrectly.
Similar issue will occur if some of there will be a temp gpsfix loss. (i.e. in the tunnel) Packet will not be captured and counted and fps calculation will be completely erroneous
IMO, original approach works excellent (fps extracted by cv2) and there is no need to redefine it.
Quick workaround: delete or comment lines 559-561
The text was updated successfully, but these errors were encountered: