question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SABnzbd failing with or without hwaccels enabled

See original GitHub issue

Making this its own issue now as it is presenting much frustration now, Sorry.

SABnzbd has in the last day started throwing up errors, I have done a fresh download/install of the script and also re-setup the autoprocess.ini and still run in to the same problems. When SAB finishes the download the second (as in immediately there’s no eclipsed time at all) it starts running the script it will display SystemExit: 1

The SMA log will show

2020-08-19 05:16:42 - resources.mediaprocessor - INFO - Starting conversion.
2020-08-19 05:16:42 - resources.mediaprocessor - INFO - FFmpeg command:
2020-08-19 05:16:42 - resources.mediaprocessor - INFO - ======================
2020-08-19 05:16:42 - resources.mediaprocessor - INFO - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -i D:\Downloads\Completed\Jimmy.Kimmel.2020.08.17.Reese.Witherspoon.REPACK.720p.WEB.h264-ROBOTS\283db0990c8e4712a510e276ca507116.mkv -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 1500k -metadata:s:v BPS=1500000 -metadata:s:v BPS-eng=1500000 -metadata:s:v title=HD -level 5.1 -tag:v hvc1 -c:a:0 copy -map 0:1 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:2 -metadata:s:s:0 title= -metadata:s:s:0 language=eng -disposition:s:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y D:\Downloads\Completed\Jimmy.Kimmel.2020.08.17.Reese.Witherspoon.REPACK.720p.WEB.h264-ROBOTS\283db0990c8e4712a510e276ca507116.mp4
2020-08-19 05:16:42 - resources.mediaprocessor - INFO - ======================
2020-08-19 05:16:43 - resources.mediaprocessor - ERROR - Unexpected exception during conversion.
Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1418, in convert
progressOutput(timecode, debug)
File "C:\Converter\SABPostProcess.py", line 29, in progressOutput
print("%s%" % timecode)
ValueError: incomplete format
2020-08-19 05:16:43 - resources.mediaprocessor - ERROR - Error restoring original inputfile after FFMPEG error.
Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1418, in convert
progressOutput(timecode, debug)
File "C:\Converter\SABPostProcess.py", line 29, in progressOutput
print("%s%" % timecode)
ValueError: incomplete format

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1447, in convert
os.rename(inputfile, originalinputfile)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\Downloads\\Completed\\Jimmy.Kimmel.2020.08.17.Reese.Witherspoon.REPACK.720p.WEB.h264-ROBOTS\\283db0990c8e4712a510e276ca507116.mkv' -> 'D:\\Downloads\\Completed\\Jimmy.Kimmel.2020.08.17.Reese.Witherspoon.REPACK.720p.WEB.h264-ROBOTS\\283db0990c8e4712a510e276ca507116.mkv'
2020-08-19 05:16:43 - SABPostProcess - ERROR - Converting file failed D:\Downloads\Completed\Jimmy.Kimmel.2020.08.17.Reese.Witherspoon.REPACK.720p.WEB.h264-ROBOTS\283db0990c8e4712a510e276ca507116.mkv.
2020-08-19 05:16:43 - SABPostProcess - ERROR - No valid files found for conversion in download, aborting.
2020-08-19 05:16:43 - SABPostProcess - ERROR - Unexpected exception.
Traceback (most recent call last):
File "C:\Converter\SABPostProcess.py", line 80, in <module>
sys.exit(1)
SystemExit: 1

^^This is with hwaccels.

