Re: [Freevo-users] Subtitles in video files - sorry if this has been asked already
On Tue, Dec 28, 2010 at 7:42 AM, davor beuc davor.b...@gmail.com wrote: 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. I had the same problem before because I wanted to switch between subtitles of different languages, or disable them altogether, so I added this to my local_conf.py file: EVENTS['video']['tv-3'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_select') tv-3 is the lirc command that changes the subtitles. Every time freevo receives tv-3 it will send the command to mplayer. Check out the mplayer documentation for all possible commands. These are the commands I use, you might find some of them useful: # Muestra el nombre del archivo EVENTS['video']['tv-1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='osd_show_property_text ${filename} 5000') # Cambia velocidad de reproduccion EVENTS['video']['tv-2'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='speed_incr -0.25') EVENTS['video']['tv-7'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='speed_incr +0.25') # Selecciona subtitulo EVENTS['video']['tv-3'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_select') # Selecciona canal de audio EVENTS['video']['tv-8'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_audio') # Cambia aspecto EVENTS['video']['tv-4'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_ratio 1.8') EVENTS['video']['tv-9'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_ratio 1.4') # OSD EVENTS['video']['tv-10'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='osd') # Cambia defase de subtitulos EVENTS['video']['tv-11'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_delay -0.050') EVENTS['video']['tv-up'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_delay +0.050') # Cambia defase de audio EVENTS['video']['tv-12'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='audio_delay -0.050') EVENTS['video']['tv-down'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='audio_delay +0.050') # Comandos de DVD EVENTS['video']['tv-input'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_title') EVENTS['video']['tv-left']= Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_angle') EVENTS['video']['tv-display'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek_chapter -1') EVENTS['video']['tv-right'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek_chapter +1') # Cambia tamano de subtitulos EVENTS['video']['tv-power'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_scale -0.05') EVENTS['video']['tv-sel'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_scale +0.05') # Esto lo hace freevo solito # EVENTS['video']['ch-'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='pt_step +1') # EVENTS['video']['ch+'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='pt_step -1') # right y left lo maneja freevo automaticamente # Arriba y abajo avanza y retrocede 5 minutos cada vez EVENTS['video']['UP'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek +300') EVENTS['video']['DOWN'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -300') Best regards, Alan -- 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
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 sub_file.srt 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
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 sub_file.srt 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