Opened 11 years ago

Closed 11 years ago

#8240 closed defect (fixed)

.srt subtitles do not work if brackets are in the filename

Reported by: anonymous Owned by: Anduin Withers
Priority: minor Milestone: unknown
Component: MythTV - Video Playback Version: 0.22-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


If the video filename is video[something].avi and the srt file is named video[something].srt the subtitles are not displayed.

(this is different from #6869)

Attachments (1)

playback.log (18.4 KB) - added by Kenni Lund <kenni@…> 11 years ago.
-v playback

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by robertm

Component: Plugin - MythVideoMythTV - Video Playback
Resolution: worksforme
Status: newclosed

Working fine here with current trunk (and therefore in .23), tested filename "BBC Life 1x01 [2].mpg/srt".

comment:2 Changed 11 years ago by Kenni Lund <kenni@…>

Resolution: worksforme
Status: closednew

Well, something is wrong for sure...a user on mentioned that he had this bracket issue on his 0.23-fixes r23912. I went on and tested it on my own 0.23-fixes r23585 and I have the same issue.

Playing videos which contains brackets - [] or () - in their filenames, will not be able to display subtitles (no subtitles are available when clicking "T"). I tested with the following two movies, which both had the issue:

[mythtv@mc Movies]$ ll Film_SD_2010/Beowulf\[2007\]DvDrip\[Eng\].*
-rw-r----- 1 root mythtv 733382656 11 apr  2008 Film_SD_2010/Beowulf[2007]DvDrip[Eng].avi
-rw-r----- 1 root mythtv     59483 11 apr  2008 Film_SD_2010/Beowulf[2007]DvDrip[Eng].srt

[mythtv@mc Movies]$ ll Film_SD_2010/Blade.Runner.\(2007\).*
-rw-r----- 1 root mythtv 734945280  5 dec 22:24 Film_SD_2010/Blade.Runner.(2007).avi
-rw-r----- 1 root mythtv     53339  2 jan  2008 Film_SD_2010/Blade.Runner.(2007).srt

I don't know if this could have anything to do with the problem, but the text within the brackets are stripped away in the names shown:

Blade.Runner.(2007).avi -> "Blade Runner"
Beowulf[2007]DvDrip[Eng].avi -> "BeowulfDvDrip"

I've attached a -v playback log, which show that the subtitle file isn't loaded (no OpenFile? on the srt subtitle file). The files are stored on a mounted NFS share. Tell me if you need me to perform some further tests.

[mythtv@mc Movies]$ mythfrontend --version
Please include all output in bug reports.
MythTV Version   : 23858M
MythTV Branch    : branches/release-0-23-fixes
Network Protocol : 56
Library API      : 0.23.20100314-1
QT Version       : 4.6.2
Options compiled in:
 linux release using_oss using_alsa using_backend using_dvb using_frontend using_hdpvr using_iptv using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg

Changed 11 years ago by Kenni Lund <kenni@…>

Attachment: playback.log added

-v playback

comment:3 Changed 11 years ago by robertm

Resolution: invalid
Status: newclosed
Ticket locked: set

Used both of your filenames this time, still no issue whatsoever in loading an external .srt subtitle. I suggest that this is a locale/filesystem issue.

comment:4 Changed 11 years ago by robertm

Resolution: invalid
Status: closednew
Ticket locked: unset

Hmm, I tried a local file versus a storage group file, and had a failure. So works in SGs, fails on local storage. *Probably* not worth fixing as local video storage is going the way of the dod, but I'll reopen and if someone wants to fix it, they can.

comment:5 Changed 11 years ago by robertm

Resolution: fixed
Status: newclosed

(In [24108]) Fixes #8240. Re-enable external subtitles when brackets or parenthesis are in the filename. Earlier in the function these were replaced with ? for wildcard matching, and then that basename is used to construct the final subtitle filename. By simply returning the subtitle filename instead of constructing it out of component parts, everything seems to work properly in both SG and local configurations.

Note: See TracTickets for help on using tickets.