naming .srt files the same as the corresponding .mkv in the same folder

Support for macOS users
Post Reply
yhm28
Posts: 29
Joined: 24 Jan 2018, 07:20

naming .srt files the same as the corresponding .mkv in the same folder

Post by yhm28 »

I'm having a problem where the subtitle files in the same folder as the .mkv movie files are not being named identically

this is the format I am using:

Format: Select all

/Users/sequoia/Desktop/renamed/
{n} ({y})
{ allOf
  { vf }
  { mbps }
  { aco.replace('DTS-HD High Resolution Audio':'DTS-HD', 'DTS-HD Master Audio':'DTS-HD', 'DTS-HD MA + IMAX Enhanced':'DTS-HD', 'DTS-HD MA + DTS:X':'DTS-HD', 'DTS-HD HRA + DTS:X':'DTS-HD', 'Dolby TrueHD with Dolby Atmos':'TrueHD', 'Dolby TrueHD':'TrueHD', 'MLP':'TrueHD', 'DTS-ES Discrete':'DTS-ES', 'Dolby Digital':'AC3', 'Dolby Digital Plus':'EAC3', 'AC3 Plus':'EAC3', 'Dolby Digital Plus with Dolby Atmos':'EAC3', 'EAC3 with Dolby Atmos':'EAC3', 'Layer 3':'MP3', 'Layer 2':'MP2', 'HE-AAC':'AAC') }
  { af }
  { video[0].FrameRate }
  { vc.replace('Microsoft':'VC-1', 'AVC':'H.264', 'x264':'H.264', 'H.264pro':'H.264', 'HEVC':'H.265', 'x265':'H.265', 'ATEME':'H.265', 'H.265M':'H.265', 'x264pro':'H.264') }
  { any{ hdr.replace('Dolby Vision':'DoVi') }{ 'SDR' } }
  .joining(' ', ' [', ']')
}/
{n} ({y})
{ allOf
  { vf }
  { mbps }
  { aco.replace('DTS-HD High Resolution Audio':'DTS-HD', 'DTS-HD Master Audio':'DTS-HD', 'DTS-HD MA + IMAX Enhanced':'DTS-HD', 'DTS-HD MA + DTS:X':'DTS-HD', 'DTS-HD HRA + DTS:X':'DTS-HD', 'Dolby TrueHD with Dolby Atmos':'TrueHD', 'Dolby TrueHD':'TrueHD', 'MLP':'TrueHD', 'DTS-ES Discrete':'DTS-ES', 'Dolby Digital':'AC3', 'Dolby Digital Plus':'EAC3', 'AC3 Plus':'EAC3', 'Dolby Digital Plus with Dolby Atmos':'EAC3', 'EAC3 with Dolby Atmos':'EAC3', 'Layer 3':'MP3', 'Layer 2':'MP2', 'HE-AAC':'AAC') }
  { af }
  { video[0].FrameRate }
  { vc.replace('Microsoft':'VC-1', 'AVC':'H.264', 'x264':'H.264', 'H.264pro':'H.264', 'HEVC':'H.265', 'x265':'H.265', 'ATEME':'H.265', 'H.265M':'H.265', 'x264pro':'H.264') }
  { any{ hdr.replace('Dolby Vision':'DoVi') }{ 'SDR' } }
  .joining(' ', ' [', ']')
}
subtitles are tagged only [SDR]
how do I get them to have the exact same tags as the .mkv files?
User avatar
rednoah
The Source
Posts: 24326
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: naming .srt files the same as the corresponding .mkv in the same folder

Post by rednoah »

:?: What are the file names you have? Please share sample file paths as text so that we can have a look.


:idea: MediaInfo-based bindings such as {vc} and {hdr} or based on the corresponding primary video file even if the file at hand is a subtitle file. This notably only works if the video file / subtitle file have mostly the same file name:

Code: Select all

Avatar.mkv
Avatar.eng.srt
:idea: Please read the FAQ and How to Request Help.
yhm28
Posts: 29
Joined: 24 Jan 2018, 07:20

Re: naming .srt files the same as the corresponding .mkv in the same folder

Post by yhm28 »

sorry for the delay, here are sample paths. Note that renaming is correct for Rashomon, but not for any others. The drives are mounted by NFS, and on screen it also shows "~/Desktop/" in front which is where the NFS sharing folders are.

