mediaforge - v2.2.0
    Preparing search index...

    Function parseDuration

    • Parse a duration string to a number of seconds.

      Accepts both forms ffmpeg emits:

      • plain seconds, e.g. "120.042000" (ffprobe -print_format json)
      • clock notation, e.g. "00:02:00.042" or "2:00" (ffprobe text output)

      Returns null if the value is absent, "N/A", or unparseable.

      Parameters

      • durStr: string | undefined

      Returns number | null