kaegi / alass

"Automatic Language-Agnostic Subtitle Synchronization"
GNU General Public License v3.0
994 stars 52 forks source link

Does this also work with tv shows? #10

Closed gelsas closed 4 years ago

gelsas commented 4 years ago

Does your software also works for tv shows?

Also is there a batch processing feature ? Because I would like to use it for my Plex library

Best regards Gelsas

Toqozz commented 4 years ago

Alass should work with any video file (containing an audio track) with an associated subtitle file (or just 2 subtitle files).

There is no batch processing feature currently. I have the following bash script which will run Alass for each mkv file in a directory; this might be a good start if you want to do your own batch processing right now, though I would like a first party batch processing option too.

#!/usr/bin/env bash

for file in ./*.mkv; do
    # find subtitle file -- 'filename.en.srt'
    subtitle="$(sed 's/\.[^.]*$/\.en\.srt/' <<< "$file")"
    # name for synced subtitle filename, i just use forced because it comes up in plex and i dont use it  for anything else
 -- 'filename.en.forced.srt'
    output="$(sed 's/\.[^.]*$/\.en\.forced\.srt/' <<< "$file")"
    alass "$file" "$subtitle" "$output"
done
kaegi commented 4 years ago

There is deliberately no "batch processing" feature built in directly into alass. That's because there exist more flexible alternatives: batch, bash, etc. . Integrating general purpose file handling functions (such as looping, renaming of files, searching, etc.) would just lead to a bad clone of a scripting language.

If you find that there is a use case you can't solve with a very simple script, then please feel free to reopen this issue.

gelsas commented 4 years ago

I do have one more question, all my files are on Google Drive. I mounted Google Drive with rclone. Will the script work if I used it on my mounted google drive?

Thank you for the quick responses

kaegi commented 4 years ago

Yes, it should work.

gelsas commented 4 years ago

Alass should work with any video file (containing an audio track) with an associated subtitle file (or just 2 subtitle files).

There is no batch processing feature currently. I have the following bash script which will run Alass for each mkv file in a directory; this might be a good start if you want to do your own batch processing right now, though I would like a first party batch processing option too.

#!/usr/bin/env bash

for file in ./*.mkv; do
    # find subtitle file -- 'filename.en.srt'
    subtitle="$(sed 's/\.[^.]*$/\.en\.srt/' <<< "$file")"
    # name for synced subtitle filename, i just use forced because it comes up in plex and i dont use it  for anything else
 -- 'filename.en.forced.srt'
    output="$(sed 's/\.[^.]*$/\.en\.forced\.srt/' <<< "$file")"
    alass "$file" "$subtitle" "$output"
done

I do have multiple languages of subtitles. How would I need to edit this script to also cover other languages like spanish? Also how do I need to modify it that it covers forced and also not forced subtitles ?

Thank you again for this application. It is saving me a lot of manual work!