Image
Image

Code: Select all

ZL7NFS/to be archived ZL7/Rashomon (1950) [1080p 36.2 Mbps PCM 1ch 23.976 x264]/Rashomon (1950) [1080p 36.2 Mbps PCM 1ch 23.976 x264].mkv	{"@type":"Movie","year":1950,"imdbId":42876,"tmdbId":548,"language":"en-US","id":548,"name":"Rashomon","aliasNames":["羅生門"]}
ZL7NFS/to be archived ZL7/Rashomon (1950) [1080p 36.2 Mbps PCM 1ch 23.976 x264]/Rashomon (1950) [1080p 36.2 Mbps PCM 1ch 23.976 x264].srt	{"@type":"Movie","year":1950,"imdbId":42876,"tmdbId":548,"language":"en-US","id":548,"name":"Rashomon","aliasNames":["羅生門"]}
ZL7NFS/to be archived ZL7/Striptease (1996) [1080p 19.9 Mbps DTS 6ch 23.976 H.264]/Striptease (1996) [1080p 19.9 Mbps DTS 6ch 23.976 H.264].mkv	{"@type":"Movie","year":1996,"imdbId":117765,"tmdbId":9879,"language":"en-US","id":9879,"name":"Striptease","aliasNames":[]}
ZL7NFS/to be archived ZL7/Striptease (1996) [1080p 19.9 Mbps DTS 6ch 23.976 H.264]/Striptease (1996) [1080p 19.9 Mbps DTS 6ch 23.976 H.264].srt	{"@type":"Movie","year":1996,"imdbId":117765,"tmdbId":9879,"language":"en-US","id":9879,"name":"Striptease","aliasNames":[]}
ZL7NFS/to be archived ZL7/The Toy (1982) [1080p 26.7 Mbps DTS 2ch 23.976 H.264]/The Toy (1982) [1080p 26.7 Mbps DTS 2ch 23.976 H.264].mkv	{"@type":"Movie","year":1982,"imdbId":84809,"tmdbId":23805,"language":"en-US","id":23805,"name":"The Toy","aliasNames":[]}
ZL7NFS/to be archived ZL7/The Toy (1982) [1080p 26.7 Mbps DTS 2ch 23.976 H.264]/The Toy (1982) [1080p 26.7 Mbps DTS 2ch 23.976 H.264].srt	{"@type":"Movie","year":1982,"imdbId":84809,"tmdbId":23805,"language":"en-US","id":23805,"name":"The Toy","aliasNames":[]}
ZL7NFS/to be archived ZL7/This Is Martin Bonner (2013) [720p 4.2 Mbps AC3 6ch 23.976 x264]/This Is Martin Bonner (2013) [720p 4.2 Mbps AC3 6ch 23.976 x264].mkv	{"@type":"Movie","year":2013,"imdbId":1798291,"tmdbId":158895,"language":"en-US","id":158895,"name":"This Is Martin Bonner","aliasNames":[]}
ZL7NFS/to be archived ZL7/This Is Martin Bonner (2013) [720p 4.2 Mbps AC3 6ch 23.976 x264]/This Is Martin Bonner (2013) [720p 4.2 Mbps AC3 6ch 23.976 x264].srt	{"@type":"Movie","year":2013,"imdbId":1798291,"tmdbId":158895,"language":"en-US","id":158895,"name":"This Is Martin Bonner","aliasNames":[]}
ZL7NFS/to be archived ZL7/Waiting for Guffman (1996) [1080p 39.1 Mbps DTS 2ch 23.976 H.264]/Waiting for Guffman (1996) [1080p 39.1 Mbps DTS 2ch 23.976 H.264].mkv	{"@type":"Movie","year":1996,"imdbId":118111,"tmdbId":16448,"language":"en-US","id":16448,"name":"Waiting for Guffman","aliasNames":[]}
ZL7NFS/to be archived ZL7/Waiting for Guffman (1996) [1080p 39.1 Mbps DTS 2ch 23.976 H.264]/Waiting for Guffman (1996) [1080p 39.1 Mbps DTS 2ch 23.976 H.264].srt	{"@type":"Movie","year":1996,"imdbId":118111,"tmdbId":16448,"language":"en-US","id":16448,"name":"Waiting for Guffman","aliasNames":[]}
Post Reply