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

feat: added srt support #5

Merged
merged 3 commits into from Nov 26, 2021
Merged

feat: added srt support #5

merged 3 commits into from Nov 26, 2021

Conversation

EKarton
Copy link
Owner

@EKarton EKarton commented Nov 26, 2021

Description:

This PR is about adding .srt support for subtitles. This PR should not affect existing behaviour in parsing .webvtt subtitles.

If the subtitle filename ends in .srt, it will use the SRT subtitle parser. Else, it will use the WebVTT subtitle parser.

Manual Test:

  1. Ran pip3 install -r requirements.txt
  2. Ran python3 src/main.py tests/videos/input_1.mp4 -s tests/subtitles/subtitles_1.srt -o output.pdf. It outputted the subtitles correctly:

output.pdf

  1. Ran python3 src/main.py tests/videos/input_2.mp4 -s tests/subtitles/subtitles_2.srt -o output.pdf. It outputted the subtitles correctly too:

output.pdf

  1. Ran cd test && python3 -m unittest * and they all passed.

@EKarton EKarton merged commit 03ce7d6 into main Nov 26, 2021
@EKarton EKarton mentioned this pull request Nov 26, 2021
@EKarton EKarton deleted the feat/add-srt-support branch November 26, 2021 19:45
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

1 participant