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

Rename file based on codec #358

Open
raysv opened this issue Oct 14, 2023 · 9 comments
Open

Rename file based on codec #358

raysv opened this issue Oct 14, 2023 · 9 comments

Comments

@raysv
Copy link

raysv commented Oct 14, 2023

What is your new plugin request?

Would like to see a plugin that renames the transcoded file and based on the new codec.

ex:

My Show - S01E01 - blah - 1080p Remux - AVC.mkv --> My Show - S01E01 - blah - 1080p Remux - HEVC.mkv

I know sonarr, filebot etz can be used for this, but much neater having it done at this stage -

Additional Context

No response

@yajrendrag
Copy link
Contributor

There is a rename_file plugin in my private repo that does this. in addition to video codec, you can optionally also append, audio codec (of first or default audio stream), video resolution, & audio resolution. Moreover, you can choose to replace those fields in the filename if the source file name already had those - it will update them based on what is reported by ffprobe for the transcoded copy. Finally, it will also change the name of any associated files in the same directory as the output video file - e.g., nfo, srt etc.

@tal
Copy link

tal commented Nov 14, 2024

Thats great! Care to share it?

@yajrendrag
Copy link
Contributor

it's in my personal repo - click the install plugin button in the unmanic GUI, click add repository, paste this url https://raw.githubusercontent.com/yajrendrag/unmanic-plugins/repo/repo.json, hit ok (or whatever the button label is), then click the refresh repositories button in that same GUI. Then search for it and you should find it..

@tal
Copy link

tal commented Nov 15, 2024

Oh i tried to add the root of the repo to the ui.

@joseluislucas
Copy link

@yajrendrag your rename plugin works really well, but if the native filename does not have the codec in the name I'm not able to append it to the filename.
Example: Big Buck Bunny (2008) 1080p.mkv

After conversion and since there is no x264 (for example) in the name it will not show x265/HEVC, and the name will be the same.
The aim is to mark all the files with the new codec so we know which one are already x265.

Or at least I did not find the option in the settings.

Maybe I'm missing something?
Thanks!

@yajrendrag
Copy link
Contributor

yajrendrag commented Dec 16, 2024

@joseluislucas - are you asking for the replace option to allow replacing the null string for the encoder string in the original filename with the new encoder OR are you asking for the append option to include the video codec?

@joseluislucas
Copy link

I'm using the option "Check this option if you want to replace existing field names with new values from ffprobe of the transcoded file; uncheck if you wish to append new fields to the file name from ffprobe metadata." But unfortunately, most of my filenames do not contain codec info, so there is nothing to replace, so I'm wondering how to add the codec to the filename in those cases, but keeping the functionality of the checked option.

@yajrendrag
Copy link
Contributor

ok, i added a new option that is visible when you check that option - it allows you to add the codec name to the new (transcoded) file even if the source file doesn't have a codec name field in it. update the plugin and it should work the way you wish.

@joseluislucas
Copy link

@yajrendrag you are the best!.

Many thanks!

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

No branches or pull requests

4 participants