I've just gone through a process of adding chapters to a file using ffmpeg. Works great but, the way I found to do it required converting the marker placements to milliseconds from the original timecode. Since my editing software will display my files with framecounts, it occurred to me that it might be possible to save some conversion effort by telling ffmpeg where to place the chapter markers using these framecounts.
Here's an example of a chapter marker I placed:
I see that the TIMEBASE is set to 1/1000. That means that the START time for this chapter is 7 seconds (210 frames). To what extent will ffmpeg accept a formula as its TIMEBASE? Can I put in something like:Code:[CHAPTER] TIMEBASE=1/1000 START=7000 END=291199 title=Chapter marker
orCode:[CHAPTER] TIMEBASE=1/30 START=210 END=8736 title=Chapter marker
thanks.Code:[CHAPTER] TIMEBASE=100/2997 START=210 END=8736 title=Chapter marker
+ Reply to Thread
Results 1 to 5 of 5
-
-
Not sure how to read the content in that link but, without a clear (to me) answer, I tested. I'd been nervous about the possibility of breaking something but, as it turned out, both of the formula i posted (1/30 and 100/2997) worked. They both allowed me to input my chapter start times in frames, one for 30fps content, the other for 29.97fps content.
This should make it unnecessary to convert to ms before creating a chapters.txt file for ffmpeg and allow reading frame counts directly from an editing timeline that has the ability to display in frames.
thanks,
babag -
Using the frame duration as the time base so you can enter frame numbers was a good/novel idea!
Note that a duration of 1001/30000 may be more accurate than 100/2997. 29.97 is usually shorthand (rounded) from 29.9700299700299700... (30000/1001). -
thanks, jagabo! will include that in my notes and scripts.
thanks again,
babag
Similar Threads
-
Help to find ffmpeg setting
By payamhd in forum Newbie / General discussionsReplies: 4Last Post: 24th Sep 2020, 05:20 -
FFmpeg defining/restricting Format Setting GOP M, N frames
By deepfrayder in forum Newbie / General discussionsReplies: 5Last Post: 22nd Dec 2019, 23:43 -
Any way to show milliseconds in Youtube?
By stranno in forum Newbie / General discussionsReplies: 1Last Post: 23rd Aug 2019, 10:53 -
what PCM setting to use in ffmpeg?
By david151 in forum Video ConversionReplies: 3Last Post: 9th Jul 2019, 12:25 -
Setting widescreen aspect ratio flags in FFmpeg?
By Master Tape in forum Video ConversionReplies: 8Last Post: 7th Jul 2018, 14:25