Subtitles re-naming issue

Any questions? Need some help?
Post Reply
gizmofreak
Posts: 4
Joined: 25 Dec 2013, 18:53

Subtitles re-naming issue

Post by gizmofreak »

Hi, I have some TV series in my HDD. I took the help of 'FileBot' to download the subtitles. But the problem is that it has not renamed the subtitles exactly the same was as clip is named.

For e.g., the name of the clip is '24 Season 1 Episode 01 - 12AM - 1AM' but the subtitled is name as '24 Season 1 Episode 01 - 12AM - 1AM.eng.srt'. :?

As a result, when I play the clip on my media player, it does not recognize it for the clip be played.

How to ensure that subtitles are named exactly the same way as clip is named?

Thanks
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles re-naming issue

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
gizmofreak
Posts: 4
Joined: 25 Dec 2013, 18:53

Re: Subtitles re-naming issue

Post by gizmofreak »

Thanks rednoah for the reply. I am not a techie person, can you please advise how to use the script?

And what I understand from your reply is that it is to be used after downloading the subtitles..is it right?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles re-naming issue

Post by rednoah »

Here's a cmd script:
https://github.com/filebot/cmdlets/blob ... ge-tag.cmd

You can either use it from cmdline or just drop files onto the .cmd file and it'll run the command on the files you dropped.


EDIT:
Though the most non-techie way of doing things is to use FileBot and just drag your subtitles in on the right-hand side and then drag in your video files on the left-hand side so the video names serve as template for the subtitle names.

Alternatively you can just use a proper media player like VLC.
:idea: Please read the FAQ and How to Request Help.
gizmofreak
Posts: 4
Joined: 25 Dec 2013, 18:53

Re: Subtitles re-naming issue

Post by gizmofreak »

Hi,
CMD script is giving the following error:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\yyyyyyy\xxxxxxxx>filebot -script fn:replace --filter "[.](srt|sub|ass)$" --def "e=([.
]\w+)([.]\w+)" "r=$2" %*
Dec 26, 2013 2:48:10 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Dec 26, 2013 2:48:10 PM net.sourceforge.filebot.cli.ArgumentBean getFiles
WARNING: Invalid argument
FileNotFoundException: C:\yyyyyyy\xxxxxxx\%*
java.io.FileNotFoundException: C:\yyyyyyy\xxxxxxxx\%*
at Script2$_run_closure13.doCall(Script2.groovy:24)
at Script2$_run_closure14_closure86.doCall(Script2.groovy:25)
at Script2$_run_closure14.doCall(Script2.groovy:25)
at Script3.run(Script3.groovy:11)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(ScriptShell.java:102
)
at net.sourceforge.filebot.cli.ScriptShell.runScript(ScriptShell.java:95
)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcess
or.java:125)
at net.sourceforge.filebot.Main.main(Main.java:190)
Failure (░_░)
Launch4j: Failed to run the given command.
C:\yyyyyyyy\xxxxxxxxx>
The other way you suggested " just drag your subtitles in on the right-hand side and then drag in your video files on the left-hand side" on the "Rename" menu of the software is also not helping.

I watch the movies/ TV serial by directly connecting the HDD/USB to TV or through HD media player ( AC Ryan Playon!HD). This require the subtitles to be named exactly as the name of the clip.

Please advise...I want to do the batch renaming of subtitles to match the name of video clips.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Subtitles re-naming issue

Post by rednoah »

Made a video:
http://www.youtube.com/watch?v=2bj6aWQxO4s

It's really pretty much exactly like I tried to describe. :P
:idea: Please read the FAQ and How to Request Help.
gizmofreak
Posts: 4
Joined: 25 Dec 2013, 18:53

Re: Subtitles re-naming issue

Post by gizmofreak »

Thanks buddy....mission accomplished. Thank you so much for taking out the time to prepare the video which made the things look so easy. :D

Is there any such easy to understand tutorial for using scripts which filebot as well?

Thank you for this wonderful program.
User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: Subtitles re-naming issue

Post by Ithiel »

I had 5219 files across hundreds of sub directories that I needed to rename to remove the language tag, and came up with the below.

I can guarantee you that there is a faster and more efficient way out there, but at 11pm on a Friday night when I was tired and in a hurry.. this worked:

First, open command prompt and navigate to the parent folder that your shed-load of .eng.srt files exist (e.g. N:\TV Shows\), and run this:

Code: Select all

dir /b /s *.eng.srt > file_list.txt
(If using a UCN path, you'll need to map it as a network drive temporarily, browse via the mapped drive, and then open the txt and do a 'replace all' to swap out the network drive with the full UNC path - unless your FileBot likes network drives, which mine doesn't lol.. YMMV)

Next, you'll need to do a 'replace all' to make sure that each line starts and ends with a double quote character " like this:
"N:\TV Shows\Show Name\Season 01\Show Name S01E01 Stuff [480p DivX MP3 2ch].eng.srt"
"N:\TV Shows\Show Name\Season 01\Show Name S01E02 Stuff [480p DivX MP3 2ch].eng.srt"
"N:\TV Shows\Show Name\Season 01\Show Name S01E03 Stuff [480p DivX MP3 2ch].eng.srt"
Then, move file_list.txt to a path without spaces (in this example, N:\)

The next assumes you have created remove-language-tag.cmd from rednoah's GitHub link above (also assumes you saved it in C:\Program Files\FileBot\cmdlets\)

Finally, run this from the command line:

Code: Select all

for /F "delims==" %1 in (N:\file_list.txt) do call "C:\Program Files\FileBot\cmdlets\remove-language-tag.cmd" %1
Now.. you'd think that putting quotes around the name of the file like ("N:\file_list.txt") would allow a path without spaces, but no... You'd think that maybe putting double quotes or double double (escape) quotes around the %1 might negate the need to put each line of the text file between quotes, but no...

There's probably an easy enough way around those limitations, but the above worked, and after I got it sorted, I didn't really want to spend any more time looking at the issue, lol
There can be only one Power² User
Post Reply