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

Truenas Scale Build - Cannot set different output templates for different metadata files #539

Open
CenterfireXid opened this issue Nov 4, 2024 · 0 comments

Comments

@CenterfireXid
Copy link

Hello,

I am running MeTube as a chart on my TrueNAS system. It has been working great so far. Because it is a "chart" there is limited customizing available. For example, in order to make changes to the output settings or YTDL options, you can only make changes here:

image

Here is the output template I have been using:

%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s

This successfully outputs this filename "Dirty Civilian - Low-Vis Armor + Chest Rig Combo for Civilian Defense - 2024-09-21 - [TTsi4Kg6hkQ].mp4" for this Youtube video which is the behavior I want.

Recently, I have been embedding thumbnails in the video using this YTDL Option:

{"writeautomaticsub":true,"subtitleslangs":["en","-live_chat"],"writethumbnail":true,"updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegEmbedSubtitle","already_have_subtitle":false},{"key":"FFmpegMetadata","add_chapters":true},{"key":"EmbedThumbnail"}]}

This successfully downloads and embeds english subtitles as well as downloads and embeds the thumbnails. HOWEVER, I want to rename the thumbnail to either "poster.(ext)" or any filename with the keyword "poster" in it. After diving into the README.md I see that I should be using this output template:

-o "%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s" -o "thumbnail:poster%(ext)s"

However, because this is a TrueNAS chart, I can only input my Output Template in this box

image

I have tried many different permutations of the output to no avail. Here are what I have tried so far:

Test 1
"%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s" "thumbnail:poster
Attempt - rename thumbnail as "poster"
RESULT: Successful download, however name is garbled "_S5L0M~L.MP4"

Test 2
%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s thumbnail:poster
RESULT: Successful download, however name is garbled "DBFLJR~H.MP4"

Test 3
%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
RESULT: Garbled name "D9NQLN~V.MP4"

Test 4
"%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s" "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
RESULT: Garbled name

Test 5
-o "%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s" -o "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
Fails Download

Test 6
"%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s" -o "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
Fails Download

Test 7
%(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s -o "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
Downloads, but garbled name

I am guessing that the way this TrueNAS chart works is that the GUI has whatever you input within the "Output Template" Box

image

already with the "-o" which is why when trying to add additional output templates for the metadata, it spits out garbled filenames. scrolling down in the chart options, I found these boxes that you can add additional lines to:

image

I have tried messing with these boxes as well to no avail. Here is what I have tried:

Test 1
OUTPUT \\\ %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S.%(ext)s
Extra Args \\\ -o "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
RESULT: App not deploying

Test 2
OUTPUT \\\ %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s
Advanced>Command \\\ -o thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s
RESULT: App not Deploying

Test 3
OUTPUT \\\ %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S.%(ext)s
Env Var \\\ -o \\\ thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s
RESULT: Successful download, but thumbnail name is same as video file BUT NO YOUTUBE ID ---> Forgot to add that

Test 4
OUTPUT \\\ %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S.%(ext)s
Env Var \\\ -output \\\ "thumbnail:poster - %(uploader,creator)S - %(title)S - %(release_date>%Y-%m-%d,upload_date>%Y-%m-%d)S - [%(id)S].%(ext)s"
RESULT: Successful, BUT thumbnail name is same as video file

Please help me out as I am pulling my hair out trying to figure this out.

Note: I am trying to add "poster" within the filename of the thumbnail so that the embedded thumbnail/image stream has "poster" within it - this is so the media player I am using can properly recognize the embedded thumbnails as thumbnails and display them as poster/cover art.

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

1 participant