parkpow / deep-license-plate-recognition

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.
https://platerecognizer.com/
MIT License
523 stars 122 forks source link

Error With .asf Video Format #154

Closed danleyb2 closed 9 months ago

danleyb2 commented 12 months ago

Describe the bug There is an Error when you upload .asf video format. It appears to be an issue with ffmpegcv

Log output:

skew_correction  | INFO   [app.21] => Api Server Startup
video_editor     | DEBUG  [video-editor.140] => Processing video: Sample-1Video.asf
video_editor     | DEBUG  [video-editor.143] => enabled_actions: visualization
video_editor     | DEBUG  [video-editor.149] => CONFIG frames_enabled: False
video_editor     | DEBUG  [video-editor.150] => CONFIG visualization_enabled: True
video_editor     | DEBUG  [video-editor.151] => CONFIG blur_enabled: False
video_editor     | ERROR  [video-editor.288] => Error:
video_editor     | Traceback (most recent call last):
video_editor     |   File "/app/video_editor.py", line 286, in process_video_route
video_editor     |     process_video(file, action)
video_editor     |   File "/app/video_editor.py", line 169, in process_video
video_editor     |     cap = ffmpegcv.VideoCapture(video_path)
video_editor     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/__init__.py", line 151, in VideoCapture
video_editor     |     return FFmpegReader.VideoReader(
video_editor     |            ^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/ffmpeg_reader.py", line 59, in VideoReader
video_editor     |     videoinfo = get_info(filename)
video_editor     |                 ^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/video_info.py", line 25, in get_info
video_editor     |     outinfo['count'] = int(vinfo['nb_read_packets' if do_scan_the_whole
video_editor     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     | KeyError: 'nb_frames'
video_editor     | INFO   [werkzeug.96] => 172.19.0.1 - - [20/Oct/2023 06:05:46] "POST /process-video HTTP/1.1" 500 -
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...

To Reproduce Steps to reproduce the behaviour:

  1. Try uploading a .asf video file format.

Expected behaviour The video should process okay