GameSentenceMiner 2.19.9__py3-none-any.whl → 2.19.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of GameSentenceMiner might be problematic. Click here for more details.

@@ -460,12 +460,15 @@ def find_black_bars(video_file, screenshot_timing):
460
460
 
461
461
  logger.debug(f"Original video dimensions: {orig_width}x{orig_height}")
462
462
 
463
+ ss_seek = max(0, float(screenshot_timing) - 0.5)
463
464
  cropdetect_command = ffmpeg_base_command_list_info + [
465
+ "-ss", str(ss_seek), # fast input seek
464
466
  "-i", video_file,
465
- "-ss", f"{screenshot_timing}", # Start near the screenshot time
466
- "-t", "1", # Analyze for 1 second
467
- "-vf", "cropdetect=limit=16", # limit=0 means true black only, round=2 for even dimensions
468
- "-f", "null", "-" # Discard video output
467
+ "-t", "1", # analyze ~1 second
468
+ "-an", # ignore audio
469
+ "-vf", "cropdetect=limit=16:round=2",
470
+ "-frames:v", "8", # only analyze a few frames
471
+ "-f", "null", "-"
469
472
  ]
470
473
 
471
474
  result = subprocess.run(
@@ -496,6 +499,11 @@ def find_black_bars(video_file, screenshot_timing):
496
499
  logger.debug(f"Crop would be {crop_width}x{crop_height} ({area_ratio:.1%} of original area)")
497
500
  logger.debug(f"Original aspect ratio: {orig_aspect:.3f}, Crop aspect ratio: {crop_aspect:.3f}, Difference: {aspect_diff:.1%}")
498
501
 
502
+ # If the crop is within 1% of the original aspect ratio, don't crop
503
+ if aspect_diff < 0.01:
504
+ logger.info("Detected crop does not significantly change aspect ratio. Skipping crop.")
505
+ return None
506
+
499
507
  # Safeguards:
500
508
  # 1. Crop must retain at least 25% of the original video area
501
509
  # 2. Aspect ratio must not change by more than 30%
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.19.9
3
+ Version: 2.19.10
4
4
  Summary: A tool for mining sentences from games. Update: Dependencies, replay buffer based line searching, and bug fixes.
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -45,7 +45,7 @@ GameSentenceMiner/util/audio_player.py,sha256=-yFsf0qoTSS1ga5rCmEJZJGUSJzXCvfZHY
45
45
  GameSentenceMiner/util/configuration.py,sha256=X6AFueDXi-HabDCGf8u44Z1rPO8XR6Wal3SvGz7hcbI,48806
46
46
  GameSentenceMiner/util/db.py,sha256=iCHUzlgOJgNjQ5-oDa7gnDWmzdlEryOzbXfn9ToQPfY,33034
47
47
  GameSentenceMiner/util/electron_config.py,sha256=KfeJToeFFVw0IR5MKa-gBzpzaGrU-lyJbR9z-sDEHYU,8767
48
- GameSentenceMiner/util/ffmpeg.py,sha256=iJAo2GUF0B4SDhG9rp-xaA94VSAc00aY1SyRRZ-i_1w,39730
48
+ GameSentenceMiner/util/ffmpeg.py,sha256=KZhoVVCGnlPIoVJ83XVQmjHDnzO4WefZRoLyceS6pEE,40100
49
49
  GameSentenceMiner/util/games_table.py,sha256=VM68MAsdyE6tpdwM4bDSk67qioBOvsEO8-TpnRmUnSo,12003
50
50
  GameSentenceMiner/util/get_overlay_coords.py,sha256=jQ0hcrEh9CfvjlBRJez3Ly-er4MjBWC2zirA-hYz5hQ,26462
51
51
  GameSentenceMiner/util/gsm_utils.py,sha256=mASECTmN10c2yPL4NEfLg0Y0YWwFso1i6r_hhJPR3MY,10974
@@ -135,9 +135,9 @@ GameSentenceMiner/web/templates/components/kanji_grid/thousand_character_classic
135
135
  GameSentenceMiner/web/templates/components/kanji_grid/wanikani_levels.json,sha256=8wjnnaYQqmho6t5tMxrIAc03512A2tYhQh5dfsQnfAM,11372
136
136
  GameSentenceMiner/web/templates/components/kanji_grid/words_hk_frequency_list.json,sha256=wRkqZNPzz6DT9OTPHpXwfqW96Qb96stCQNNgOL-ZdKk,17535
137
137
  GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
- gamesentenceminer-2.19.9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
139
- gamesentenceminer-2.19.9.dist-info/METADATA,sha256=RFFkSBkHdO-cLlRBhT0zKXPVE0vyNV2QpysT45nQ_Pk,8180
140
- gamesentenceminer-2.19.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
141
- gamesentenceminer-2.19.9.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
142
- gamesentenceminer-2.19.9.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
143
- gamesentenceminer-2.19.9.dist-info/RECORD,,
138
+ gamesentenceminer-2.19.10.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
139
+ gamesentenceminer-2.19.10.dist-info/METADATA,sha256=EhqseprTQY7un78Qu-PUZsLehPILBcKMlJIVwiikvAk,8181
140
+ gamesentenceminer-2.19.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
141
+ gamesentenceminer-2.19.10.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
142
+ gamesentenceminer-2.19.10.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
143
+ gamesentenceminer-2.19.10.dist-info/RECORD,,