-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent non-zero exit status 123 #103
Comments
If you're able to successfully run ffmpeg yourself, that points to item 5 being the issue. If so, you can replace the ffmpeg exe in the dvr-scan folder with a newer version. The exception is happening somewhere due to the way logging works, I have not seen this error before. DVR-Scan should continue to run after ffmpeg fails, but for some reason it fails to log the error. Thank you. |
Batch file is a below. The error occurs on DSME_0006.mp4, implies that first 5 extracts have run fine, indicates issue probably not with batch file. I'll reply to other points shortly.
|
Ran DVR-scan outside of batch, get following at the last extract [DVR-Scan] Failed to decode 6 frame(s) from video, timestamps may be incorrect. Try re-encoding or remuxing video (e.g. ffmpeg -i video.mp4 -c:v copy out.mp4). See #62 for details. DVR-scan doesnt "hang" but exits normally (logfile attached) - so wonder why the batch file is hanging ... |
Can you let me know if you get the same issue if you uninstall the This seems to be failing after changing logging to work correctly with the progress bar. If the root cause of the issue cannot be determined, a potential workaround would be to add a config file to disable the progress bar. A command line argument should probably be added to disable the progress bar anyways as it may not work under all systems. If you are using the Python version of DVR-Scan, you can simply uninstall the This means DVR-Scan won't show any progress bars, but it will help determine if this is the reason the batch file is failing or not. |
Bug/Issue Description:
Running dvr-scan via a windows batch file to process a large number of files. Periodically processing stops, and CTRL-C has to be pressed multiple times to resume. On pressing CTRL-C following error log is printed, pointing to exit code 123 from ffmpeg.
any pointers on what could be causing it ?
--- Logging error ---
Traceback (most recent call last):
File "dvr_scan\scanner.py", line 929, in _encode_thread
File "dvr_scan\scanner.py", line 907, in _on_motion_event
File "dvr_scan\scanner.py", line 166, in _extract_event_ffmpeg
File "subprocess.py", line 415, in check_output
File "subprocess.py", line 516, in run
subprocess.CalledProcessError: Command '['ffmpeg', '-y', '-nostdin', '-v', 'error', '-hwaccel', 'dxva2', '-ss', '00:01:08.400', '-i', 'H:\Surveilance\Ch8\2020-10-17\ch8-20201017125205_20201017125401.dav', '-t', '00:00:16.040', '-map', '0', '-c:v', 'libx265', '-preset', 'fast', '-crf', '28', '-c:a', 'aac', '-sn', 'H:\Surveilance\Ch8\2020-10-17\extracted\ch8-20201017125205_20201017125401.DSME_0006.mp4']' returned non-zero exit status 123.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tqdm\contrib\logging.py", line 30, in emit
File "logging_init_.py", line 1069, in flush
OSError: [Errno 22] Invalid argument
Call stack:
File "threading.py", line 890, in bootstrap
File "threading.py", line 932, in bootstrap_inner
File "threading.py", line 870, in run
File "dvr_scan\scanner.py", line 934, in encode_thread
File "logging_init.py", line 1493, in critical
File "logging_init.py", line 1589, in log
File "logging_init.py", line 1599, in handle
File "logging_init.py", line 1661, in callHandlers
File "logging_init_.py", line 954, in handle
File "tqdm\contrib\logging.py", line 34, in emit
Message: 'Fatal error: Exception raised in encode thread.'
Arguments: ()
Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='cp1252'>
OSError: [Errno 22] Invalid argument
executed ffmpeg manually : c:\sg-bin\ffmpeg-full\bin\ffmpeg.exe -y -nostdin -v error -hwaccel dxva2 -ss 00:01:08.400 -i H:\Surveilance\Ch8\2020-10-17\ch8-20201017125205_20201017125401.dav -t 00:00:16.040 -map 0 -c:v libx265 -preset fast -crf 28 -c:a aac -sn out.mp4
ran fine without any issue...
The text was updated successfully, but these errors were encountered: