I want to create a Python script that make subtitle (a ticking timecode).
I have an h.264 binary file that has timestamp in each frame. so I want to parse this timestamp and make the subtitle with it.
Here's what I've tried with ffmpeg below.
ffmpeg -y -i video.avi -vf "drawtext=fontfile=C:\Windows\Fonts\consolab.ttf: fontsize=12:fontcolor=yellow: box=1:boxcolor=black@0.4: text='TIME\: %{pts\:gmtime\:1561939200}':x=(w-tw)/2:y=(h-th)/2" test.avi
Output .avi
is okay with the timestamp, but, I needed to re-encode the source video file which takes a lot of time.
So, I want to use a different way, which is creating subtitles.
Question is, is there any way to make subtitle with frame time? or useful info to fill me in?
The current result:
The expected result: