When trying to rip the pgs subtitles from The Departed (2006) untouched UHD-BD I encounter the following error:
INFO:pgsrip:Tesseract version: 5.5.1
INFO:pgsrip:Tesseract data: /usr/src/tessdata
DEBUG:pgsrip.media_path:/medias/Departed.mkv is using temporary folder /tmp/Departed.mkvf15_0gzz.pgsrip
DEBUG:pgsrip.mkv:Selecting track 4:de in /medias/Departed.mkv
DEBUG:pgsrip.media_path:/medias/Departed.mkv is using temporary folder /tmp/Departed.mkvpvtgtcak.pgsrip
DEBUG:pgsrip.mkv:Selecting track 5:en in /medias/Departed.mkv
2 PGS subtitles collected from 1 file
INFO:pgsrip.media:Decoding /medias/Departed.de.mkv
DEBUG:pgsrip.media:Removing temporary files in /tmp/Departed.mkvf15_0gzz.pgsrip
WARNING:pgsrip.core:Error while trying to rip /medias/Departed.de.mkv: <TesseractError> [(1, 'Image too large: (31184, 38469) Error during processing.')]
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pgsrip/core.py", line 69, in rip_pgs
srt = PgsToSrtRipper(p, options).rip(lambda t: rules.apply(t, '')[0])
File "/usr/local/lib/python3.13/site-packages/pgsrip/ripper.py", line 218, in rip
items = self.process(subs, items, post_process, confidence, max_width, oem, psm)
File "/usr/local/lib/python3.13/site-packages/pgsrip/ripper.py", line 159, in process
data = TsvData(tess.image_to_data(full_image.data, **config), confidence=confidence)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 596, in image_to_data
return {
~
...<6 lines>...
Output.STRING: lambda: run_and_get_output(*args),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}[output_type]()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 602, in <lambda>
Output.DICT: lambda: file_to_dict(run_and_get_output(*args), '\t', -1),
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 352, in run_and_get_output
run_tesseract(**kwargs)
~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 284, in run_tesseract
raise TesseractError(proc.returncode, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, 'Image too large: (31184, 38469) Error during processing.')
INFO:pgsrip.media:Decoding /medias/Departed.en.mkv
DEBUG:pgsrip.media:Removing temporary files in /tmp/Departed.mkvpvtgtcak.pgsrip
WARNING:pgsrip.core:Error while trying to rip /medias/Departed.en.mkv: <TesseractError> [(1, 'Image too large: (31184, 36944) Error during processing.')]
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pgsrip/core.py", line 69, in rip_pgs
srt = PgsToSrtRipper(p, options).rip(lambda t: rules.apply(t, '')[0])
File "/usr/local/lib/python3.13/site-packages/pgsrip/ripper.py", line 218, in rip
items = self.process(subs, items, post_process, confidence, max_width, oem, psm)
File "/usr/local/lib/python3.13/site-packages/pgsrip/ripper.py", line 159, in process
data = TsvData(tess.image_to_data(full_image.data, **config), confidence=confidence)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 596, in image_to_data
return {
~
...<6 lines>...
Output.STRING: lambda: run_and_get_output(*args),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}[output_type]()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 602, in <lambda>
Output.DICT: lambda: file_to_dict(run_and_get_output(*args), '\t', -1),
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 352, in run_and_get_output
run_tesseract(**kwargs)
~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pytesseract/pytesseract.py", line 284, in run_tesseract
raise TesseractError(proc.returncode, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, 'Image too large: (31184, 36944) Error during processing.')
0 PGS subtitle ripped from 1 file
While strictly speaking, this is a Tesseract error, I'd expect pgsrip to handle all pgs subtitles that appear in the wild (it is this way in the retail UHD-BD)
When trying to rip the pgs subtitles from The Departed (2006) untouched UHD-BD I encounter the following error:
<TesseractError> [(1, 'Image too large: (31184, 38469) Error during processing.')]Full log:
The command I used:
sudo docker run -it --rm -v /mnt/merger/HD\ ungeguckt/Departed\ -\ Unter\ Feinden\ \(2006\)/:/medias -u $(id -u sebastian):$(id -g sebastian) ratoaq2/pgsrip --debug -l en -l de -v --all /mediasI attached the extracted pgs subtitles, I hope I did it right:
departed_.zip
While strictly speaking, this is a Tesseract error, I'd expect pgsrip to handle all pgs subtitles that appear in the wild (it is this way in the retail UHD-BD)
Thanks for pgsrip, it is awesome and helps me a lot!