2020-08-19 05:19:56 - resources.mediaprocessor - INFO - Starting conversion.
2020-08-19 05:19:56 - resources.mediaprocessor - INFO - FFmpeg command:
2020-08-19 05:19:56 - resources.mediaprocessor - INFO - ======================
2020-08-19 05:19:56 - resources.mediaprocessor - INFO - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -i D:\Downloads\Completed\The.Fugitive.2020.S01E13.When.Mike.Met.Colin.1080p.WEB-DL.AAC2.0.H.264-WELP\b3c850eab721439b9d525a3542ac7abc.mkv -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 1500k -metadata:s:v BPS=1500000 -metadata:s:v BPS-eng=1500000 -metadata:s:v title=FHD -level 5.1 -tag:v hvc1 -c:a:0 copy -map 0:1 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:2 -metadata:s:s:0 title= -metadata:s:s:0 language=eng -disposition:s:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:1 mov_text -map 0:3 -metadata:s:s:1 title= -metadata:s:s:1 language=eng -disposition:s:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y D:\Downloads\Completed\The.Fugitive.2020.S01E13.When.Mike.Met.Colin.1080p.WEB-DL.AAC2.0.H.264-WELP\b3c850eab721439b9d525a3542ac7abc.mp4
2020-08-19 05:19:56 - resources.mediaprocessor - INFO - ======================
2020-08-19 05:19:57 - resources.mediaprocessor - ERROR - Unexpected exception during conversion.
Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1418, in convert
progressOutput(timecode, debug)
File "C:\Converter\SABPostProcess.py", line 29, in progressOutput
print("%s%" % timecode)
ValueError: incomplete format
2020-08-19 05:19:57 - resources.mediaprocessor - ERROR - Error restoring original inputfile after FFMPEG error.
Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1418, in convert
progressOutput(timecode, debug)
File "C:\Converter\SABPostProcess.py", line 29, in progressOutput
print("%s%" % timecode)
ValueError: incomplete format

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Converter\resources\mediaprocessor.py", line 1447, in convert
os.rename(inputfile, originalinputfile)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\Downloads\\Completed\\The.Fugitive.2020.S01E13.When.Mike.Met.Colin.1080p.WEB-DL.AAC2.0.H.264-WELP\\b3c850eab721439b9d525a3542ac7abc.mkv' -> 'D:\\Downloads\\Completed\\The.Fugitive.2020.S01E13.When.Mike.Met.Colin.1080p.WEB-DL.AAC2.0.H.264-WELP\\b3c850eab721439b9d525a3542ac7abc.mkv'
2020-08-19 05:19:57 - SABPostProcess - ERROR - Converting file failed D:\Downloads\Completed\The.Fugitive.2020.S01E13.When.Mike.Met.Colin.1080p.WEB-DL.AAC2.0.H.264-WELP\b3c850eab721439b9d525a3542ac7abc.mkv.
2020-08-19 05:19:57 - SABPostProcess - ERROR - No valid files found for conversion in download, aborting.
2020-08-19 05:19:57 - SABPostProcess - ERROR - Unexpected exception.
Traceback (most recent call last):
File "C:\Converter\SABPostProcess.py", line 80, in <module>
sys.exit(1)
SystemExit: 1

^^This is without. I have tried running this with and without hwaccels enabled, always the same result I am running FFMpeg version ffmpeg-20200816-5df9724-win64-static.zip All was fine but since installing Nvidia Drivers 452.06 I have noticed this problem!

The part that I find interesting is “resources.mediaprocessor - ERROR - Error restoring original inputfile after FFMPEG error.” As for the permission thing its because the file is in use however I can not find how by what other than ffmpeg

Really sorry to keep bothering you, just can’t work out why even with a new download its suddenly stop working correctly after running fine for over 2 years.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mdhigginscommented, Aug 19, 2020

a84bb793afaa2bb8ca33d24ace055ba57dd6c37c

That should fix it

0reactions
morpheus2n2commented, Aug 19, 2020

Yep all seems to be working now awesome stuff 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Almost Every File FAILS, but not really. - SABnzbd Forums
The problem is that the downloads haven't failed. A couple of them have downloaded 99% of the info and when I click retry...
Read more >
Everything I download fails - SABnzbd Forums
Failed downloads are sadly no exception, such is the state of Usenet. If you think SABnzbd is the cause, try to download a...
Read more >
Script: Convert from AVC to HEVC via NVENC
It relies on all files unpacking into the base directory like most downloads do, and will fail but leave the files untouched if...
Read more >
Wiki - Known issues - SABnzbd
Incorrect or missing information? Known issues · Size limit · Hangup of post-processing · Decoder failure: Out of memory · Memory usage (leaks)...
Read more >
Every download fails? - SABnzbd Forums
The errors vary a bit but the most common are 'Corrupt RAR File' and 'Repairing Failed'. I know the files on the server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found