CrypticSignal/better-ffmpeg-progress

Type Error: Failed to convert string to float 'N/'

JagjitBhatia opened this issue · 2 comments

Get an error: [Error] could not convert string to float: 'N/' every time I try to run it. Might be due to a different FFMPEG version.

PR for fix: #11

Please upgrade to v2.1.1 with pip3 install better-ffmpeg-progress --upgrade and let me know if you ever run into this issue. For now, I will close this issue.

F-park commented

elif "speed" in ffmpeg_output:
speed_str = value[:-1]
if speed_str != "0" and "N/A" not in speed_str:
self._speed = float(speed_str)

The TypeError caused by this code.

  • value will be 22.3x or N/A, and speed_str will be 22.3 or N/ (line 102)
  • so bool(speed_str != "0" and "N/A" not in speed_str) == True (line 104)
  • float("N/") will raise TypeError() (line 105)