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

Dynamic video rate #30

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

erdoganonur
Copy link

This is my first Ruby code, please check it out as structurally.

We have new dependency that it is mp4fpsmod. It is quite good at video resampling etc.

I follow this step for create dynamic fps video.

  1. Before we create video from screenshots, we create a timecode file from creation date of screenshots.
  2. A video that has constant frame rate is created via FFMPEG.
  3. mp4fpsmod convert the video to variable frame rate video against to time code file. Which means every moment of video can have different fps.
  4. Variable frame rated video is converted to constant frame rate video via FFMPEG. Basically FFMPEG resample fps against to peak fps value.

I added lots of comments and system.out to make more readable and debugging purposes.

We can create VFR without mp4fpsmod via editing meta data of video but it is really complex.

@isonic1
Copy link
Owner

isonic1 commented Sep 5, 2017

HI @erdoganonur,

First off, thank you so much for taking the time to create this PR! A lot of people do not go that far in doing that.

With that said, I'm a bit reluctant to introduce a new tool (mp4fpsmod) to this. For one, ffmpeg and mp4box work on all platforms (linux, osx, windows). Though I don't support Windows currently because I haven't had time to work on it, I will do so in the future.

The new frame rate argument I added fo my iOS videos are good. At least for my use case when viewing video test results. Although, it's not entirely smooth

Have you tried tweaking the seconds and frame rate arguments like below for your use case?
flick video -p ios -s 0.1 -a start (takes a screenshot per 0.1 seconds) Though, this depends on machine and iOS device resources how fast it actually happens.
flick video -p ios -r 3 -a stop

How hard would it be to make ffmpeg do what mp4fpsmod is doing? I am open to making adjustments to Flick for this but I'm also trying to keep things really simple too.

@erdoganonur
Copy link
Author

Hi, @isonic1,

I am sorry for late response, you are right on your concerns about adding a new tool to flick. I have googled a bit about mp4box so, we can deal with it via mp4Box. I'll try at first chance.

Tweaking isn't an option in my experiments because screenshots have the variety of size within 70kb to 1.5MB according to their contents so, capturing time is dependent on the size.

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

Successfully merging this pull request may close these issues.

2 participants