Opened 4 hours ago

#11449 new enhancement

Current timecode in drawtext timecode

Reported by: electron.rotoscope Owned by:
Priority: wish Component: undetermined
Version: unspecified Keywords: timecode drawtext
Cc: electron.rotoscope Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When I open a source file in ffmpeg, it can read the embedded timecode and current framerate and put them in the stdout, looking perhaps something like this

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infile.mov':
[...]
  Duration: 00:00:30.53, start: 0.000000, bitrate: 186 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 480x270 [SAR 1:1 DAR 16:9], 37 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc57.16.101 libx264
      timecode        : 01:02:03:04

A user can then manually copy the "30 fps" and "01:02:03:04" from the stdout in the console window and run ffmpeg a second time with a command like

ffmpeg -i infile.mov -vf "drawtext=timecode=\'01\:02\:03\:04\':timecode_rate=30:fontfile=\'arial.ttf\':fontcolor=white" outfile.mov

but it would be great if the timecode and framerate could be passed from whatever part is printing them to stdout into drawtext/timecode and drawtext/timecode_rate, then drawtext could be used to burn in whatever the current timecode is without any mucking around with copy/paste commands or grep in bash etc

Change History (0)

Note: See TracTickets for help on using tickets.