metube icon indicating copy to clipboard operation
metube copied to clipboard

[QUESTION] A way to use --replace-in-metadata option

Open gr3m1in opened this issue 2 years ago • 3 comments

Hi folks,

First of all, many thanks for the great work you are doing!

I'm trying to figure out how do I use the "--replace-in-metadata" parameter running dockerized metube instance. This option is not described neither at readme.md nor at youtubedl.py where readme.md points for available options. Is there a way to use an yt-dlp option if it is not described explicitly? If so - what should be the json structure for values to it?

Thank you in advance.

Kind regards, gr3m1in

gr3m1in avatar Sep 21 '22 14:09 gr3m1in

a little investigation, yt-dlp.py does not provide any way to modify metadata. Because the metadata has been determined at the time of download and remains unchanged during the download process.

The command line tool also processes the metadata before the download starts.

Maybe you need to find a way to modify the metadata data before starting the download.

PikuZheng avatar Sep 23 '22 14:09 PikuZheng

however it is supported by yt-dlp itself as a command-line parameter https://github.com/yt-dlp/yt-dlp#modifying-metadata-examples (the last example in the block) so i thought that it might be passed via YTDL_OPTIONS docker env parameter, but since replace-in-metadata accepts three values, it is not clear what should be the format of YTDL_OPTIONS json structure to specify them...

gr3m1in avatar Sep 23 '22 14:09 gr3m1in

fyi, here is the list for python objects: https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L180

PikuZheng avatar Sep 23 '22 23:09 PikuZheng