Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run yt-dlp post-processors #530

Open
vodkapmp opened this issue Aug 10, 2024 · 3 comments
Open

Run yt-dlp post-processors #530

vodkapmp opened this issue Aug 10, 2024 · 3 comments

Comments

@vodkapmp
Copy link

I want to use tubesync to download mainly music files, and for that I want to run 2 specific post-processors.
The two post-processors this is about is ReplayGain and FixupMtime

I want to run these as I want to first run ReplayGain on any downloaded .ogg file, followed by setting the mtime of the .ogg file to the upload_date from the youtube video. (1. to not blow up my ears in my car when shuffling, 2. to actually get my playlists in release order in navidrome)

Is there any way running post-processors could be added? Or these two functionalities maybe implemented as native functions of tubesync?

@meeb
Copy link
Owner

meeb commented Aug 12, 2024

I can see that this would be useful to some however this looks messy to directly implement inside of tubesync. Do you use a standard set of arguments for these plugins or do you use custom arguments for each download?

@vodkapmp
Copy link
Author

I use a standard set of arguments for them for all downloads, specifically this:
ReplayGain: --use-postprocessor 'ReplayGain:when=after_move;no_album=true'
when=after_move Should always be after_move (this is when it has to run)
no_album=true Might change, as this is what says if it should be track or album gain (though personally I only use track gain so it is always true)

FixupMtime: --use-postprocessor 'FixupMtime:when=after_move;mtime_key=upload_date;mtime_format=%Y-%m-%d'
when=after_move Should always be after_move (this is when it has to run)
mtime_key=upload_date This tells it what date to use to set the mtime, it could be upload_date or release_date, but I assume most would want it to be upload_date
mtime_format=%Y-%m-%d' This one should also be static, as mtime has to be in this format (though it could be the full %Y-%m-%dT%H.%M.%S if one cares about the upload hours, minutes, and seconds)

They also have to be done in this order, replaygain before mtime, otherwise the replaygain postprocessor will overwrite the set mtime.

Implementing the ReplayGain plugin might be a bit extra work though, as it has external dependencies as you can see on the github page (rsgain, mp3gain, vorbisgain, and metaflac)
Though rsgain should cover all files, and the other 3 are just fallback for if rsgain is missing.

@meeb
Copy link
Owner

meeb commented Aug 13, 2024

Thanks for the example args. I'll look into this a bit more. I may be against adding this as a relatively complex feature that requires ongoing support (updating external libs and dependencies etc.) for a very small audience. If more people show an interest in this it would bump it up the wishlist.

You can always extend the container yourself and hack in yt-dlp API arguments in the interim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants