Closed pikilipita closed 5 months ago
maybe just encode an extra fame at the end
That would fix the duration issue, but because this is adding one extra frame, the framerate calculation would be wrong
whats it like with 100 frames?
Check out my answer here: https://github.com/Vanilagy/mp4-muxer/issues/31#issuecomment-1910857049
Does this address your issue? This library respects the duration
field on the frames you pass into it to determine the duration of the final video.
yes, problem solved by adding the duration value, I didn't knew about the videoFrame property. Thank you very much for doing this mp4 muxer, it's been very helpful in my motion design editor: https://pikimov.com
Awesome, glad it fixed it for you. And that project is dope!
I am facing an issue with video frames timestamps & framerate calculation.
Let's say I am creating an 1 second video made of 10 frames: one frame every 1/10 seconds.
the encoded timestamps will be encoded as follow: 0 : 0 1 : 100000 2 : 200000 3 : 300000 4 : 400000 5 : 500000 6 : 600000 7 : 700000 8 : 800000 9 : 900000
When opening this video into a video player ( VLC, quicktime... ), the video is seens as an 11.11111 fps framerate with a duration of 0.9 seconds. That must be because video players see it as a 10 frames video with a duration of 0.9 seconds ( the timestamp of the last frame ).
Is there a way to specify the video duration when muxing the mp4 file, so that the video will be seen with 1s length?
I can provide a video file if that helps