Erik Thuning
cbf29c4962
Implementing a unified job pool for transcodes and subtitles never panned out,
...
so the code was just adding unnecessary complexity. The pipeline now uses
mp.pool to manage ffmpeg jobs as before.
This reverts commit f91109fb3e4795ce652b966ba0563ba4e100b3d1 and deletes the
WorkThread class and its associated tests.
2024-10-17 11:34:00 +02:00
Erik Thuning
dd0af2221f
Removed GPU code from transcode.py, since it never worked properly.
...
Also cleaned out irrelevant options from config.ini.example.
- Removed the encoder setting for transcodes i config.ini.example since only
software is supported now.
- Since TranscodeWhisperHandler no longer uses the job pool, removed the
jobsize setting in config.ini.example.
- Changed default pool and job size to saner values.
The entire WorkThread class should probably be dropped.
2024-10-16 13:56:17 +02:00
30361abdd9
VisibilityHandler ( #3 )
...
Create a VisibilityHandler
Co-authored-by: nenzen <stefan@nenzen.com>
Reviewed-on: #3
Reviewed-by: erth9960 <thuning@dsv.su.se>
Co-authored-by: Stefan Nenzén <nenzen@dsv.su.se>
Co-committed-by: Stefan Nenzén <nenzen@dsv.su.se>
2024-03-27 14:54:33 +01:00
Erik Thuning
9874390a78
Python complains if a dictionary is modified while using an iterator on it, so changing iterator to a list
2024-01-18 10:44:15 +01:00
Erik Thuning
35d7a057e3
Missed another import
2024-01-18 10:37:53 +01:00
Erik Thuning
d28be73e2c
No longer setting explicit width, so that ffmpeg can take care of odd number oddness
2024-01-15 20:25:51 +01:00
Erik Thuning
7a2736300b
Made logging statements use consistent string formats and some minor related fixes
2023-12-21 14:41:11 +01:00
Erik Thuning
b5eda4695f
Updated logging calls
2023-11-30 09:53:09 +01:00
Erik Thuning
b81bd64ffd
Made it possible to have more than one handler of the same type
...
by making the handler's queue an init parameter.
2023-11-23 15:41:42 +01:00
Erik Thuning
022949c3c2
Refactored the transcode pipeline
...
- better exceptions
- simpler handling of scaling
- terrible nvidia encode results (still)
2023-11-10 14:27:32 +01:00
Erik Thuning
1e6c8ac178
Settled on how to stringify the error message from ffmpeg
2023-11-08 10:26:10 +01:00
Erik Thuning
9bdb1dbef9
Trying to fix lack of newlines in ffmpeg errors
2023-10-26 09:49:13 +02:00
Erik Thuning
f91109fb3e
Handlers have been switched to the new WorkThread class.
...
config.ini.example updated to match.
2023-10-09 17:19:16 +02:00
Erik Thuning
02d8c98665
Finished experimenting on nvidia options
2023-10-05 16:44:34 +02:00
Erik Thuning
88096714ff
More nvenc experiments
2023-10-04 15:25:01 +02:00
Erik Thuning
80cdf629c1
Removed obsolete variables in excpetion block
2023-10-04 15:13:08 +02:00
Erik Thuning
ae431e6902
Testing nvidia settings
2023-10-04 15:10:05 +02:00
Erik Thuning
72e4a59101
Experimental nvidia settings
2023-10-04 15:06:00 +02:00
Erik Thuning
e9b6bb5376
Forgot an import
2023-10-04 14:11:36 +02:00
Erik Thuning
16a3a120ff
Preparing for hardware encoding support
2023-10-04 14:09:12 +02:00
Erik Thuning
c9d99add9d
Re-work of transcode handling so that errors in transcoding can be properly reported with no crashes.
2023-05-24 14:48:13 +02:00
Erik Thuning
0e08ae3f12
Uploaded files in subdirectories are now handled properly
2023-04-14 15:52:14 +02:00
Erik Thuning
5dcc856177
Moved some functions from utils into more logical places, and opportunistically fixed docstrings to follow the convention
2023-03-27 17:01:59 +02:00
Erik Thuning
826f548e63
Create a temporary copy of the existing package state,
...
send that to _handle() methods and clean up after handling is done.
2023-03-15 11:04:24 +01:00
Erik Thuning
b1c74aa86b
Added existing package data to handler input
2023-03-14 16:54:04 +01:00
Erik Thuning
b8834ce7d6
Renamed utils.ffmpegjob to utils.asyncjob in preparation for also running whisper jobs through the same function
2023-03-10 15:45:00 +01:00
Erik Thuning
905d7f2f01
Fixed various slop so tests pass
2022-10-31 14:16:04 +01:00
Erik Thuning
be6a7877d7
Refactored poster handling to always be done in PosterHandler.
...
Also improved docstrings and implemented removal of superseded
video and poster files.
2022-10-28 14:18:24 +02:00
Erik Thuning
0b06690a38
* Completed ThumbnailHandler
...
* Simplified writing Package to json
* Collector now accepts Handler objects instead of name strings
* Refactored Handler._handle() and its invocation from _process():
- _handle() now returns apply_func
- boilerplate moved into Handler._process()
- Handlers can require other handlers to finish before them
2022-10-22 00:19:03 +02:00
Erik Thuning
0f3da0a717
Async jobs now have a centralized function in Handler.
2022-10-21 10:59:58 +02:00
Erik Thuning
9cc0efd433
Forgot to add the poster to the metadata
2022-10-20 22:34:50 +02:00
Erik Thuning
b15045eb13
Removed unnecessary import
2022-10-20 21:08:07 +02:00
Erik Thuning
782f994125
Typo
2022-10-20 16:51:13 +02:00
Erik Thuning
1ccd27d65a
Implemented slide handler,
...
moved ffmpeg invocations to utils.py,
moved duration handling to Package class.
2022-10-20 16:49:31 +02:00
Erik Thuning
cdc3af2187
Worker pool is now shared between handlers
2022-10-20 13:25:13 +02:00
Erik Thuning
a6c714de33
TranscodeHandler now uses a multiprocessing pool for transcode jobs
2022-10-19 17:04:30 +02:00
Erik Thuning
9c5744d686
Error fixes
2022-10-19 10:19:48 +02:00
Erik Thuning
f305b57811
Duration is now computed from the streams instead of passed by the user
2022-10-18 14:25:36 +02:00
Erik Thuning
917b8f133c
Efficiency
2022-10-18 14:25:18 +02:00
Erik Thuning
89316f8024
Docstring shouldn't lie
2022-10-18 14:24:08 +02:00
Erik Thuning
3001c9fb7a
streams key now always exists in a package
2022-10-18 14:23:29 +02:00
Erik Thuning
1004afa958
Removed unused imports
2022-10-14 15:55:18 +02:00
Erik Thuning
98dd209370
Shortened the file names of handlers and added commented entries for coming handler types
2022-10-07 14:37:54 +02:00