If you want to test it yourself just pull/download the branch and execute the file custom_hook.py
I will wait for some response (feedback always welcomed).
If there is more interest I will provide some basic support in youtube-dlc that you can use with official source so you don't need to build it yourself.
Hooks are currently designed to only pass along informations so basically a one way. However it is possible to let youtube-dlc react to another hook (would require some heavier modifications) so that you can tell youtube-dlc within your own project to pause/stop or to skip a step.
Someone (@Coder-Iro) was interested in hooks for post processing https://github.com/ytdl-org/youtube-dl/issues/26543
So here it is https://github.com/blackjack4494/youtube-dlc/tree/custom-hooks-postprocessor-debug
I kept all the
print()
commands so it's easier to see what is going on.You can add your very own custom hooks for basically all post processor since the hooks are added for all [pp] in
YoutubeDL.py
https://github.com/blackjack4494/youtube-dlc/blob/27750db2a1334a73740a95a7174f966bfa30d7e8/youtube_dlc/postprocessor/ffmpeg.py#L666-L675In addition to that there is even a decorator (
@decorator_hook
) https://github.com/blackjack4494/youtube-dlc/blob/27750db2a1334a73740a95a7174f966bfa30d7e8/youtube_dlc/postprocessor/ffmpeg.py#L603-L609If you want to test it yourself just pull/download the branch and execute the file
custom_hook.py
I will wait for some response (feedback always welcomed).
If there is more interest I will provide some basic support in youtube-dlc that you can use with official source so you don't need to build it yourself.
Hooks are currently designed to only pass along informations so basically a one way. However it is possible to let youtube-dlc react to another hook (would require some heavier modifications) so that you can tell youtube-dlc within your own project to pause/stop or to skip a step.