Bug #1799

External subtitles are not loaded if video+subs are on NTFS drive

Added by Rural Hunter almost 7 years ago. Updated almost 7 years ago.

Status:FixedStart date:12/01/2013
Priority:HighDue date:
Assignee:Andreas Smas% Done:

100%

Category:Filesystem
Target version:4.4
Found in version:latest Platform:PS3

Description

I just tried the NTFS drivers. The vidoe files are read fine but the subtitles seems are not loaded. I even selected load all subtitles in the same dir of video file but it doesn't work. Same vidoe file with subtitles file are loaded fine on FAT32 driver.

Associated revisions

Revision 17ad3860
Added by Andreas Smas almost 7 years ago

Make sure fa_parent() works on NTFS drives (ugly hack)

Fixes #1799

Change included in version 4.3.694

History

#1 Updated by Rural Hunter almost 7 years ago

Oh fogot to metion, I tried only the external srt subtitles files. Didn't try other subtitles files.

#2 Updated by lewlewlewl lewlewlewl almost 7 years ago

i can confirm

#3 Updated by Rural Hunter almost 7 years ago

can this be fixed in the coming v4.4? Without fixing this, the NTFS support is not complete.

#4 Updated by Andreas Smas almost 7 years ago

  • Target version set to 4.4

I'll try to fix it

#5 Updated by Leonid Protasov almost 7 years ago

  • Subject changed from Subtitles not loaded on NTFS drivers to External subtitles are not loaded if video+subs are on NTFS drive

#6 Updated by Andreas Smas almost 7 years ago

  • Status changed from New to Need feedback

Can't reproduce. Log from my attempt

vp [DEBUG]: Waiting for event
vp [DEBUG]: Playing ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/Drive.2011.R5.XviD.AC3-ViSiON.avi flags:0x1
media [DEBUG]: Settings initialized for URL ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/Drive.2011.R5.XviD.AC3-ViSiON.avi
AVSYNC [DEBUG]: Set to 0 ms
SVSYNC [DEBUG]: Set to 0s
Video [DEBUG]: Starting playback of ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/Drive.2011.R5.XviD.AC3-ViSiON.avi (avi)
Probe [DEBUG]:  Stream #0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 720x304 [PAR 1:1 DAR 45:19]
Probe [DEBUG]:  Stream #1: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s
Subscanner [DEBUG]: Starting subtitle scan for Drive.2011.R5.XviD.AC3-ViSiON (imdbid:<unknown>) year:0 season:-1 episode:-1 duration:5801 opensubhash:0d479e008d391c7c
THREADS [DEBUG]: Created thread subscanner (0x10400aa)
Video [DEBUG]: Scanning for subs in ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/ for Drive.2011.R5.XviD.AC3-ViSiON
Video [DEBUG]:  Stream #0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 720x304 [PAR 1:1 DAR 45:19]
Video [DEBUG]:  Stream #0: Codec created
Video [DEBUG]:  Stream #1: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s
Video [DEBUG]:  Stream #1: Codec created
THREADS [DEBUG]: Created thread audio decoder (0x10400ab)
Video [DEBUG]: Selecting audio track libav:1
Video [DEBUG]: Selecting subtitle track ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/Drive.2011.R5.XviD.AC3-ViSiON.srt
Subtitles [DEBUG]: Trying to load ntfs0://Drive.2011.R5.XviD.AC3-ViSiON/Drive.2011.R5.XviD.AC3-ViSiON.srt
audio [DEBUG]: Codec changed to ac3
AUDIO [DEBUG]: The state is 1
AUDIO [DEBUG]: PS3 audio port 0 opened (2 channels)
Audio [DEBUG]: Converting from [5.1 48000Hz fltp] to [stereo 48000Hz flt]

It loads the subs just fine and I can see them displayed.
How does your output look?

#7 Updated by Rural Hunter almost 7 years ago

00:10:38.897: vp [DEBUG]:Waiting for event
00:10:38.897: vp [DEBUG]:Playing ntfs0://Cinema.Paradiso.1988.Director's.Cut.BluRay.720P.DTS.x264-CMCT.mkv flags:0x1
00:10:38.899: media [DEBUG]:Settings initialized for URL ntfs0://Cinema.Paradiso.1988.Director's.Cut.BluRay.720P.DTS.x264-CMCT.mkv
00:10:38.902: AVSYNC [DEBUG]:Set to 0 ms
00:10:38.903: SVSYNC [DEBUG]:Set to 0s
00:10:38.998: Video [DEBUG]:Starting playback of ntfs0://Cinema.Paradiso.1988.Director's.Cut.BluRay.720P.DTS.x264-CMCT.mkv (matroska,webm)
00:10:38.999: Probe [DEBUG]: Stream #0: Video: h264 (High), yuv420p, 1200x720 [PAR 1:1 DAR 5:3]
00:10:38.999: Probe [DEBUG]: Stream #1: Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
00:10:39.004: Subscanner [DEBUG]:Starting subtitle scan for 澶╁爞鐢靛奖闄¢ (imdbid:tt0095765) year:0 season:-1 episode:-1 duration:10411 opensubhash:0262defd70b8a46f
00:10:39.004: THREADS [DEBUG]:Created thread subscanner (0x10600e0)
00:10:39.005: Video [DEBUG]:Scanning for subs in for Cinema.Paradiso.1988.Director's.Cut.BluRay.720P.DTS.x264-CMCT
00:10:39.005: Video [DEBUG]: Stream #0: Video: h264 (High), yuv420p, 1200x720 [PAR 1:1 DAR 5:3]
00:10:39.005: Video [DEBUG]:Unable to scan for subtitles: File not found
00:10:39.033: VDEC [DEBUG]:Opening codec h264 level 42 using 54157309 bytes of RAM
00:10:39.043: VDEC [DEBUG]:Cell accelerated codec created using 54157309 bytes of RAM
00:10:39.044: Video [DEBUG]: Stream #0: Codec created
00:10:39.044: Video [DEBUG]: Stream #1: Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
00:10:39.045: Video [DEBUG]: Stream #1: Codec created
00:10:39.046: THREADS [DEBUG]:Created thread audio decoder (0x10600e4)
00:10:39.093: Video [DEBUG]:Selecting audio track libav:1
00:10:39.094: audio [DEBUG]:Codec changed to dca
00:10:39.096: AUDIO [DEBUG]:The state is 0
00:10:39.097: AUDIO [DEBUG]:PS3 audio port 0 opened (8 channels)
00:10:39.098: Audio [DEBUG]:Converting from [5.1 48000Hz fltp] to [7.1 48000Hz flt]
00:10:39.596: opensubtitles [DEBUG]:Added 0 subtitles

#8 Updated by Leonid Protasov almost 7 years ago

  • Priority changed from Normal to High

Looks like subscanner has the same chinese char bug like fa scanner/smb client https://showtimemediacenter.com/issues/1011

#9 Updated by Rural Hunter almost 7 years ago

There is no Chinese chars in the file path. I checked the log scanner part and it looks fine:
00:10:09.025: THREADS [DEBUG]:Created thread fa scanner (0x10600d3)
00:10:09.051: FA [DEBUG]:ntfs0://: Found 12 items in cache
00:10:09.079: FA [DEBUG]:ntfs0://: Rescanning found 16 items, previously 12
00:10:09.083: FA [DEBUG]:ntfs0://: File ntfs0://Man.of.Steel.2013.720p.BluRay.x264.DTS-WiKi.chs.srt added by rescan
00:10:09.084: FA [DEBUG]:ntfs0://: File ntfs0://Cinema.Paradiso.1988.Director's.Cut.BluRay.720P.DTS.x264-CMCT.Chs.srt added by rescan
00:10:09.085: FA [DEBUG]:ntfs0://: File ntfs0://Man.of.Steel.2013.720p.BluRay.x264.DTS-WiKi.srt added by rescan

One thing is interesting here. Why were all(and only) those srt files added by 'rescan'? They actually have been there with other files(such as video files) for long time.

#10 Updated by Rural Hunter almost 7 years ago

The error message:
00:10:39.005: Video [DEBUG]:Unable to scan for subtitles: File not found

Code(src/subtitles/subtitles.c):
/** * url - directory to scan in * video - filename of video
*/
static void
fs_sub_scan_dir(sub_scanner_t *ss, const char *url, const char *video,
const char *descend_filter, unsigned int level,
const subtitle_provider_t *sp1,
const subtitle_provider_t *sp2) {
fa_dir_t *fd;
fa_dir_entry_t *fde;
char errbuf256;

if(level  0)
return;
TRACE(TRACE_DEBUG, "Video", "Scanning for subs in %s for %s", url, video);
if((fd = fa_scandir(url, errbuf, sizeof(errbuf)))  NULL) {
TRACE(TRACE_DEBUG, "Video", "Unable to scan %s for subtitles: %s",
url, errbuf);
return;
}

It seems an empty url is passed into the method.

#11 Updated by Leonid Protasov almost 7 years ago

if((fd = fa_scandir(url, errbuf, sizeof(errbuf))) == NULL) {
    TRACE(TRACE_DEBUG, "Video", "Unable to scan %s for subtitles: %s",
          url, errbuf);
    return;
  }

Doesn't do it's job.

And whichever function calls fs_sub_scan_dir - passes wrong pointer to url.

#12 Updated by Rural Hunter almost 7 years ago

hmm...one finding in Bug #1848:
The bad playback log:
00:01:28.142: Video [DEBUG]:Starting playback of file:///dev_usb000/Video/Man.of.Steel.2013.720p.BluRay.x264.DTS-WiKi.mkv (matroska,webm)
00:01:28.142: Probe [DEBUG]: Stream #0: Video: h264 (High), yuv420p, 1280x534 [PAR 1:1 DAR 640:267]
00:01:28.143: Probe [DEBUG]: Stream #1: Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
00:01:28.148: Subscanner [DEBUG]:Starting subtitle scan for Man of Steel (imdbid:tt0770828) year:0 season:-1 episode:-1 duration:8583 opensubhash:5abf8bda1c0583a7

Good playback log:
00:00:17.162: Probe [DEBUG]: Stream #0: Video: h264 (High), yuv420p, 1280x534 [PAR 1:1 DAR 640:267]
00:00:17.162: Probe [DEBUG]: Stream #1: Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
00:00:17.169: Subscanner [DEBUG]:Starting subtitle scan for 瓒呬汉锛氶挗閾佷箣韬¯ (imdbid:tt0770828) year:0 season:-1 episode:-1 duration:8583 opensubhash:5abf8bda1c0583a7
00:00:17.171: THREADS [DEBUG]:Created thread subscanner (0x18200f4)

Note the log is for the same file and seems Subscanner is looking for different names(One in Chinese and one in English) in different version. Could that be related to this sub scanner issue?

#13 Updated by Leonid Protasov almost 7 years ago

Looks like some pointer or memory corruption :(

#14 Updated by Andreas Smas almost 7 years ago

  • Status changed from Need feedback to Accepted

Actually. I think the problem only happens if the file is in the root directory.

I'll fix this

#15 Updated by Rural Hunter almost 7 years ago

ah yes my file is in root dir.

#16 Updated by Andreas Smas almost 7 years ago

  • Status changed from Accepted to Fixed
  • % Done changed from 0 to 100

Applied in changeset git|commit:17ad38600651bfd698f57e8bd4d684fb86b83e18.

Also available in: Atom PDF