smacke / smacke/ffsubsync

Framerate was not specified and cannot be read from the MicroDVD file error when used on a .sub file

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
7.9k
Forks
323
PR merge metrics
No merged PRs in 30d

Description

Environment (please complete the following information):

  • OS: Windows 10 WSL Debian
  • python version 3.9.2
  • subsync version 0.4.20

Describe the bug
I get a Framerate was not specified and cannot be read from the MicroDVD file. error when trying to use ffsubsync on a .sub file, although I used --frame-rate FRAMERATE to specify the frame-rate.

To Reproduce
What I have tried:

ffs --frame-rate 31250 "video.mkv" -i "unsync.sub" -o "sync.sub"
ffs --frame-rate 31250 --skip-infer-framerate-ratio "video.mkv" -i "unsync.sub" -o "sync.sub"
ffs --frame-rate 31250 "reference.srt" -i "unsync.sub" -o "sync.sub"

Expected behavior
Frame-rate should be read from the command line argument and the program should carry on.

Output

[13:16:58] INFO     extracting speech segments from reference 'video.mkv'...
           INFO     Checking video for subtitles stream...                                              speech_transformers.py:259
           INFO     Video file appears to lack subtitle stream                                          speech_transformers.py:264
100%|██████████████████████████████████████████████████████████████████████████████████▉| 5460.0/5460.051 [01:01<00:00, 88.96it/s]
[13:18:00] INFO     ...done                                                                                       ffsubsync.py:444
           INFO     extracting speech segments from subtitles file(s)                                             ffsubsync.py:134
                    ['unsync.sub']...
           INFO     detected encoding: WINDOWS-1252                                                          subtitle_parser.py:85
           ERROR    Framerate was not specified and cannot be read from the MicroDVD file.                        ffsubsync.py:223

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the shown ffs --frame-rate commands and a MicroDVD .sub file, then trace how the CLI frame-rate argument reaches MicroDVD parsing. Done means the supplied frame rate is honored and synchronization completes without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.