Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cli #391

Merged
merged 5 commits into from
May 11, 2024
Merged

Feature/cli #391

merged 5 commits into from
May 11, 2024

Conversation

DoubleStarK
Copy link
Contributor

@DoubleStarK DoubleStarK commented May 10, 2024

CLI模式重获新生

  • 修复cli模式不能用的问题,现在cli模式可以用啦
  • 修复翻译文件缺失key的问题

主流程经过测试↓

(.venv) ➜  pyvideotrans git:(feature/cli) python cli.py -m /Users/x/work/fun_projects/you2bi/downloads/4b7c8fca8528770acfb700b936def7fb/IcXbDVkwmIo.mp4
/Users/x/work/fun_projects/pyvideotrans/.venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Start processing:   0%|                                                                                                                                                   | 0/5 [00:00<?, ?it/s]codec='h264_videotoolbox'
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/x/work/fun_projects/pyvideo_my/pyvideotrans/videotrans/styles/no-remove.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.13.100
  Duration: 00:00:02.00, start: 0.000000, bitrate: 341 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 512x288 [SAR 1:1 DAR 16:9], 192 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.27.100 libx264
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 134 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_videotoolbox))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_videotoolbox @ 0x14070bc00] This device does not support the qmin option. Value ignored.
[h264_videotoolbox @ 0x14070bc00] This device does not support the qmax option. Value ignored.
[h264_videotoolbox @ 0x14070bc00] This device does not support the qmin option. Value ignored.
[h264_videotoolbox @ 0x14070bc00] This device does not support the qmax option. Value ignored.
Output #0, mp4, to '/Users/x/work/fun_projects/pyvideo_my/pyvideotrans/tmp/test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf61.1.100
  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 512x288 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 30k tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.3.100 h264_videotoolbox
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.3.100 aac
[h264_videotoolbox @ 0x14070bc00] Color range not set for yuv420p. Using MPEG range.
[out#0/mp4 @ 0x14110cae0] video:54KiB audio:33KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 3.488931%
frame=   60 fps=0.0 q=-0.0 Lsize=      90KiB time=00:00:01.96 bitrate= 376.3kbits/s speed= 7.1x    
[aac @ 0x1407289e0] Qavg: 3295.299
time=0.3487386703491211
Start merging and outputting result files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [01:22<00:00, 16.58s/it]结束100% IcXbDVkwmIo.mp4
Start merging and outputting result files: : 6it [01:22, 12.74s/it]
Succeed 100

@jianchang512 jianchang512 merged commit ff20b51 into jianchang512:main May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants