Skip to content

Commit

Permalink
Add badges + improve ffmpeg utils
Browse files Browse the repository at this point in the history
  • Loading branch information
TDHM committed May 16, 2023
1 parent 8906bad commit bd433b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Neural Subtitles Translator

[![Release](https://img.shields.io/github/v/release/tdhm/subtitles-translator)](https://img.shields.io/github/v/release/tdhm/subtitles-translator)
[![Build status](https://img.shields.io/github/actions/workflow/status/tdhm/subtitles-translator/main.yml?branch=main)](https://github.com/tdhm/subtitles-translator/actions/workflows/main.yml?query=branch%3Amain)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/subtitles-translator.svg)](https://pypi.python.org/pypi/subtitles-translator/)
[![codecov](https://codecov.io/gh/tdhm/subtitles-translator/branch/main/graph/badge.svg)](https://codecov.io/gh/tdhm/subtitles-translator)
[![Commit activity](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)
[![License](https://img.shields.io/github/license/tdhm/subtitles-translator)](https://img.shields.io/github/license/tdhm/subtitles-translator)
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Release](https://img.shields.io/github/v/release/tdhm/subtitles-translator)](https://img.shields.io/github/v/release/tdhm/subtitles-translator)
[![Build status](https://img.shields.io/github/actions/workflow/status/tdhm/subtitles-translator/main.yml?branch=main)](https://github.com/tdhm/subtitles-translator/actions/workflows/main.yml?query=branch%3Amain)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/subtitles-translator.svg)](https://pypi.python.org/pypi/subtitles-translator/)
[![Commit activity](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)](https://img.shields.io/github/commit-activity/m/tdhm/subtitles-translator)
[![License](https://img.shields.io/github/license/tdhm/subtitles-translator)](https://img.shields.io/github/license/tdhm/subtitles-translator)

Expand Down
3 changes: 1 addition & 2 deletions subtitles_translator/ffmpeg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def extract_srt(video_path: str) -> str:

# Use subprocess to call FFmpeg CLI
out = sp.run(["ffmpeg", "-i", video_path, "-map", "s:0", "-f", "srt", "-"], capture_output=True, text=True)
subtitles = out.stdout

return subtitles
return out.stdout


def insert_srt(video_path: str, output_path: str, srt_path: str) -> None:
Expand Down

0 comments on commit bd433b8

Please sign in to comment.