[FFmpeg-user] Trouble with frame accuracy applying subcaps using .ass files to 23.976fps video

Media Mouth communque at gmail.com
Fri Aug 25 18:32:37 EEST 2023

Currently testing .ass subcaps in a VFX workflow.
The goal is to drop specfic text over specific shots and the in/out points have to be frame accurate
We're working in a 23.976 project.

Currently having no trouble using FFmpeg to generate frame-accurate subclips of individual shots from a full-show export by converting hh:mm:ss:ff to seconds and then handling the 24 to 23.976 offset, using the following alorithm:

	InPoint_Seconds = ConvertToSeconds(InPoint_Hmsf_FullShow) - ConvertToSeconds(Start_Hmsf_FullShow) // Convert from SMTPE Time Code to seconds.
	InPoint_Seconds = InPoint_Seconds * (1001 / 1000) //Handle 24 to 23.976 offset
	OutPoint_Seconds = [Same idea as above]
	Duration_Seconds = Output_Seconds - InPoint_Seconds
	> ffmpeg -ss InPoint_Seconds -t Duration_Seconds -i SourcePath -c copy DestPath

So generating frame-accurate copies of portions of a larger file works with perfect accuracy

BUT when applying the same logic to subcaps using .ass files, sometimes they land with frame accuracy, and sometimes they don't (They'll be 1 frame late at most, and it does not increase over the span of the source clip).

Curious if anyone has any ideas.

- Chris C

More information about the ffmpeg-user mailing list