- create table `encodes` that contains info on encode jobs to run
- create encoder user that can modify only the designated columns of that table
- bash script that runs in a loop, taking and performing jobs from that table
We have observed an issue on twitch where there will be a small time jump
(eg. with 2s segments, times will be 00:10.3, 00:12.3, 00:14.7, 00:16.7)
and all subsequent segment timestamps will be out by this amount compared
to what other downloader instances see. Our workaround for this issue is to
watch for such gaps and:
1. trigger a worker refresh (which seems to fix the issue)
2. treat all subsequent segments as "suspect" so they are still saved
but only used if no other source is available.
In the wild we've seen different servers get timestamps that differ by 1ms for segments
that are otherwise identical - same content, same duration.
The allowable fudge factor for segments is already 10ms, so having timing be 1ms different
between servers shouldn't cause any problems.
Worst case, there's a slight chance you'll get an adjacent frame when picking a cut point / thumbnail.
in backfiller and downloader, the things making lots of outgoing http requests.
We want these larger sizes anyway to improve performance in downloader and backfiller.
```
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/api_ping/__main__.py", line 3, in <module>
gevent.monkey.patch_all()
File "/usr/lib/python3.11/site-packages/gevent/monkey.py", line 1255, in patch_all
_notify_patch(events.GeventWillPatchAllEvent(modules_to_patch, kwargs), _warnings)
File "/usr/lib/python3.11/site-packages/gevent/monkey.py", line 190, in _notify_patch
notify_and_call_entry_points(event)
File "/usr/lib/python3.11/site-packages/gevent/events.py", line 104, in notify_and_call_entry_points
subscriber = plugin.load()
^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2745, in load
self.require(*args, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2773, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 889, in resolve
dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 930, in _resolve_dist
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'zope.event' distribution was not found and is required by the application
```
god i hate python packaging.