pysubs2
pysubs2 copied to clipboard
Error: Framerate must be specified when writing MicroDVD.
How can the framerate be set when this line results in the mentioned error?
subs.save(file_name, format_="microdvd", fps=24)
@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