Closed koroban closed 1 year ago
Part corruptions have been an issue I've been tackling for a while. There are dozens of edge-cases which pop up with many not having an automated method of resolving them.
I do already have a patch to fix this issue 6ceea4b7, but it can cause some issues albeit rarely (If corrupt parts intersect with muted segments downloaded with the stream downloader the whole stream may have to be downloaded again).
I'll push this to the develop branch for now while I do some more testing.
Thank you for your help. you're right, it fixed it for this video, but I get following error for muted audio for another video now:
Feb 04 15:15:04 twitchdl python3[369]: 2023-02-04 15:15:04 [ ERROR] Error downloading VOD 1724162425.
Feb 04 15:15:04 twitchdl python3[369]: Traceback (most recent call last):
Feb 04 15:15:04 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 657, in get_vod
Feb 04 15:15:04 twitchdl python3[369]: self.download.get_m3u8_video(m3u8.loads(vod_playlist), vod_base_url, vod_json['store_directory'])
Feb 04 15:15:04 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/downloader.py", line 64, in get_m3u8_video
Feb 04 15:15:04 twitchdl python3[369]: str('{:05d}'.format(int(ts_id.split('.')[0].replace('-muted', ''))) + '.ts')))
Feb 04 15:15:04 twitchdl python3[369]: ValueError: invalid literal for int() with base 10: '18-unmuted'
Feb 04 15:15:04 twitchdl python3[369]: During handling of the above exception, another exception occurred:
Feb 04 15:15:04 twitchdl python3[369]: Traceback (most recent call last):
Feb 04 15:15:04 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 393, in get_vod_connector
Feb 04 15:15:04 twitchdl python3[369]: self.get_vod(vod_json, get_video, get_chat, vod_live)
Feb 04 15:15:04 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 667, in get_vod
Feb 04 15:15:04 twitchdl python3[369]: raise VodDownloadError(e)
Feb 04 15:15:04 twitchdl python3[369]: src.exceptions.VodDownloadError: Video download failed. Error: invalid literal for int() with base 10: '18-unmuted'
Feb 04 15:15:04 twitchdl python3[369]: 2023-02-04 15:15:04 [ INFO] Now processing VOD: 1720086285
Feb 04 15:15:05 twitchdl python3[369]: 2023-02-04 15:15:05 [ INFO] VOD offline.
Feb 04 15:15:07 twitchdl python3[369]: 2023-02-04 15:15:07 [ INFO] Grabbing video...
Feb 04 15:15:08 twitchdl python3[369]: 2023-02-04 15:15:08 [ ERROR] Error downloading VOD 1720086285.
Feb 04 15:15:08 twitchdl python3[369]: Traceback (most recent call last):
Feb 04 15:15:08 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 657, in get_vod
Feb 04 15:15:08 twitchdl python3[369]: self.download.get_m3u8_video(m3u8.loads(vod_playlist), vod_base_url, vod_json['store_directory'])
Feb 04 15:15:08 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/downloader.py", line 64, in get_m3u8_video
Feb 04 15:15:08 twitchdl python3[369]: str('{:05d}'.format(int(ts_id.split('.')[0].replace('-muted', ''))) + '.ts')))
Feb 04 15:15:08 twitchdl python3[369]: ValueError: invalid literal for int() with base 10: '3096-unmuted'
Feb 04 15:15:08 twitchdl python3[369]: During handling of the above exception, another exception occurred:
Feb 04 15:15:08 twitchdl python3[369]: Traceback (most recent call last):
Feb 04 15:15:08 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 393, in get_vod_connector
Feb 04 15:15:08 twitchdl python3[369]: self.get_vod(vod_json, get_video, get_chat, vod_live)
Feb 04 15:15:08 twitchdl python3[369]: File "/home/downloader/twitch-archiver/src/processing.py", line 667, in get_vod
Feb 04 15:15:08 twitchdl python3[369]: raise VodDownloadError(e)
Feb 04 15:15:08 twitchdl python3[369]: src.exceptions.VodDownloadError: Video download failed. Error: invalid literal for int() with base 10: '3096-unmuted'
I am sorry to cause you so much trouble.
Seems the issue is to do with segments muted by automated copyright detection which are later unmuted. A fix is now available on the develop branch with 26145e5564be94cee7086700b9592f9e4c64e833.
I am sorry to cause you so much trouble.
No worries, the more issues people find and report, the better I can make this tool for everyone :D
Describe the bug You have included a check to see if the TS files were downloaded completely and everything can be merged without corrupting. Unfortunately, if the streamer had problems with his internet during the stream, it can happen that these "corruptions" are already streamed to twitch and thus the VoD is never completely downloaded.
Supplied arguments
twitch-archiver.py -d /data/twitch -c kimtnt -N -D
Error log
Operating system Linux
Additional context Seems to be a problem regarding this VoD. already tried to download the VoD multiple times and only this one has so many errors. Maybe add a switch to ignore coorupted files?