Closed hdnh2006 closed 1 year ago
Good Morning !
I fixed the code to support the weird version coding for ffmpeg. Really, we only use the major, so I refactor lightly the code to support the version as a constant, and map the version numbers acordly. Please use the latest version in repo and try again. I hope it works!
Thanks!
Wow, I didn't know that.
Ok, I tried again this new version and it returns a similar error:
gopro2gpx GH010220.MP4 output
Traceback (most recent call last):
File "/home/henry/.virtualenvs/gopro/bin/gopro2gpx", line 8, in <module>
sys.exit(main())
File "/home/henry/.virtualenvs/gopro/lib/python3.8/site-packages/gopro2gpx/gopro2gpx.py", line 191, in main
main_core(args)
File "/home/henry/.virtualenvs/gopro/lib/python3.8/site-packages/gopro2gpx/gopro2gpx.py", line 152, in main_core
ffmpegtools = FFMpegTools(ffprobe=config.ffprobe_cmd, ffmpeg=config.ffmpeg_cmd)
File "/home/henry/.virtualenvs/gopro/lib/python3.8/site-packages/gopro2gpx/ffmpegtools.py", line 41, in __init__
if self.version.major >= FFMpegTools.MAJOR_VERSION:
TypeError: '>=' not supported between instances of 'str' and 'int'
I let you know both values you compare in your code:
print(FFMpegTools.MAJOR_VERSION)
print(self.version.major)
4
N
If it is too much problem to change the code, I can try in my other PC.
Sorry for the bug. Fixed in last commit
It works!!!
> gopro2gpx GH020208.MP4 output
GPSFIX change to 3 [lock 3D (ok)]
-- stats -----------------
- Ok: 10817
- GPSFIX=0 (bad): 0 (skipped: 0)
- Empty (No data): 0
Total points: 10817
--------------------------
Thanks so much again!!
Hi Juan, I hope you are doing well.
I am triying your converter using another computer and it seems the version is not being well parsed.
After running the command
ffmpeg --version
I get:So I run your code to get the gps data and I get:
I put a
print(self.version)
in your codeffmpegtools.py
and I getSo I assume there's something wrong with the parser.
The first time I tried your code the
ffmpeg
version format was like following:So I think the problem is with the other format.