SABnzbd unzip/unrar/filejoin corrupts MKV file

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
soumer
Newbie
Newbie
Posts: 3
Joined: October 28th, 2019, 8:05 pm

SABnzbd unzip/unrar/filejoin corrupts MKV file

Post by soumer »

The unzip/unrar/filejoin function of SABnzbd is corrupting MKV files (somehow not always).
If corrupted, there are small parts missing from the movie/series (playback with VLC is possible but jumps corrupted sections).

Docker for Windows is used to run my SABnzbd server.
Tested both docker images "sabnzbd/sabnzbd" and "linuxserver/sabnzbd".
Also tested "direct unpack" enabled and disabled.

When I use MKVToolNix to re-generate the MKV file I get the error message "Error in the Matroska file structure at position XYZ".

This does not happen when I disable the following options and combine the RAR archives manually:
- enable_unrar
- enable_unzip
- enable_7zip
- enable_filejoin
- enable_tsjoin

MKV file is only corrupt when combined by SABnzbd.

I do not see any error messages in the log.

Thanks for any help!

Attached log. I removed the logs from [downloader] due to character limit and also removed all links:

Code: Select all

2019-10-29 01:01:28,798::INFO::[__init__:681] Adding Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS{{ad3f98AReT}}.nzb
2019-10-29 01:01:28,800::INFO::[misc:999] Creating directories: /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:01:28,812::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.par2 - SABnzbd_nzf_Axfl_2 added to queue
2019-10-29 01:01:28,832::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part01.rar - SABnzbd_nzf_2lUglW added to queue
2019-10-29 01:01:28,853::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part02.rar - SABnzbd_nzf_PSyBNj added to queue
2019-10-29 01:01:28,874::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part03.rar - SABnzbd_nzf_OVsYl7 added to queue
2019-10-29 01:01:28,887::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part04.rar - SABnzbd_nzf_CPigLh added to queue
2019-10-29 01:01:28,901::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part05.rar - SABnzbd_nzf_8u2z0I added to queue
2019-10-29 01:01:28,914::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part06.rar - SABnzbd_nzf_Lp5ohX added to queue
2019-10-29 01:01:28,935::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part07.rar - SABnzbd_nzf_rPQBh7 added to queue
2019-10-29 01:01:28,956::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part08.rar - SABnzbd_nzf_gVtfEL added to queue
2019-10-29 01:01:28,969::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part09.rar - SABnzbd_nzf_mVxRy6 added to queue
2019-10-29 01:01:28,983::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part10.rar - SABnzbd_nzf_nrPTDu added to queue
2019-10-29 01:01:28,997::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part11.rar - SABnzbd_nzf_y6zJD7 added to queue
2019-10-29 01:01:29,009::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part12.rar - SABnzbd_nzf_gib5rO added to queue
2019-10-29 01:01:29,023::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part13.rar - SABnzbd_nzf_eQcLwp added to queue
2019-10-29 01:01:29,034::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part14.rar - SABnzbd_nzf_RaCbB7 added to queue
2019-10-29 01:01:29,044::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.part15.rar - SABnzbd_nzf_ngnBFq added to queue
2019-10-29 01:01:29,050::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol000+22.par2 - SABnzbd_nzf_M7_BLX added to queue
2019-10-29 01:01:29,056::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol022+22.par2 - SABnzbd_nzf_Yrozyl added to queue
2019-10-29 01:01:29,064::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol044+22.par2 - SABnzbd_nzf_qW5NvA added to queue
2019-10-29 01:01:29,072::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol066+21.par2 - SABnzbd_nzf_rPLAUp added to queue
2019-10-29 01:01:29,077::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol087+21.par2 - SABnzbd_nzf_uUO6pG added to queue
2019-10-29 01:01:29,083::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol108+21.par2 - SABnzbd_nzf_GZ1MOD added to queue
2019-10-29 01:01:29,089::INFO::[nzbstuff:530] File Description - WEK8B7ntziUFiiYy.vol129+21.par2 - SABnzbd_nzf_zG3BI7 added to queue
2019-10-29 01:01:29,089::INFO::[__init__:624] Backing up /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/__ADMIN__/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS{{ad3f98AReT}}.nzb.gz
2019-10-29 01:01:29,119::INFO::[nzbqueue:260] Saving queue
2019-10-29 01:01:31,371::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,374::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,375::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,378::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,382::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,383::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,383::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,386::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,391::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,393::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,394::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,393::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,395::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,395::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,397::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,411::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,415::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,419::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,422::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:31,453::INFO::[newswrapper:121] [email protected]: Connected using TLSv1.2 (AES128-SHA)
2019-10-29 01:01:33,426::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.par2 yenc
2019-10-29 01:01:33,458::INFO::[nzbstuff:1693] Checking all filenames for Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:01:33,461::INFO::[nzbstuff:1696] Re-sorting Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS after getting filename information
2019-10-29 01:01:42,363::INFO::[nzbstuff:1693] Checking all filenames for Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:01:42,363::INFO::[nzbstuff:1696] Re-sorting Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS after getting filename information
2019-10-29 01:01:53,203::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part01.rar yenc
2019-10-29 01:01:54,310::INFO::[misc:1474] Found a password that was set by the user: ad3f98AReT
2019-10-29 01:01:54,310::INFO::[assembler:269] Trying password "ad3f98AReT" on job "Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS"
2019-10-29 01:01:56,211::INFO::[assembler:297] Password "ad3f98AReT" matches for job "Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS"
2019-10-29 01:01:58,591::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part03.rar yenc
2019-10-29 01:02:01,601::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part02.rar yenc
2019-10-29 01:02:20,597::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part04.rar yenc
2019-10-29 01:02:21,716::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part05.rar yenc
2019-10-29 01:02:36,571::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part07.rar yenc
2019-10-29 01:02:39,211::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part08.rar yenc
2019-10-29 01:02:40,534::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part06.rar yenc
2019-10-29 01:02:55,871::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part10.rar yenc
2019-10-29 01:03:03,416::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part11.rar yenc
2019-10-29 01:03:12,021::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part12.rar yenc
2019-10-29 01:03:19,725::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part09.rar yenc
2019-10-29 01:03:21,033::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part13.rar yenc
2019-10-29 01:03:27,644::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part14.rar yenc
2019-10-29 01:03:27,843::INFO::[nzbqueue:784] [N/A] Ending job Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,690::INFO::[assembler:91] Decoding /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part15.rar yenc
2019-10-29 01:03:28,821::INFO::[nzbqueue:418] [N/A] Removed job Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,821::INFO::[nzbqueue:260] Saving queue
2019-10-29 01:03:28,825::INFO::[postproc:94] Saving postproc queue
2019-10-29 01:03:28,882::INFO::[postproc:340] Starting Post-Processing on Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS => Repair:True, Unpack:True, Delete:True, Script:None, Cat:tv
2019-10-29 01:03:28,882::INFO::[postproc:660] Starting verification and repair of Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,883::INFO::[__init__:920] [N/A] /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/__ADMIN__/__verified__ missing
2019-10-29 01:03:28,883::INFO::[postproc:675] Running verification and repair on set Description - WEK8B7ntziUFiiYy
2019-10-29 01:03:28,890::INFO::[newsunpack:1107] Quick-check for Description - WEK8B7ntziUFiiYy is OK, skipping repair
2019-10-29 01:03:28,898::INFO::[postproc:716] Verification and repair finished for Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,901::INFO::[misc:999] Creating directories: /downloads/tv/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,904::INFO::[postproc:381] Running unpack_magic on Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,928::INFO::[newsunpack:256] Unrar starting on /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,928::INFO::[newsunpack:516] Extracting rarfile /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Description - WEK8B7ntziUFiiYy.part01.rar (belonging to Description - WEK8B7ntziUFiiYy) to /downloads/tv/_UNPACK_Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:28,928::INFO::[misc:1474] Found a password that was set by the user: ad3f98AReT
2019-10-29 01:03:53,865::INFO::[newsunpack:828] Unpacked 2 files/folders in 24 seconds
2019-10-29 01:03:54,219::INFO::[newsunpack:260] Unrar finished on /incomplete-downloads/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:54,406::INFO::[postproc:383] Unpacked files [u'/downloads/tv/_UNPACK_Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS', u'/downloads/tv/_UNPACK_Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/NEWZ.png']
2019-10-29 01:03:54,407::INFO::[postproc:388] Finished unpack_magic on Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:54,412::INFO::[postproc:948] Collapsing /downloads/tv/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS/Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS
2019-10-29 01:03:54,416::INFO::[postproc:558] Cleaning up Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS (keep_basic=False)
2019-10-29 01:03:54,416::INFO::[nzbstuff:1759] [N/A] Purging data for job Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS (keep_basic=False, del_files=False)
2019-10-29 01:03:54,496::INFO::[database:272] Added job Mr.Robot.S02E03.German.DD+51.Synced.DL.720p.AmazonHD.x264-TVS to history
2019-10-29 01:03:54,501::INFO::[postproc:94] Saving postproc queue
2019-10-29 01:03:54,505::INFO::[downloader:301] Post-processing finished, resuming download
2019-10-29 01:03:58,506::INFO::[nzbqueue:260] Saving queue
2019-10-29 01:03:58,526::INFO::[postproc:94] Saving postproc queue
2019-10-29 01:08:23,801::INFO::[config:853] Writing settings to INI file /config/sabnzbd.ini
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd unzip/unrar/filejoin corrupts MKV file

