Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing Frame Rate? #264

Open
jwcharp opened this issue Aug 25, 2023 · 3 comments
Open

Increasing Frame Rate? #264

jwcharp opened this issue Aug 25, 2023 · 3 comments

Comments

@jwcharp
Copy link

jwcharp commented Aug 25, 2023

@izzytwosheds
This library has saved me a significant amount of time. I was on the verge of diving deep into the wormhole of implementing the MediaCodec from scratch, so I truly appreciate your assistance.

I have a query that might seem unusual, but I'm hopeful you might have a solution or at least guide me in the right direction.

Here are the scenarios I'm looking at:

Input: 1920x1080 resolution at 30fps, h264 (video/avc)
Output: 1280x720 resolution at 120fps, h264 (video/avc)

Input: 1920x1080 resolution at 60fps, h264 (video/avc)
Output: 1280x720 resolution at 120fps, h264 (video/avc)

I understand the frames required for 120fps don't actually exist in the input. However, is there a way to auto-multiply or duplicate the existing frames to achieve this?

Separately, I also have this scenario which I believe is achievable. I'll be working on it over the next few days:

Input: 1920x1080 resolution at 30fps, 40-second video, h264 (video/avc)
Output: 1280x720 resolution at 120fps, 10-second video, h264 (video/avc)

For the latter scenario, I assume that by simply setting (MediaFormat.KEY_FRAME_RATE, 120) I can get the desired result. But I'm still not certain about how to approach the first two scenarios mentioned above.

Thanks once again for all your help!

Best regards,
Joe

@izzytwosheds
Copy link
Contributor

Apologies for delayed response. Happy that you are enjoying LiTr!
Can you elaborate why you need to increase the frame rate? As you said, effectively we will have to duplicate frames, so we will be increasing file size without any improvements in visual quality. That is the reason LiTr currently supports only frame rate reduction. But I am happy to learn more about your use case.

@jwcharp
Copy link
Author

jwcharp commented Nov 17, 2023

Sorry for the delay response been doing a lot of business travel.

Unfortunately have an issue where some camera manufactures output a 120 FPS video at 30 FPS and 4x time length (mainly DJI drones and cameras) so need to downscale and time remap so the video is 120 fps at 1x time. currently doing ffmpeg to update the container, but though it would be faster and better to have this all done in LiTr.

@jwcharp
Copy link
Author

jwcharp commented Feb 8, 2024

Hello @izzytwosheds
I thought I would not have had issue with this, but I seem to be struggle also with this senario:
Input: 1920x1080 resolution at 30fps, 40-second video, h264 (video/avc)
Output: 1920x1080 resolution at 120fps, 10-second video, h264 (video/avc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants