Commit 52eac62
Daniel Nylander
v0.11.2: Detect and reject bitmap subtitles (PGS/VobSub)
Bitmap subtitle formats (hdmv_pgs_subtitle, dvd_subtitle, dvb_subtitle, xsub)
contain images, not text, and cannot be translated. Previously these were
extracted as binary data and sent to DeepL, producing garbled output.
- find_source_subtitle(): filter out bitmap codecs, prefer text tracks
- translate_subtitle(): check codec before extraction, raise clear error
- Log warning when only bitmap subtitles available
Fixes: Grand Designs UK S27E06 producing 86% corrupted output1 parent 8356088 commit 52eac62
3 files changed
Lines changed: 48 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
1 | 12 | | |
2 | 13 | | |
3 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
556 | 572 | | |
557 | 573 | | |
558 | | - | |
| 574 | + | |
559 | 575 | | |
560 | 576 | | |
561 | 577 | | |
562 | 578 | | |
563 | | - | |
| 579 | + | |
564 | 580 | | |
565 | 581 | | |
566 | 582 | | |
567 | | - | |
568 | | - | |
569 | | - | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
570 | 586 | | |
571 | 587 | | |
572 | 588 | | |
| |||
620 | 636 | | |
621 | 637 | | |
622 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
623 | 654 | | |
624 | 655 | | |
625 | 656 | | |
| |||
0 commit comments