Post by safihre »

Could you try to run SABnzbd not as a Docker but using the actual Windows executable?
You can download the portable version from https://sabnzbd.org/downloads
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
soumer
Newbie
Newbie
Posts: 3
Joined: October 28th, 2019, 8:05 pm

Re: SABnzbd unzip/unrar/filejoin corrupts MKV file

Post by soumer »

Just tried the Windows executable and it works this way.

Is it possible that unrar under Linux has a problem with Docker mounted directories?
soumer
Newbie
Newbie
Posts: 3
Joined: October 28th, 2019, 8:05 pm

Re: SABnzbd unzip/unrar/filejoin corrupts MKV file

Post by soumer »

Hi safihre!

I can confirm that the problem is with unrar in combination with Docker "bind mounts"

Looking at your sourcecode I tested unrar with the very same commands that are used in rar_extract_core:

Code: Select all

unrar x -idp -o- -or -pPASS './rar-file.part01.rar' './extracted/'
Unrar fails on the last .rar file with the error message:

Code: Select all

Cannot close the file .../file.mkv
Input/output error
Program aborted
If I copy all rar files to an internal container folder unrar works as expected and ends with message: All OK.

EDIT:

I just noticed that the error is not with unrar itself, since I'm not able to copy the MKV file back to the bind mount:

Code: Select all

cp file.mkv /downloads/
This fails with the same error message:

Code: Select all

cp: failed to close file.mkv
Input/output error
EDIT 2:

Sorry for bothering you with an issue that is not related to SABnzbd. It has to do with Docker bind mounted NTFS volumes.
https://github.com/docker/for-win/issues/1154

Feel free to close this bug report.

Thank you!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd unzip/unrar/filejoin corrupts MKV file

Post by safihre »

Great that you looked into it and reported back! Now other users with the problem can identify it :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply