SRT File Selection
-
Hi Everyone,
I have a setup using the SRT Player. Lots of videos selected at Random and played through a projector, is there a way to select the matching SRT file to play in sync on a separate projector/screen?
I've no doubt Im overlooking an obvious Actor to make this happen, enjoying having the subtitles be adaptable through the text draw so would like to keep it that way if possible.
Many thanks
Simon
-
@simon100 said:
<p>Hi Everyone, </p><p>I have a setup using the SRT Player. Lots of videos selected at Random and played through a projector, is there a way to select the matching SRT file to play in sync on a separate projector/screen? </p><p>I've no doubt Im overlooking an obvious Actor to make this happen, enjoying having the subtitles be adaptable through the text draw so would like to keep it that way if possible.</p><p>Many thanks</p><p>Simon</p>
thanks
-
I would suggest the table actor. Something like this:
Other options exist, like using Data Array, but this seems possibly the most straight forward. -
Big thanks @dusx that looks great.
Very much appreciated 👍🙏
-
you could use the "Get media file name" actor combined with the "text formatter". This way you'd always open the srt file with the same file name of the media file.
By the way, if some one reads this with knowledge; Is there a way to 'invert' the text chopper? To optimize this, it would be great to 'chop off' the .avi or what ever there is. But the "text chopper" actor just leaves the last three chars instead. I feel, this is misleading if one thinks to chop off three chars from the end. But the mouse over help tells otherwise.
-
@dillthekraut I agree the text chopper should be able to do this - seems dumb that it cannot - at any rate this kind of work is better to offload to something a little more standardised than these strange actors. You can use the javascript actor for this easily. Make sure to connect the inputs and outputs of the actor to something that can send and receive text respectively othewise this will not work - the outputs dont automutate to types based on the code for some reason.
// iz_input 1 "fileName" // iz_output 1 "fileNameWithoutExtension" function main() { // Get the input file name from the first argument let fileName = arguments[0]; // Use JavaScript to get the base name by removing the last segment after the dot let fileNameWithoutExtension = fileName.substring(0, fileName.lastIndexOf('.')); // If there is no dot (i.e., no extension), return the file name as it is if (fileNameWithoutExtension === "") { fileNameWithoutExtension = fileName; } return fileNameWithoutExtension; }