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

Error: Framerate must be specified when writing MicroDVD. #66

Open
tin2tin opened this issue Mar 14, 2023 · 1 comment
Open

Error: Framerate must be specified when writing MicroDVD. #66

tin2tin opened this issue Mar 14, 2023 · 1 comment

Comments

@tin2tin
Copy link

tin2tin commented Mar 14, 2023

How can the framerate be set when this line results in the mentioned error?
subs.save(file_name, format_="microdvd", fps=24)

@tkarabela
Copy link
Owner

@tin2tin Can you describe the problem in more detail? I don't see what the issue is:

from pysubs2 import SSAFile, SSAEvent, make_time

subs = SSAFile()
subs.append(SSAEvent(
    start=make_time(s=0),
    end=make_time(s=10),
    text="First subtitle"
))
subs.append(SSAEvent(
    start=make_time(s=10),
    end=make_time(s=20),
    text="Second subtitle"
))

subs.save("test.sub", format_="microdvd", fps=24)

Results in file:

{0}{0}24
{0}{240}First subtitle
{240}{480}Second subtitle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants