Repository: ManimCommunity/manim

Issue:
Throw an exception when using Scene.add_subcaption
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
I'm using python 3.11.3 and Manim v0.17.3. When I add one line code `self.add_subcaption("")` in the construct method and then run the `manim -pqk ...` in the command line, such exception appears:
<img width="822" alt="image" src="https://github.com/ManimCommunity/manim/assets/24624545/e4966f45-2b6d-4083-a7de-62f850873c9e">

## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->
No exception should be thrown since the code comply with the documentation. It seems that `self.renderer.time` has type `numpy.int64`, therefore it can't be used as `datetime.timedelta`'s argument, since `datetime.timedelta`'s parameter type can only be `int` or `float` or `numpy.float64`.

## How to reproduce the issue
<!-- Provide a piece of code illustrating the undesired behavior. -->
Use the openGL renderer:

```py
from manim import *
config.renderer = "openGL"

class SubcaptionExample(Scene):
    def construct(self):
        text = Text("")
        self.play(Write(text))
        print(self.renderer.time, type(self.renderer.time))
        self.add_subcaption("")
```
and then run the command `manim -qk xxx.py SubcaptionExample `.

Or use the default Cairo renderer:
```py
from manim import *

class SubcaptionExample(Scene):
    def construct(self):
        text = Text("")
        self.play(Write(text))
        print(self.renderer.time, type(self.renderer.time))
        self.add_subcaption("")
```

But this time you need to run the command `manim -pqk xxx.py SubcaptionExample` twice (do not delete the `partial_movie_files` in the `media` folder before running the command the second time).

It seems that there are some conflicts between `manim/scene/scene.py:L1028` and `manim/scene/scene.py:L1527`:
<img width="739" alt="image" src="https://github.com/ManimCommunity/manim/assets/24624545/7b1c96d4-013d-48ef-bc79-2eb22df78d56">
<img width="800" alt="image" src="https://github.com/ManimCommunity/manim/assets/24624545/1b3759bd-9295-4cfe-bdf9-71945e1f4632">
If the animations' `run_time` type all be `int`(not specified by default or specified in the `self.play` method or in the Animation constructer), then `np.max([animation.run_time for animation in animations])` in `manim/scene/scene.py:L1028` will return type `numpy.int64`, which finally causes the exception in `manim/scene/scene.py:L1527`.


## System specifications

<details><summary>System Details</summary>

- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): macOS 13.3.1 (a)
- RAM: 16GB
- Python version (`python/py/python3 --version`): Python 3.11.3
- Installed modules (provide output from `pip list`):
```
Package                                           Version
------------------------------------------------- --------
attrs                                             23.1.0
azure-cognitiveservices-speech                    1.28.0
brotlipy                                          0.7.0
build                                             0.10.0
CacheControl                                      0.12.11
certifi                                           2023.5.7
cffi                                              1.15.1
charset-normalizer                                3.1.0
cleo                                              2.0.1
click                                             8.1.3
click-default-group                               1.2.2
cloup                                             0.13.1
colorama                                          0.4.6
colour                                            0.1.5
crashtest                                         0.4.1
cryptography                                      40.0.2
Cython                                            0.29.34
dataclasses                                       0.8
decorator                                         5.1.1
deepl                                             1.14.0
distlib                                           0.3.6
dulwich                                           0.21.5
ffmpeg-python                                     0.2.0
filelock                                          3.12.0
fsspec                                            2023.5.0
future                                            0.18.3
glcontext                                         2.3.7
gTTS                                              2.3.2
html5lib                                          1.1
huggingface-hub                                   0.14.1
humanhash3                                        0.0.6
idna                                              3.4
importlib-metadata                                6.6.0
importlib-resources                               5.12.0
installer                                         0.7.0
isosurfaces                                       0.1.0
jaraco.classes                                    3.2.3
Jinja2                                            3.1.2
jsonschema                                        4.17.3
keyring                                           23.13.1
llvmlite                                          0.40.0
lockfile                                          0.12.2
manim                                             0.17.3
manim-voiceover                                   0.3.0
ManimPango                                        0.4.3
mapbox-earcut                                     1.0.0
markdown-it-py                                    2.2.0
MarkupSafe                                        2.1.2
mdurl                                             0.1.0
moderngl                                          5.8.2
moderngl-window                                   2.4.1
more-itertools                                    9.1.0
mpmath                                            1.3.0
msgpack                                           1.0.5
multipledispatch                                  0.6.0
mutagen                                           1.46.0
networkx                                          2.8.8
numba                                             0.57.0
numpy                                             1.24.3
openai-whisper                                    20230314
packaging                                         23.1
pexpect                                           4.8.0
Pillow                                            9.5.0
pip                                               23.1.2
pkginfo                                           1.9.6
pkgutil_resolve_name                              1.3.10
platformdirs                                      2.6.2
playsound                                         1.3.0
poetry                                            1.4.2
poetry-core                                       1.5.2
poetry-plugin-export                              1.3.1
pooch                                             1.7.0
ptyprocess                                        0.7.0
PyAudio                                           0.2.13
pycairo                                           1.23.0
pycparser                                         2.21
pydub                                             0.25.1
pyglet                                            1.5.27
Pygments                                          2.15.1
pynput                                            1.7.6
pyobjc                                            9.1.1
pyobjc-core                                       9.1.1
pyobjc-framework-Accessibility                    9.1.1
pyobjc-framework-Accounts                         9.1.1
pyobjc-framework-AddressBook                      9.1.1
pyobjc-framework-AdServices                       9.1.1
pyobjc-framework-AdSupport                        9.1.1
pyobjc-framework-AppleScriptKit                   9.1.1
pyobjc-framework-AppleScriptObjC                  9.1.1
pyobjc-framework-ApplicationServices              9.1.1
pyobjc-framework-AppTrackingTransparency          9.1.1
pyobjc-framework-AudioVideoBridging               9.1.1
pyobjc-framework-AuthenticationServices           9.1.1
pyobjc-framework-AutomaticAssessmentConfiguration 9.1.1
pyobjc-framework-Automator                        9.1.1
pyobjc-framework-AVFoundation                     9.1.1
pyobjc-framework-AVKit                            9.1.1
pyobjc-framework-AVRouting                        9.1.1
pyobjc-framework-BackgroundAssets                 9.1.1
pyobjc-framework-BusinessChat                     9.1.1
pyobjc-framework-CalendarStore                    9.1.1
pyobjc-framework-CallKit                          9.1.1
pyobjc-framework-CFNetwork                        9.1.1
pyobjc-framework-ClassKit                         9.1.1
pyobjc-framework-CloudKit                         9.1.1
pyobjc-framework-Cocoa                            9.1.1
pyobjc-framework-Collaboration                    9.1.1
pyobjc-framework-ColorSync                        9.1.1
pyobjc-framework-Contacts                         9.1.1
pyobjc-framework-ContactsUI                       9.1.1
pyobjc-framework-CoreAudio                        9.1.1
pyobjc-framework-CoreAudioKit                     9.1.1
pyobjc-framework-CoreBluetooth                    9.1.1
pyobjc-framework-CoreData                         9.1.1
pyobjc-framework-CoreHaptics                      9.1.1
pyobjc-framework-CoreLocation                     9.1.1
pyobjc-framework-CoreMedia                        9.1.1
pyobjc-framework-CoreMediaIO                      9.1.1
pyobjc-framework-CoreMIDI                         9.1.1
pyobjc-framework-CoreML                           9.1.1
pyobjc-framework-CoreMotion                       9.1.1
pyobjc-framework-CoreServices                     9.1.1
pyobjc-framework-CoreSpotlight                    9.1.1
pyobjc-framework-CoreText                         9.1.1
pyobjc-framework-CoreWLAN                         9.1.1
pyobjc-framework-CryptoTokenKit                   9.1.1
pyobjc-framework-DataDetection                    9.1.1
pyobjc-framework-DeviceCheck                      9.1.1
pyobjc-framework-DictionaryServices               9.1.1
pyobjc-framework-DiscRecording                    9.1.1
pyobjc-framework-DiscRecordingUI                  9.1.1
pyobjc-framework-DiskArbitration                  9.1.1
pyobjc-framework-DVDPlayback                      9.1.1
pyobjc-framework-EventKit                         9.1.1
pyobjc-framework-ExceptionHandling                9.1.1
pyobjc-framework-ExecutionPolicy                  9.1.1
pyobjc-framework-ExtensionKit                     9.1.1
pyobjc-framework-ExternalAccessory                9.1.1
pyobjc-framework-FileProvider                     9.1.1
pyobjc-framework-FileProviderUI                   9.1.1
pyobjc-framework-FinderSync                       9.1.1
pyobjc-framework-FSEvents                         9.1.1
pyobjc-framework-GameCenter                       9.1.1
pyobjc-framework-GameController                   9.1.1
pyobjc-framework-GameKit                          9.1.1
pyobjc-framework-GameplayKit                      9.1.1
pyobjc-framework-HealthKit                        9.1.1
pyobjc-framework-ImageCaptureCore                 9.1.1
pyobjc-framework-IMServicePlugIn                  9.1.1
pyobjc-framework-InputMethodKit                   9.1.1
pyobjc-framework-InstallerPlugins                 9.1.1
pyobjc-framework-InstantMessage                   9.1.1
pyobjc-framework-Intents                          9.1.1
pyobjc-framework-IntentsUI                        9.1.1
pyobjc-framework-IOBluetooth                      9.1.1
pyobjc-framework-IOBluetoothUI                    9.1.1
pyobjc-framework-IOSurface                        9.1.1
pyobjc-framework-iTunesLibrary                    9.1.1
pyobjc-framework-KernelManagement                 9.1.1
pyobjc-framework-LatentSemanticMapping            9.1.1
pyobjc-framework-LaunchServices                   9.1.1
pyobjc-framework-libdispatch                      9.1.1
pyobjc-framework-libxpc                           9.1.1
pyobjc-framework-LinkPresentation                 9.1.1
pyobjc-framework-LocalAuthentication              9.1.1
pyobjc-framework-LocalAuthenticationEmbeddedUI    9.1.1
pyobjc-framework-MailKit                          9.1.1
pyobjc-framework-MapKit                           9.1.1
pyobjc-framework-MediaAccessibility               9.1.1
pyobjc-framework-MediaLibrary                     9.1.1
pyobjc-framework-MediaPlayer                      9.1.1
pyobjc-framework-MediaToolbox                     9.1.1
pyobjc-framework-Metal                            9.1.1
pyobjc-framework-MetalFX                          9.1.1
pyobjc-framework-MetalKit                         9.1.1
pyobjc-framework-MetalPerformanceShaders          9.1.1
pyobjc-framework-MetalPerformanceShadersGraph     9.1.1
pyobjc-framework-MetricKit                        9.1.1
pyobjc-framework-MLCompute                        9.1.1
pyobjc-framework-ModelIO                          9.1.1
pyobjc-framework-MultipeerConnectivity            9.1.1
pyobjc-framework-NaturalLanguage                  9.1.1
pyobjc-framework-NetFS                            9.1.1
pyobjc-framework-Network                          9.1.1
pyobjc-framework-NetworkExtension                 9.1.1
pyobjc-framework-NotificationCenter               9.1.1
pyobjc-framework-OpenDirectory                    9.1.1
pyobjc-framework-OSAKit                           9.1.1
pyobjc-framework-OSLog                            9.1.1
pyobjc-framework-PassKit                          9.1.1
pyobjc-framework-PencilKit                        9.1.1
pyobjc-framework-PHASE                            9.1.1
pyobjc-framework-Photos                           9.1.1
pyobjc-framework-PhotosUI                         9.1.1
pyobjc-framework-PreferencePanes                  9.1.1
pyobjc-framework-PushKit                          9.1.1
pyobjc-framework-Quartz                           9.1.1
pyobjc-framework-QuickLookThumbnailing            9.1.1
pyobjc-framework-ReplayKit                        9.1.1
pyobjc-framework-SafariServices                   9.1.1
pyobjc-framework-SafetyKit                        9.1.1
pyobjc-framework-SceneKit                         9.1.1
pyobjc-framework-ScreenCaptureKit                 9.1.1
pyobjc-framework-ScreenSaver                      9.1.1
pyobjc-framework-ScreenTime                       9.1.1
pyobjc-framework-ScriptingBridge                  9.1.1
pyobjc-framework-SearchKit                        9.1.1
pyobjc-framework-Security                         9.1.1
pyobjc-framework-SecurityFoundation               9.1.1
pyobjc-framework-SecurityInterface                9.1.1
pyobjc-framework-ServiceManagement                9.1.1
pyobjc-framework-SharedWithYou                    9.1.1
pyobjc-framework-SharedWithYouCore                9.1.1
pyobjc-framework-ShazamKit                        9.1.1
pyobjc-framework-Social                           9.1.1
pyobjc-framework-SoundAnalysis                    9.1.1
pyobjc-framework-Speech                           9.1.1
pyobjc-framework-SpriteKit                        9.1.1
pyobjc-framework-StoreKit                         9.1.1
pyobjc-framework-SyncServices                     9.1.1
pyobjc-framework-SystemConfiguration              9.1.1
pyobjc-framework-SystemExtensions                 9.1.1
pyobjc-framework-ThreadNetwork                    9.1.1
pyobjc-framework-UniformTypeIdentifiers           9.1.1
pyobjc-framework-UserNotifications                9.1.1
pyobjc-framework-UserNotificationsUI              9.1.1
pyobjc-framework-VideoSubscriberAccount           9.1.1
pyobjc-framework-VideoToolbox                     9.1.1
pyobjc-framework-Virtualization                   9.1.1
pyobjc-framework-Vision                           9.1.1
pyobjc-framework-WebKit                           9.1.1
pyOpenSSL                                         23.1.1
pyproject_hooks                                   1.0.0
pyrr                                              0.10.3
pyrsistent                                        0.19.3
PySocks                                           1.7.1
python-dotenv                                     0.21.1
pyttsx3                                           2.90
PyYAML                                            6.0
rapidfuzz                                         2.15.1
regex                                             2023.5.5
requests                                          2.29.0
requests-toolbelt                                 0.10.1
rich                                              13.3.5
scipy                                             1.10.1
screeninfo                                        0.8.1
setuptools                                        67.7.2
shellingham                                       1.5.1
six                                               1.16.0
skia-pathops                                      0.7.4
sox                                               1.4.1
srt                                               3.5.2
stable-ts                                         2.6.2
svgelements                                       1.9.5
sympy                                             1.12
tiktoken                                          0.3.3
tokenizers                                        0.13.3
tomli                                             2.0.1
tomlkit                                           0.11.8
torch                                             2.0.1
torchaudio                                        2.0.2
tqdm                                              4.65.0
transformers                                      4.29.1
trove-classifiers                                 2023.5.2
typing_extensions                                 4.5.0
urllib3                                           1.26.15
virtualenv                                        20.17.1
watchdog                                          2.1.6
webencodings                                      0.5.1
wheel                                             0.40.0
xattr                                             0.10.1
zipp
```
</details>

<details><summary>LaTeX details</summary>

+ LaTeX distribution (e.g. TeX Live 2020):
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=latex)
+ Installed LaTeX packages:
```
i ae: Virtual fonts for T1 encoded CMR-fonts
i amscls: AMS document classes for LaTeX
i amsfonts: TeX fonts from the American Mathematical Society
i amsmath: AMS mathematical facilities for LaTeX
i anysize: A simple package to set up document margins
i arabxetex: An ArabTeX-like interface for XeLaTeX
i atbegshi: Execute stuff at \shipout time
i attachfile2: Attach files into PDF
i attachfile2.universal-darwin: universal-darwin files of attachfile2
i atveryend: Hooks at the very end of a document
i automata: Finite state machines, graphs and trees in MetaPost
i auxhook: Hooks for auxiliary files
i awesomebox: Draw admonition blocks in your documents, illustrated with FontAwesome icons
i babel: Multilingual support for LaTeX, LuaLaTeX, XeLaTeX, and Plain TeX
i babel-basque: Babel contributed support for Basque
i babel-czech: Babel support for Czech
i babel-danish: Babel contributed support for Danish
i babel-dutch: Babel contributed support for Dutch
i babel-english: Babel support for English
i babel-finnish: Babel support for Finnish
i babel-french: Babel contributed support for French
i babel-german: Babel support for documents written in German
i babel-hungarian: Babel support for Hungarian (Magyar)
i babel-italian: Babel support for Italian text
i babel-norsk: Babel support for Norwegian
i babel-polish: Babel support for Polish
i babel-portuges: Babel support for Portuges
i babel-spanish: Babel support for Spanish
i babel-swedish: Babel support for typesetting Swedish
i babelbib: Multilingual bibliographies
i bbcard: Bullshit bingo, calendar and baseball-score cards
i beamer: A LaTeX class for producing presentations and slides
i bibtex: Process bibliographies for LaTeX, etc
i bibtex.universal-darwin: universal-darwin files of bibtex
i bidi-atbegshi: Bidi-aware shipout macros
i bidicontour: Bidi-aware coloured contour around text
i bidipagegrid: Bidi-aware page grid in background
i bidipresentation: Experimental bidi presentation
i bidishadowtext: Bidi-aware shadow text
i bigintcalc: Integer calculations on very large numbers
i bitset: Handle bit-vector datatype
i blockdraw_mp: Block diagrams and bond graphs, with MetaPost
i bookmark: A new bookmark (outline) organization for hyperref
i booktabs: Publication quality tables in LaTeX
i bpolynomial: Drawing polynomial functions of up to order 3
i breqn: Automatic line breaking of displayed equations
i businesscard-qrcode: Business cards with QR-Code
i caption: Customising captions in floating environments
i carlisle: David Carlisle's small packages
i cite: Improved citation handling in LaTeX
i cm: Computer Modern fonts
i cmap: Make PDF files searchable and copyable
i cmarrows: MetaPost arrows and braces in the Computer Modern style
i collection-basic: Essential programs and files
i collection-latex: LaTeX fundamental packages
i collection-latexrecommended: LaTeX recommended packages
i collection-metapost: MetaPost and Metafont packages
i collection-xetex: XeTeX and packages
i colorprofiles: Collection of free ICC profiles
i colortbl: Add colour to LaTeX tables
i cqubeamer: LaTeX Beamer Template for Chongqing University
i crop: Support for cropmarks
i ctable: Flexible typesetting of table and figure floats using key/value directives
i ctablestack: Catcode table stable support
i dehyph: German hyphenation patterns for traditional orthography
i drv: Derivation trees with MetaPost
i dviincl: Include a DVI page into MetaPost output
i dvipdfmx: An extended version of dvipdfm
i dvipdfmx.universal-darwin: universal-darwin files of dvipdfmx
i dvips: A DVI to PostScript driver
i dvips.universal-darwin: universal-darwin files of dvips
i dvisvgm: Convert DVI, EPS, and PDF files to Scalable Vector Graphics format (SVG)
i dvisvgm.universal-darwin: universal-darwin files of dvisvgm
i ec: Computer modern fonts in T1 and TS1 encodings
i emp: "Encapsulate" MetaPost figures in a document
i enctex: A TeX extension that translates input on its way into TeX
i epsincl: Include EPS in MetaPost figures
i epstopdf-pkg: Call epstopdf "on the fly"
i eso-pic: Add picture commands (or backgrounds) to every page
i etex: An extended version of TeX, from the NTS project
i etex-pkg: E-TeX support package
i etexcmds: Avoid name clashes with e-TeX commands
i etoolbox: e-TeX tools for LaTeX
i euenc: Unicode font encoding definitions for XeTeX
i euler: Use AMS Euler fonts for math
i eurosym: Metafont and macros for Euro sign
i everysel: Provides hooks into \selectfont
i everyshi: Take action at every \shipout
i expressg: Diagrams consisting of boxes, lines, and annotations
i exteps: Include EPS figures in MetaPost
i extsizes: Extend the standard classes' size options
i fancybox: Variants of \fbox and other games with boxes
i fancyhdr: Extensive control of page headers and footers in LaTeX2e
i fancyref: A LaTeX package for fancy cross-referencing
i fancyvrb: Sophisticated verbatim text
i featpost: MetaPost macros for 3D
i feynmf: Macros and fonts for creating Feynman (and other) diagrams
i feynmp-auto: Automatic processing of feynmp graphics
i filehook: Hooks for input files
i firstaid: First aid for external LaTeX files and packages that need updating
i fix2col: Fix miscellaneous two column mode features
i fixlatvian: Improve Latvian language support in XeLaTeX
i fiziko: A MetaPost library for physics textbook illustrations
i float: Improved interface for floating objects
i font-change-xetex: Macros to change text and mathematics fonts in plain XeTeX
i fontbook: Generate a font book
i fontspec: Advanced font selection in XeLaTeX and LuaLaTeX
i fontwrap: Bind fonts to specific unicode blocks
i footnotehyper: hyperref aware footnote.sty
i fp: Fixed point arithmetic
i garrigues: MetaPost macros for the reproduction of Garrigues' Easter nomogram
i geometry: Flexible and complete interface to document dimensions
i gettitlestring: Clean up title references
i glyphlist: Adobe Glyph List and TeX extensions
i gmp: Enable integration between MetaPost pictures and LaTeX
i graphics: The LaTeX standard graphics bundle
i graphics-cfg: Sample configuration files for LaTeX color and graphics
i graphics-def: Colour and graphics option files
i grfext: Manipulate the graphics package's list of extensions
i grffile: Extended file name support for graphics (legacy package)
i hatching: MetaPost macros for hatching interior of closed paths
i hologo: A collection of logos with bookmark support
i hopatch: Load patches for packages
i hycolor: Implements colour for packages hyperref and bookmark
i hyperref: Extensive support for hypertext in LaTeX
i hyph-utf8: Hyphenation patterns expressed in UTF-8
i hyphen-base: core hyphenation support files
i hyphen-basque: Basque hyphenation patterns.
i hyphen-czech: Czech hyphenation patterns.
i hyphen-danish: Danish hyphenation patterns.
i hyphen-dutch: Dutch hyphenation patterns.
i hyphen-english: English hyphenation patterns.
i hyphen-finnish: Finnish hyphenation patterns.
i hyphen-french: French hyphenation patterns.
i hyphen-german: German hyphenation patterns.
i hyphen-hungarian: Hungarian hyphenation patterns.
i hyphen-italian: Italian hyphenation patterns.
i hyphen-norwegian: Norwegian Bokmal and Nynorsk hyphenation patterns.
i hyphen-polish: Polish hyphenation patterns.
i hyphen-portuguese: Portuguese hyphenation patterns.
i hyphen-spanish: Spanish hyphenation patterns.
i hyphen-swedish: Swedish hyphenation patterns.
i hyphenex: US English hyphenation exceptions file
i ifplatform: Conditionals to test which platform is being used
i iftex: Am I running under pdfTeX, XeTeX or LuaTeX?
i index: Extended index for LaTeX including multiple indexes
i infwarerr: Complete set of information/warning/error message macros
i intcalc: Expandable arithmetic operations with integers
i interchar: Managing character class schemes in XeTeX
i jknapltx: Miscellaneous packages by Joerg Knappen
i knuth-lib: Core TeX and Metafont sources from Knuth
i knuth-local: Knuth's local information
i koma-script: A bundle of versatile classes and packages
i kpathsea: Path searching library for TeX-related files
i kpathsea.universal-darwin: universal-darwin files of kpathsea
i kvdefinekeys: Define keys for use in the kvsetkeys package
i kvoptions: Key value format for package options
i kvsetkeys: Key value parser with default handler support
i l3backend: LaTeX3 backend drivers
i l3experimental: Experimental LaTeX3 concepts
i l3kernel: LaTeX3 programming conventions
i l3packages: High-level LaTeX3 concepts
i latex: A TeX macro package that defines LaTeX
i latex-base-dev: Development pre-release of the LaTeX kernel
i latex-bin: LaTeX executables and man pages
i latex-bin.universal-darwin: universal-darwin files of latex-bin
i latex-firstaid-dev: Development pre-release of the LaTeX firstaid package
i latex-fonts: A collection of fonts used in LaTeX distributions
i latexbug: Bug-classification for LaTeX related bugs
i latexconfig: configuration files for LaTeX-related formats
i latexmp: Interface for LaTeX-based typesetting in MetaPost
i letltxmacro: Let assignment for LaTeX macros
i lineno: Line numbers on paragraphs
i listings: Typeset source code listings using LaTeX
i lm: Latin modern fonts in outline formats
i lm-math: OpenType maths fonts for Latin Modern
i ltxcmds: Some LaTeX kernel commands for general use
i ltxmisc: Miscellaneous LaTeX packages, etc
i lua-alt-getopt: Process application arguments the same way as getopt_long
i lua-uni-algos: Unicode algorithms for LuaTeX
i luahbtex: LuaTeX with HarfBuzz library for glyph shaping
i luahbtex.universal-darwin: universal-darwin files of luahbtex
i lualibs: Additional Lua functions for LuaTeX macro programmers
i luaotfload: OpenType 'loader' for Plain TeX and LaTeX
i luaotfload.universal-darwin: universal-darwin files of luaotfload
i luatex: The LuaTeX engine
i luatex.universal-darwin: universal-darwin files of luatex
i luatexbase: Basic resource management for LuaTeX code
i lwarp: Converts LaTeX to HTML
i lwarp.universal-darwin: universal-darwin files of lwarp
i makecmds: The new \makecommand command always (re)defines a command
i makeindex: Makeindex development sources
i makeindex.universal-darwin: universal-darwin files of makeindex
i mathspec: Specify arbitrary fonts for mathematics in XeTeX
i mathtools: Mathematical tools to use with amsmath
i mcf2graph: Draw chemical structure diagrams with MetaPost
i mdwtools: Miscellaneous tools by Mark Wooding
i memoir: Typeset fiction, non-fiction and mathematical books
i metafont: A system for specifying fonts
i metafont.universal-darwin: universal-darwin files of metafont
i metago: MetaPost output of Go positions
i metalogo: Extended TeX logo macros
i metaobj: MetaPost package providing high-level objects
i metaplot: Plot-manipulation macros for use in MetaPost
i metapost: A development of Metafont for creating graphics
i metapost-colorbrewer: An implementation of the colorbrewer2.org colours for MetaPost
i metapost.universal-darwin: universal-darwin files of metapost
i metauml: MetaPost library for typesetting UML diagrams
i mflogo: LaTeX support for Metafont logo fonts
i mfnfss: Packages to typeset oldgerman and pandora fonts in LaTeX
i mfpic: Draw Metafont/post pictures from (La)TeX commands
i mfpic4ode: Macros to draw direction fields and solutions of ODEs
i mfware: Supporting tools for use with Metafont
i mfware.universal-darwin: universal-darwin files of mfware
i microtype: Subliminal refinements towards typographical perfection
i minim-hatching: Create tiling patterns with the minim-mp MetaPost processor
i modes: A collection of Metafont mode_def's
i mp3d: 3D animations
i mparrows: MetaPost module with different types of arrow heads
i mpattern: Patterns in MetaPost
i mpcolornames: Extend list of predefined colour names for MetaPost
i mpgraphics: Process and display MetaPost figures inline
i mptopdf: mpost to PDF, native MetaPost graphics inclusion
i mptopdf.universal-darwin: universal-darwin files of mptopdf
i mptrees: Probability trees with MetaPost
i ms: Various LaTeX packages by Martin Schroder
i na-position: Tables of relative positions of curves and asymptotes or tangents in Arabic documents
i natbib: Flexible bibliography support
i newfloat: Define new floating environments
i ntgclass: "European" versions of standard classes
i oberdiek: A bundle of packages submitted by Heiko Oberdiek
i pagesel: Select pages of a document for output
i parskip: Layout with zero \parindent, non-zero \parskip
i pdfescape: Implements pdfTeX's escape features using TeX or e-TeX
i pdflscape: Make landscape pages display as landscape
i pdfmanagement-testphase: LaTeX PDF management testphase bundle
i pdfpages: Include PDF documents in LaTeX
i pdftex: A TeX extension for direct creation of PDF
i pdftex.universal-darwin: universal-darwin files of pdftex
i pdftexcmds: LuaTeX support for pdfTeX utility functions
i pgf: Create PostScript and PDF graphics in TeX
i philokalia: A font to typeset the Philokalia Books
i piechartmp: Draw pie-charts using MetaPost
i plain: The Plain TeX format
i polyglossia: An alternative to babel for XeLaTeX and LuaLaTeX
i preview: Extract bits of a LaTeX source for output
i psfrag: Replace strings in encapsulated PostScript figures
i pslatex: Use PostScript fonts by default
i psnfss: Font support for common PostScript fonts
i pspicture: PostScript picture support
i ptext: A 'lipsum' for Persian
i ragged2e: Alternative versions of "ragged"-type commands
i rcs: Use RCS (revision control system) tags in LaTeX documents
i realscripts: Access OpenType subscript and superscript glyphs
i refcount: Counter operations with label references
i repere: Diagrams for school mathematics
i rerunfilecheck: Checksum based rerun checks on auxiliary files
i revtex: Styles for various Physics Journals
i roex: Metafont-PostScript conversions
i roundrect: MetaPost macros for highly configurable rounded rectangles (optionally with text)
i sansmath: Maths in a sans font
i scheme-basic: basic scheme (plain and latex)
i scheme-infraonly: infrastructure-only scheme (no TeX at all)
i scheme-minimal: minimal scheme (plain only)
i scheme-small: small scheme (basic + xetex, metapost, a few languages)
i section: Modifying section commands in LaTeX
i seminar: Make overhead slides
i sepnum: Print numbers in a "friendly" format
i setspace: Set space between lines
i shapes: Draw polygons, reentrant stars, and fractions in circles with MetaPost
i simple-resume-cv: Template for a simple resume or curriculum vitae (CV), in XeLaTeX
i simple-thesis-dissertation: Template for a simple thesis or dissertation (Ph.D. or master's degree) or technical report, in XeLaTeX
i slideshow: Generate slideshow with MetaPost
i splines: MetaPost macros for drawing cubic spline interpolants
i standalone: Compile TeX pictures stand-alone or as part of a document
i stringenc: Converting a string between different encodings
i suanpan: MetaPost macros for drawing Chinese and Japanese abaci
i subfig: Figures broken into subfigures
i symbol: URW 'Base 35' font pack for LaTeX
i synctex: engine-level feature synchronizing output and source
i synctex.universal-darwin: universal-darwin files of synctex
i tetragonos: Four-Corner codes of Chinese characters
i tex: A sophisticated typesetting engine
i tex-ini-files: Model TeX format creation files
i tex.universal-darwin: universal-darwin files of tex
i texlive-common: TeX Live documentation (common elements)
i texlive-en: TeX Live manual (English)
i texlive-msg-translations: translations of the TeX Live installer and TeX Live Manager
i texlive-scripts: TeX Live infrastructure programs
i texlive-scripts.universal-darwin: universal-darwin files of texlive-scripts
i texlive.infra: basic TeX Live infrastructure
i texlive.infra.universal-darwin: universal-darwin files of texlive.infra
i textcase: Case conversion ignoring mathematics, etc
i textpath: Setting text along a path with MetaPost
i threeddice: Create images of dice with one, two, or three faces showing, using MetaPost
i thumbpdf: Thumbnails for pdfTeX and dvips/ps2pdf
i thumbpdf.universal-darwin: universal-darwin files of thumbpdf
i times: URW 'Base 35' font pack for LaTeX
i tipa: Fonts and macros for IPA phonetics characters
i tlshell: GUI frontend (tcl/tk-based) for tlmgr
i tlshell.universal-darwin: universal-darwin files of tlshell
i tools: The LaTeX standard tools bundle
i translator: Easy translation of strings in LaTeX
i typehtml: Typeset HTML directly from LaTeX
i ucharcat: Implementation of the (new in 2015) XeTeX \Ucharcat command in lua, for LuaTeX
i ucharclasses: Font actions in XeTeX according to what is being processed
i ulem: Package for underlining
i underscore: Control the behaviour of "_" in text
i unicode-bidi: Experimental unicode bidi package for XeTeX
i unicode-data: Unicode data and loaders for TeX
i unicode-math: Unicode mathematics support for XeTeX and LuaTeX
i uniquecounter: Provides unlimited unique counter
i unisugar: Define syntactic sugar for Unicode LaTeX
i upquote: Show "realistic" quotes in verbatim
i url: Verbatim with URL-sensitive line breaks
i xcolor: Driver-independent color extensions for LaTeX and pdfLaTeX
i xdvi: A DVI previewer for the X Window System
i xdvi.universal-darwin: universal-darwin files of xdvi
i xebaposter: Create beautiful scientific Persian/Latin posters using TikZ
i xechangebar: An extension of package changebar that can be used with XeLaTeX
i xecolor: Support for color in XeLaTeX
i xecyr: Using Cyrillic languages in XeTeX
i xeindex: Automatic index generation for XeLaTeX
i xelatex-dev: (shortdesc missing)
i xelatex-dev.universal-darwin: universal-darwin files of xelatex-dev
i xesearch: A string finder for XeTeX
i xespotcolor: Spot colours support for XeLaTeX
i xetex: An extended variant of TeX for use with Unicode sources
i xetex-itrans: Itrans input maps for use with XeLaTeX
i xetex-pstricks: Running PSTricks under XeTeX
i xetex-tibetan: XeTeX input maps for Unicode Tibetan
i xetex.universal-darwin: universal-darwin files of xetex
i xetexconfig: crop.cfg for XeLaTeX
i xetexfontinfo: Report font features in XeTeX
i xetexko: Typeset Korean with Xe(La)TeX
i xevlna: Insert non-breakable spaces using XeTeX
i xkeyval: Extension of the keyval package
i xltxtra: "Extras" for LaTeX users of XeTeX
i xunicode: Generate Unicode characters from accented glyphs
i zapfding: URW 'Base 35' font pack for LaTeX
i zbmath-review-template: Template for a zbMATH Open review
```
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

