[FFmpeg-user] How to drawtext hh:mm:ss:ff timecode (on an old version ffmpeg)

Media Mouth communque at gmail.com
Tue Aug 15 23:35:05 EEST 2023


Based on a number of different forums, I've been testing the following code but so far no luck burning hh:mm:ss:ff time code into an .mxf file:

ffmpeg -i SourcePath \
-vf 'drawtext=timecode=01\:45\:20\:13:rate=24:x=640:y=360:fontsize=24:fontcolor=white:fontfile=/Library/Fonts/DroidSansMono-webfont.ttf' \
DestPath

( Also tried wrapping 01\:45\:20\:13 in quotes )


Seems to be a problem with the \:13, based on this error:
[drawtext @ 0x7fe302828000] Invalid 0xRRGGBB[AA] color string: '13'
[Parsed_drawtext_0 @ 0x7fe3020074c0] Both text and text file provided. Please provide only one




Here's the full STD out from the 1st attempt above (Note: We are constrained to an Mac OS Mojave and are not permitted to upgrade)

StdErr ffmpeg version 4.2.2-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

[dnxhd @ 0x7fe301000e00] frame size changed: 1920x1088 -> 1920x1080

Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, mxf, from 'SourcePath':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
    uid             : adab4424-2f25-4dc7-92ff-29bd000c0000
    generation_uid  : adab4424-2f25-4dc7-92ff-29bd000c0001
    company_name    : FFmpeg
    product_name    : OP1a Muxer
    product_version : 58.29.100
    product_uid     : adab4424-2f25-4dc7-92ff-29bd000c0002
    material_package_umid: 0x060A2B340101010501010D0013B02329529471342CB0232900529471342CB000
    timecode        : 01:45:20:13
  Duration: 00:00:28.40, start: 0.000000, bitrate: 37516 kb/s

    Stream #0:0: Video: dnxhd (DNXHD), yuv422p(bt709/unknown/unknown, progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D0013B02329529471342CB0232900529471342CB001
      file_package_name: Source Package
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D0013B02329529471342CB0232900529471342CB001
      file_package_name: Source Package

Stream mapping:
  Stream #0:0 -> #0:0 (dnxhd (native) -> mpeg2video (native))
  Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help

[drawtext @ 0x7fe302828000] Invalid 0xRRGGBB[AA] color string: '13'
[drawtext @ 0x7fe302828000] Unable to parse option value "13" as color
[Parsed_drawtext_0 @ 0x7fe3020074c0] Both text and text file provided. Please provide only one
[AVFilterGraph @ 0x7fe2ffd025c0] Error initializing filter 'drawtext' with args 'fontsize=15:fontfile=/Library/Fonts/DroidSansMono-webfont.ttf:timecode=01:45:20:13:rate=24:fontsize=24:fontcolor=white:x=860:y=960'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument

Error while processing the decoded data for stream #0:0

Conversion failed!


More information about the ffmpeg-user mailing list