[Freevo-users] Subtitles in video files - sorry if this has been asked already

2010-12-27 Thread davor beuc
Hi,

is it possible to configure Freevo in a way that it allows me to
select both the AVI file that I want to play and its .srt subtitle? It
works good if AVI and SRT files have exactly the same name (except
extension, of course). But this is not always the case and it would be
a payne in th back side if i start now renaming subtitles for my huge
collection of films and tv shows :)
So, any ideas, preferably that don't include creating fxd files or
renaming my entire collection, which is 2 TB worth of video files,
btw.



##  ---
In Freevo source, i saw this two functions in src/video/configure.py:

def subtitle_selection(arg=None, menuw=None):
   """
   Subtitle selection menu action
   """
   arg[0].selected_subtitle = arg[1]
   menuw.back_one_menu()


def subtitle_selection_menu(arg=None, menuw=None):
   """
   Subtitle selection menu list
   """
   item = arg

   menu_items = [ menu.MenuItem(_('no subtitles'),
subtitle_selection, (item, -1)) ]

   for subtitle in item.info['subtitles']:
   s = copy.copy(subtitle)

   if not s.has_key('id') or not s['id']:
   s['id'] = item.info['subtitles'].index(subtitle)

   if not s.has_key('language') or not s['language']:
   s['language'] = _('Stream %s') % s['id']

   if not s.has_key('title') or not s['title']:
   s['title'] = ''
   if s['title'] == 'Undefined':
   s['title'] = ''

   if s['title'] != '':
   s['title'] = ' (%s)' % s['title']

   txt = '%(language)s%(title)s' % s
   menu_items.append(menu.MenuItem(txt, subtitle_selection,
(item, s['id'])))

   moviemenu = menu.Menu(_('Subtitle Menu'), menu_items,
fxd_file=item.skin_fxd)
   menuw.pushmenu(moviemenu)

##---


I'm not sure if it is related to DVD or external subs. Anyway guys, is
there an option in video player plugin to present a list of .srt files
in a direktory, so I could choose with wich subtitle to watch the
video. In mplayer it is a simple command "mplayer -sub "

Thanks,
Davor

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


[Freevo-users] Subtitles in video files - sorry if this has been asked already

2010-12-27 Thread davor beuc
Hi,

is it possible to configure Freevo in a way that it allows me to
select both the AVI file that I want to play and its .srt subtitle? It
works good if AVI and SRT files have exactly the same name (except
extension, of course). But this is not always the case and it would be
a payne in th back side if i start now renaming subtitles for my huge
collection of films and tv shows :)
So, any ideas, preferably that don't include creating fxd files or
renaming my entire collection, which is 2 TB worth of video files,
btw.



##  ---
In Freevo source, i saw this two functions in src/video/configure.py:

def subtitle_selection(arg=None, menuw=None):
"""
Subtitle selection menu action
"""
arg[0].selected_subtitle = arg[1]
menuw.back_one_menu()


def subtitle_selection_menu(arg=None, menuw=None):
"""
Subtitle selection menu list
"""
item = arg

menu_items = [ menu.MenuItem(_('no subtitles'),
subtitle_selection, (item, -1)) ]

for subtitle in item.info['subtitles']:
s = copy.copy(subtitle)

if not s.has_key('id') or not s['id']:
s['id'] = item.info['subtitles'].index(subtitle)

if not s.has_key('language') or not s['language']:
s['language'] = _('Stream %s') % s['id']

if not s.has_key('title') or not s['title']:
s['title'] = ''
if s['title'] == 'Undefined':
s['title'] = ''

if s['title'] != '':
s['title'] = ' (%s)' % s['title']

txt = '%(language)s%(title)s' % s
menu_items.append(menu.MenuItem(txt, subtitle_selection,
(item, s['id'])))

moviemenu = menu.Menu(_('Subtitle Menu'), menu_items,
fxd_file=item.skin_fxd)
menuw.pushmenu(moviemenu)

##---


I'm not sure if it is related to DVD or external subs. Anyway guys, is
there an option in video player plugin to present a list of .srt files
in a direktory, so I could choose with wich subtitle to watch the
video. In mplayer it is a simple command "mplayer -sub "

Thanks,
Davor

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users