mltframework / mltframework/mlt

Timewarp Producer Issue: Ignores framerate settings in mlt_profile, reports wrong frame on callback.

Open
#769 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.9k
Forks
387
Avg merge
17h 28m
Merged PRs (30d)
8

Description

I've been trying to use a timewarp producer to allow for fast-forward and slow-motion features in my current application and noticed some issues after hot swapping my existing producer (avformat) with a timewarp producer wrapping my original producer.

Firstly, I noticed that my callback consumer-frame-show no longer respects my current frame rate settings (i.e. when I change my profile to 4 frames per second, I still get 24 frame show callbacks a second that I have to deal with) which is causing some parts of my application to not respect the target framerate settings. I've even tried to reassign the profile after changes to frame-rate, but it would still always callback 24 times a second.

Secondly, I want to know if there's a good way to discern the position of the frame relative to the internal producer (the avformat producer) from within the consumer-frame-show callback. I've noticed that the timewarp obviously changes the frame's "position" to report the position of the timewarp producer. While I could perhaps discern the position using a simple multiplication (timewarp warp_speed value * frame position) I can't help but wonder if there's a better way to do this.

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 behavior with a timewarp producer wrapping an avformat producer, using mlt_profile frame-rate settings and the consumer-frame-show callback. Trace the timewarp producer's frame position and callback timing, then verify that the callback rate follows the profile and that the internal producer position can be identified.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.