mifi / mifi/editly

Duration changes with FPS

Open
#49 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.5k
Forks
374
PR merge metrics
No merged PRs in 30d

Description

Using JSON below I tried many different renders to see how framerate changes video duration. I will try to find bug in code but I may need some help. Here are some tests:

Desired duration: 90 seconds without transition, 89 seconds with transition (2x 0.5s duration)

width (px) height(px) fps output duration (sec) output duration (with transition null)
400 400 10 88.700000 89.700000
400 400 20 88.850000 89.850000
400 400 30 88.900000 X
400 400 40 88.925000 X
400 400 50 88.940000 X
400 400 60 88.950000 89.950000
400 400 120 88.975000 X
400 400 240 88.988000 89.988000
------------ ------------ ----- ----------------------- -----------------
800 800 10 88.700000 X
1920 1080 10 88.700000 X

(X means "no test")

JSON:

{ 
  "width": 1920, "height": 1080, "fps": 10,
  "outPath": "./subtitle.mp4",
  "defaults": {
    "layer": { "fontPath": "./Montserrat-Bold.ttf" },
    "transition": { "name": "fade" },
  },
  "clips": [
    { "duration": 30, "layers": [
       {
          "type": "subtitle",
          "text": "ST1 "
        },
         {
          "type": "title",
          "text": "T1 "
        }
    ] },
    { "duration": 30, "layers": [
       {
          "type": "subtitle",
          "text": "ST2 "
        },
         {
          "type": "title",
          "text": "T2 "
        }
    ] },
    { "duration": 30, "layers": [
       {
          "type": "subtitle",
          "text": "ST3 "
        },
         {
          "type": "title",
          "text": "T3 "
        }
    ] },
  ],
}

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 reported duration differences with the JSON configuration and the listed FPS values. Trace how clip durations and frame rates are converted during rendering, then verify that the output matches the stated 90-second duration without transitions and 89-second duration with transitions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
audio-video-rtc, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.