Page 1 of 1

More DVB subtitles - can a script help me

Posted: Wed May 02, 2012 9:18 pm
by edehn
Hi
I just started to evaluate WMS, and nearly all looks great.
I have a Sony Bravia 40EX721 and make TV recordings with Dvbviewer.
It gives me TS files with a video and audio and 3 streams with subtitles. 2 DVB and 1 teletext.
My recordings are stored on a NAS in different subfolders under a main video folder.

The transcoding works well, it burns in the selected subtitle, but I have to select that subtitle manually, and that the problem, all the new files are split around in different subfolders.

So want to know if it is possible to make a script, that select the first DVB sub (all 3 have the language Danish), as soon as the scanner has detected a new file has arrived.

edehn

Re: More DVB subtitles - can a script help me

Posted: Mon May 07, 2012 6:51 pm
by Eugene
Hi,

version 1.51 - http://www.wildmediaserver.com/forum/vi ... f=3&t=1539

Settings - Processing - Add -
Name: Select subtitle
Script:

Code: Select all

begin
  if (CurrentMediaItem <> nil) and (CurrentMediaItem.MediaType = mtVideo) and 
     SameText(ExtractFileExt(CurrentMediaItem.Properties[mpiFilePath]), '.ts') then     
    WmsSelectStreamByLanguage(CurrentMediaItem, stSubtitle, 'dan') 
end.
Settings - Events - "After reading of properties of a media resource" - "Select subtitle" - Ok
Select a file - right click - "Load file properties"