Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#4834 closed enhancement (invalid)

Potential enhancement for -drawtext timecode

Reported by: Chuckles32 Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords: drawtext timecode
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Not a bug, but a feature request/enhancement.

Using the drawtext filter to overlay a timecode to a video, the only option is to display hh:mm:ss.ff. For many applications, it's not necessary to display the hh or ff. It would be nice to use the drawtext filter with timecode to display just mm:ss, or just ss.

-vf drawtext="fontsize=15:fontfile=/Library/Fonts/DroidSansMono.ttf:\
timecode='00\:00\:00\:00':rate=25:text='TCR\:':fontsize=72:fontcolor='white':\
boxcolor=0x000000AA:box=1:x=860-text_w/2:y=960"

Would be nice to be able to control which parts of the timecode are displayed. The example below would only overlay the hh:mm text of the timecode.

-vf drawtext="fontsize=15:fontfile=/Library/Fonts/DroidSansMono.ttf:\
timecode='xx\:00\:00\:xx':rate=25:text='TCR\:':fontsize=72:fontcolor='white':\
boxcolor=0x000000AA:box=1:x=860-text_w/2:y=960"

Change History (3)

comment:1 in reply to: ↑ description Changed 3 years ago by llogan

  • Component changed from ffmpeg to undetermined
  • Keywords filter removed
  • Priority changed from minor to wish

Note that it is expected for you to always show the complete command and console output.

Replying to Chuckles32:

For many applications, it's not necessary to display the hh or ff.

What applications?

It would be nice to use the drawtext filter with timecode to display just mm:ss, or just ss.

I've never seen timecode displayed this way. Are you looking for a timestamp instead? You can display just seconds, with no decimal places, if that is what you need:

text='%{eif\:t\:d}'

comment:2 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avfilter
  • Version changed from unspecified to git-master

comment:3 Changed 3 years ago by ubitux

  • Resolution set to invalid
  • Status changed from new to closed

SMPTE Timecodes are used to identify frames accurately. If you don't wan't a full TCR, you are not interested in it, and llogan is right in saying that you just want a custom timer based on the frame timestamps.

Last edited 3 years ago by ubitux (previous) (diff)
Note: See TracTickets for help on using tickets.