```
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with clang version 15.0.7
configuration: --prefix=/opt/miniconda3/envs/manim --cc=arm64-apple-darwin20.0.0-clang --cxx=arm64-apple-darwin20.0.0-clang++ --nm=arm64-apple-darwin20.0.0-nm --ar=arm64-apple-darwin20.0.0-ar --disable-doc --disable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --enable-cross-compile --arch=arm64 --target-os=darwin --cross-prefix=arm64-apple-darwin20.0.0- --host-cc=/Users/runner/miniforge3/conda-bld/ffmpeg_1684138305257/_build_env/bin/x86_64-apple-darwin13.4.0-clang --enable-neon --enable-gnutls --enable-libmp3lame --enable-libvpx --enable-libass --enable-pthreads --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libopus --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1684138305257/_build_env/bin/pkg-config
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100
```
</details>




Discussion:
Indeed, I also ran into this problem, and I need to specify offset=0.0 to get around. This could also be a fix for the manim developers.
So im guessing it needs to be a float ?


Resolving patch:
diff --git a/manim/scene/scene.py b/manim/scene/scene.py
--- a/manim/scene/scene.py
+++ b/manim/scene/scene.py
@@ -1530,8 +1530,10 @@ def construct(self):
         subtitle = srt.Subtitle(
             index=len(self.renderer.file_writer.subcaptions),
             content=content,
-            start=datetime.timedelta(seconds=self.renderer.time + offset),
-            end=datetime.timedelta(seconds=self.renderer.time + offset + duration),
+            start=datetime.timedelta(seconds=float(self.renderer.time + offset)),
+            end=datetime.timedelta(
+                seconds=float(self.renderer.time + offset + duration)
+            ),
         )
         self.renderer.file_writer.subcaptions.append(subtitle)
 


Test patch: