Inconsistent FPS during recording to mp4
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- audio-video-rtc, mobile-dev
Research direction
The report covers Camera2Source with GenericStream in the Android library and gives no file name, test, or reproduction steps. Start by finding where the recorder and the video frame timestamps are handled, but expect to reproduce the drop on a device first. Done would mean a root cause for the intermittent fps drop, confirmed by a fix or a reproduction in the maintainer's own footage.
Written by the indexing model from the issue text.
Description
Describe the bug
We have seen footage recorded have a transient bug which causes the FPS to drop while recording to an MP4 file. We are using h264 encoding w/ 1280x720p @ 30fps (android fps Range [30, 30]) w/ 4Mbps bitrate with AAC audio encoding @ 96Kbps bitrate. Normally, all the footage recorded follows the consistent 30fps setting, with ffprobe reporting ~29.82 fps or similar values. However, footage which have the bug present, will report an average fps from ffprobe of ~22fps or even as low as ~5 or ~6fps, which is below even the variable FPS range supported on our device (the lowest FPS range with a 30fps maximum is [7, 30]). This has become a problem because when footage is finished being recorded, the audio and video appear out of sync. For now, we have a process which detects footage with this bug, and simply trans-codes it to keep both tracks in sync by inserting duplicate frames. This makes the footage appear choppy or slowed, which is not ideal for our customers.
I know this is not a great description in terms of debugging, but we have not been able to reliably reproduce the problem yet. We are still trying, but currently we have only seen the issue on customer devices, and we cannot provide their footage as example. We are working to get example footage of our own, and to narrow down steps to reproduce the bug.
The devices which are recording the footage are all the same model of device, so this is not a device variation issue. The device runs AOSP version 9 (SDK 28).
Expected behavior
Recorded footage should maintain avg. fps @ 30 ([30, 30] on android).
Smartphone (please complete the following information):
- Library version: 2.5.5 & 2.6.0
- Device: Cammpro C8
- OS: Android 9
- Media server: nginx-rtmp
- Class used: GenericStream w/ Camera2Source.
- Dominant language
- Kotlin
- Stars
- 3k
- Forks
- 946
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pedroSG94/RootEncoder
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
pedroSG94/RootEncoder#2213 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pedroSG94/RootEncoder#2207 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pedroSG94/RootEncoder#2203 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
pedroSG94/RootEncoder#2192 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pedroSG94/RootEncoder#2177 · 44 comments ·
Maintainers usually reply within 2 days
All issues in pedroSG94/RootEncoder
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
callstack/react-native-brownfield#492 · 1 comment ·
Maintainers usually reply within 4 days
-
fix: retain the best partial noise-correction solutionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
world-federation-of-advertisers/cross-media-measurement#4653 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kabirvashisht4-glitch/Vet#22 ·
-
documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
djazairdev/wilayas#23 ·
Maintainers usually reply within 1 day