Opened 6 years ago

Last modified 4 weeks ago

#3075 new defect

TS and M2TS breaks with subtitle files

Reported by: VLC_help Owned by:
Priority: normal Milestone: Bugs paradize
Component: Subtitles Version: master git
Severity: normal Keywords:
Cc: Difficulty: unknown
Platform(s): all Work status: Not started

Description

As reported in: http://forum.videolan.org/viewtopic.php?f=14&t=65172

VLC cannot handle the situation where there is something.m2ts file and something.srt (or .txt) text file in same folder. When something.m2ts is opened VLC cannot proceed, it only prints some stuff to message log. If the text file is removed from the folder, the playback starts normally.

Sample video http://av.watch.impress.co.jp/docs/20060809/ezlp1.m2ts

Sample subtitle http://koti.mbnet.fi/raiska/vlc_samples/ezlp1.srt

Message log when both files are in same folder

main debug: adding item `ezlp1.m2ts' ( C:\ezlp1.m2ts )
qt4 debug: Adding a new MRL to recent ones: C:\ezlp1.m2ts
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 11 items, index 9
main debug: processing request item ezlp1.m2ts node Playlist skip 0
main debug: resyncing on ezlp1.m2ts
main debug: ezlp1.m2ts is at 10
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'ezlp1.m2ts'
main debug: thread (input) created at priority 1 (../.././src/input/input.c:230)
main debug: thread started
main debug: using timeshift granularity of 50 MBytes
main debug: using timeshift path 'C:\Temp'
main debug: `C:\ezlp1.m2ts' gives access `' demux `' path `C:\ezlp1.m2ts'
main debug: creating demux: access='' demux='' path='C:\ezlp1.m2ts'
main debug: looking for access_demux module: 3 candidates
main debug: TIMER module_need() : 1.070 ms - Total 1.070 ms / 1 intvls (Avg 1.070 ms)
main debug: creating access '' path='C:\ezlp1.m2ts'
main debug: looking for access module: 5 candidates
vcd debug: trying .cue file: C:\ezlp1.cue
vcd debug: could not find .cue file
access_file debug: opening file `C:\ezlp1.m2ts'
main debug: using access module "access_file"
main debug: TIMER module_need() : 2.035 ms - Total 2.035 ms / 1 intvls (Avg 2.035 ms)
main debug: Using AStream*Stream
main debug: pre buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 9174 kbytes/s
main debug: looking for stream_filter module: 2 candidates
main debug: TIMER module_need() : 0.413 ms - Total 0.413 ms / 1 intvls (Avg 0.413 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.435 ms - Total 0.435 ms / 1 intvls (Avg 0.435 ms)
main debug: creating demux: access='' demux='' path='C:\ezlp1.m2ts'
main debug: looking for demux module: 50 candidates
main debug: using demux module "ts"
main debug: TIMER module_need() : 3.657 ms - Total 3.657 ms / 1 intvls (Avg 3.657 ms)
main debug: looking for a subtitle file in C:\
main debug: autodetected subtitle: C:\ezlp1.srt with priority 4
main debug: `C:\ezlp1.srt' gives access `' demux `' path `C:\ezlp1.srt'
main debug: creating demux: access='' demux='subtitle' path='C:\ezlp1.srt'
main debug: looking for access_demux module: 3 candidates
main debug: TIMER module_need() : 1.023 ms - Total 1.023 ms / 1 intvls (Avg 1.023 ms)
main debug: creating access '' path='C:\ezlp1.srt'
main debug: looking for access module: 5 candidates
vcd debug: trying .cue file: C:\ezlp1.cue
vcd debug: could not find .cue file
access_file debug: opening file `C:\ezlp1.srt'
main debug: using access module "access_file"
main debug: TIMER module_need() : 2.546 ms - Total 2.546 ms / 1 intvls (Avg 2.546 ms)
main debug: Using AStream*Stream
main debug: pre buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 4310 kbytes/s
main debug: looking for stream_filter module: 2 candidates
main debug: TIMER module_need() : 0.637 ms - Total 0.637 ms / 1 intvls (Avg 0.637 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.464 ms - Total 0.464 ms / 1 intvls (Avg 0.464 ms)
main debug: creating demux: access='' demux='subtitle' path='C:\ezlp1.srt'
main debug: looking for demux module: 3 candidates
vobsub debug: this doesn't seem to be a vobsub file
main error: option sub-original-fps does not exist
subtitle debug: Movie fps: -1.000000
subtitle debug: autodetecting subtitle format
subtitle debug: detected SubRIP format
subtitle debug: loading all subtitles...
subtitle debug: loaded 52 subtitles
main debug: selecting program id=0
main debug: using demux module "subtitle"
main debug: TIMER module_need() : 5.182 ms - Total 5.182 ms / 1 intvls (Avg 5.182 ms)
main debug: looking for decoder module: 36 candidates
avcodec debug: libavcodec already initialized
avcodec debug: codec not found (Plain text subtitles)
subsdec debug: trying configured character encoding: not specified
subsdec debug: trying default character encoding: CP1252
subsdec debug: using automatic UTF-8 detection
main debug: using decoder module "subsdec"
main debug: TIMER module_need() : 2.125 ms - Total 2.125 ms / 1 intvls (Avg 2.125 ms)
main debug: thread (decoder) created at priority 0 (../.././src/input/decoder.c:315)
main debug: thread started
ts debug: DEMUX_SET_GROUP 0 0
main debug: `C:\ezlp1.m2ts' successfully opened
ts warning: lost synchro
ts debug: skipping 4 bytes of garbage
ts debug: pid[256] unknown
ts debug: pid[31] unknown
ts debug: pid[4097] unknown
ts debug: pid[4113] unknown
ts debug: pid[4352] unknown
ts debug: pid[4608] unknown
ts debug: PATCallBack called
ts debug: new PAT ts_id=0 version=0 current_next=1
ts debug:   * number=0 pid=31
ts debug:   * number=1 pid=256
ts debug: PMTCallBack called
ts debug: new PMT program number=1 version=0 pid_pcr=4097
ts debug:  * descriptor : registration HDMV
ts debug:  * descriptor : unknown (0x88)
ts debug:   * es pid=4113 type=27 dr->i_tag=0x5
ts debug:   * es pid=4113 type=27 fcc=h264
ts debug:   * es pid=4352 type=129 dr->i_tag=0x5
ts debug:   * es pid=4352 type=129 dr->i_tag=0x81
ts debug:   * es pid=4352 type=129 fcc=a52 
ts debug:   * es pid=4608 type=144 *unknown*
ts warning: first packet for pid=4113 cc=0xf
ts warning: first packet for pid=4352 cc=0x2
main debug: slave 0 EOF
ts warning: first packet for pid=4608 cc=0x7
ts debug: eof ?
main debug: EOF reached
main debug: finished input
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main warning: no vout found, dropping subpicture
main warning: can't get output subpicture
subsdec warning: can't get spu buffer
main debug: thread times: real 0m0.187500s, kernel 0m0.015625s, user 0m0.000000s
main debug: removing module "subsdec"
main debug: killing decoder fourcc `subt', 0 PES in FIFO
ts debug: pid list:
ts debug:   - pid[0] seen
ts debug:   - pid[31] seen
ts debug:   - pid[256] seen
ts debug:   - pid[4097] seen
ts debug:   - pid[4113] seen
main debug: Program doesn't contain anymore ES
ts debug:   - pid[4352] seen
ts debug:   - pid[4608] seen
ts debug:   - pid[8191] seen
main debug: removing module "ts"
main debug: removing module "stream_filter_record"
main debug: removing module "access_file"
main debug: removing module "subtitle"
main debug: removing module "stream_filter_record"
main debug: removing module "access_file"
main debug: Program doesn't contain anymore ES
main debug: thread ended
main debug: dead input
main debug: thread times: real 0m0.218750s, kernel 0m0.109375s, user 0m0.093750s
main debug: TIMER input launching for 'ezlp1.m2ts' : 49.593 ms - Total 49.593 ms / 1 intvls (Avg 49.593 ms)
main debug: changing item without a request (current 10/11)
main debug: nothing to play

Attachments (4)

PS-TS Streams w Subs.zip (13.1 KB) - added by jhb50 5 years ago.
TS with srt subs present sub detect off.log (10.9 KB) - added by jhb50 5 years ago.
TS with subs simple play.log (9.0 KB) - added by jhb50 5 years ago.
TS with no subs simple play.log (23.4 KB) - added by jhb50 5 years ago.

Download all attachments as: .zip

Change History (35)

comment:1 Changed 6 years ago by courmisch

  • Component changed from I don't know to Subtitles
  • Owner changed from courmisch to jb

comment:2 Changed 6 years ago by jb

  • Difficulty set to unknown
  • Owner changed from jb to fenrir
  • Platform(s) set to all
  • Work status set to Not started

No idea why this happens

comment:3 Changed 5 years ago by jhb50

  • Priority changed from normal to highest

This is the same as bug 3516. The two should be combined.

If a subtitle file is present and autoloading is not disabled a .ts file will not play. This is a critical problem for hearing impaired users who have captured HDTV.ts files from over-the-air ATSC transmissions and have converted the closed captions to subtitles, and now cannot play or transcode or stream those files with the required subtitles. There is no possible workaround for this. Given that it should be given the highest priority.

See http://forum.videolan.org/viewtopic.php?f=14&t=76852&start=0 as an example of where this fix is required.

comment:4 Changed 5 years ago by jb

  • Milestone changed from Bugs paradize to 1.1.0-release
  • Resolution set to fixed
  • Status changed from new to closed

FIxed in 1.1

comment:5 Changed 5 years ago by jb

Better fixed in 1.1.1

comment:6 Changed 5 years ago by jhb50

  • Resolution fixed deleted
  • Status changed from closed to reopened

jb,please reopen this ticket because this problem has not been fixed.

I have tested under both 1.1 and vlc-1.2.0-git-20100703-1559 and when a .srt file is present a .ts file will not play. The .srt must be removed or the --no-sub-autodetect-file option must be specified in order for the video to play and then there is no way to get subtitles to display.

I can provide test files and extensive info on this problem, but no one has contacted me for additional info, yet it was closed.. How come?

Changed 5 years ago by jhb50

comment:7 Changed 5 years ago by jhb50

Attached are 6 logs, 5 in the zip and one separate.

With both of these the video does not display. The video should display in both and with subs in the first. TS with srt subs present sub detect on.log TS with srt subs present sub detect off.log

With both of these the video does display as it should. TS with no srt subs present sub detect on.log TS with no srt subs present sub detect off.log Note this last log contains http references but the previous 3 logs refered only to the files.

Conclusion: the presence of the .srt sub file prevents the video from displaying.

These are included for comparison. Video lays in both and displays subs in the first. PS with srt subs present subdetect on.log PS with no srt subs present sub detect on.log

comment:8 Changed 5 years ago by jhb50

Please ignore the previous post. It's late and I got it all mixed up. Here is the correct version.

Attached are 6 logs, 5 in the zip and 2 separate.

When there are no subs present, or when sub detect is turned off the video plays correctly as shown in the 3 logs, "TS with no srt subs present sub detect off.log",

"TS with no srt subs present sub detect on.log", and "TS with srt subs present sub detect off.log"

When there are subs present and sub detect is on, the video should play with subs but it does not play at all. "TS with srt subs present sub detect on.log"

Two PS logs are also included for comparison. "PS with srt subs present subdetect on.log", and "PS with no srt subs present sub detect on.log" Both play coorectly including Subtitles with the first.

Note that these logs are all with Transcoding to mp2/ac3 and streaming, however the same problem exists when just attempting to play a TS with subtitles. The video does not play. See "TS with subs simple play.log"

Also note that in all cases the timer in the VLC window does not run when playing or streaming .ts files.

Changed 5 years ago by jhb50

Changed 5 years ago by jhb50

comment:9 Changed 5 years ago by jhb50

After looking at the simple play log, I thought it woul be useful to also provide the simple play log when no subs exist which did play successfully. "TS with no subs simple play.log"

comment:10 Changed 5 years ago by jb

  • Milestone changed from 1.1.0-release to 1.1.x maintenance

comment:11 Changed 5 years ago by courmisch

  • Milestone changed from 1.1.x maintenance to Features paradize
  • Priority changed from highest to normal
  • Summary changed from Subtitle autoloading kills M2TS playback to TS and M2TS breaks with subtitle files

This feature has never been implemented. If you want to see this done in 1.1.x you better post a patch first.

comment:12 Changed 5 years ago by jhb50

How can this be classified as a feature? It reports a failure of .ts files to play if a .srt file is present. It would be silly to request a feature "play .ts files if an .srt file is present". It also does not make sense to request a feature "display subtitles with .ts files" since subtitle display is a "universally" available feature which if it is broken with one file type should also be considered a bug.

As I have also reported, using the same elementary streams but packaging them as .mpg Program Streams plays the subs correctly, and the logs show that a .ts file opens both the video and subtitle files correctly but then fails, which shows this bug is past the .ts demuxer and somewhere downstream, so a feature patch would not address the bug fix.

Please someone look at this more closely and reclassify as a bug.

comment:13 Changed 5 years ago by jhb50

I reported in the following post that remuxing the streams to .mpg would allow the subtitles to display, and the logs also showed that as a .ts both the video and subtitle files opened but then the failure occurred downstream. http://forum.videolan.org/viewtopic.php?f=14&t=80993

Using the 8/25 nightly build however shows that the .mpg file now exhibits the same problem as the .ts file, namely it will not play if a subtitle file is present!

Surely this points the problem in another direction and hopefully both .ts and .mpg will be fixed to allow subtitles to be played.

comment:14 Changed 5 years ago by jhb50

This remains broken and with 1.1.4 and the 10/25/10 nightly .ts files will not play or stream PERIOD with or without subtitles present!

comment:15 Changed 5 years ago by jhb50

Correction: if auto-detect subs is turned off then the files will play without subs, but if subs detected or loaded the ts file playback will fail to start or terminate if playing. All other players play these .ts files correctly with subtitles displayed.

comment:16 Changed 5 years ago by rumpumpel1

for me this is a very annoying bug. I'm adding subtitles to many m2ts files. Normally I can check and correct the timing as long as the subtitles are in an extra file and finally mux them into one file. Because of this bug, I have to mux them first and then see how to correct the timing. A very cumbersome procedure. So when does this but gets fixed ?

comment:17 follow-up: Changed 4 years ago by shoober420

This problem hasnt been fixed in 2 years. Maybe even longer. Whats the hold up? Is it really that difficult to fix?

comment:18 in reply to: ↑ 17 ; follow-up: Changed 4 years ago by VLC_help

Replying to shoober420:

This problem hasnt been fixed in 2 years. Maybe even longer. Whats the hold up? Is it really that difficult to fix?

This is a volunteer project. So if nobody does a patch that fixes this, then the issue won't be fixed. Issue itself might be related to TS/M2TS timecode parsing, so --demux ffmpeg might work.

comment:19 Changed 4 years ago by jb

  • Milestone changed from Features paradize to 1.2 feature freeze
  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in 1.2 with TS timing.

comment:20 Changed 3 years ago by fenrir

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sadly the issue is still there. It mostly comes from the fact that TS support multiple program and that's not taking properly into account when subtitles are loaded.

comment:21 Changed 3 years ago by fenrir

  • Status changed from reopened to new

comment:22 Changed 3 years ago by jb

  • Milestone changed from 2.0 feature freeze to Bugs paradize

comment:23 in reply to: ↑ 18 Changed 3 years ago by https://www.google.com/accounts/o8/id?id=aitoawkfbtm9cuio7bmkuwqa_sc02fowt65gvs4

Replying to VLC_help:

Issue itself might be related to TS/M2TS timecode parsing, so --demux ffmpeg might work.

That did solve the problem for me.

For what it's worth, this problem is causing a crash on OS X when choosing "Subtitles track > Open file…" while a video is playing (meaning the text file was not in the same directory, or similarly named, to start out).

comment:24 Changed 3 years ago by edwardw

comment:25 follow-up: Changed 3 years ago by jhw549

Issue still occurring in 2.0.5 x64. --demux ffmpeg works as a stopgap solution.

comment:26 in reply to: ↑ 25 Changed 2 years ago by valentijn scholten

Replying to jhw549:

Issue still occurring in 2.0.5 x64. --demux ffmpeg works as a stopgap solution.

Confirmed here as well, Windows 7.

Replying to https://www.google.com/accounts/o8/id?id=aitoawkfbtm9cuio7bmkuwqa_sc02fowt65gvs4:

Issue itself might be related to TS/M2TS timecode parsing, so --demux ffmpeg might work.

That did solve the problem for me.

Solved it for me too.

For what it's worth, this problem is causing a crash on OS X when choosing "Subtitles track > Open file…" while a video is playing (meaning the text file was not in the same directory, or similarly named, to start out).

On Windows 7 x64 something similar happens. When you select the subtitle file, the video stops playing. You do see however the timebar progressing till the end of the video at about x3 speed.

Please note that the TS file itself had (multiple) subtitle tracks in it.

The files are too big to upload here---> https://dl.dropbox.com/u/108261155/DVB2.zip

Last edited 2 years ago by valentijn scholten (previous) (diff)

comment:27 Changed 19 months ago by jb

See #4006

comment:28 Changed 11 months ago by Dj_Fex

This issue still exists. Has fenrir already started working on it?

It would be amazing if I didn't need to remux my recordings from TS to MKV to play the subtitles...

comment:29 Changed 11 months ago by courmisch

  • Owner fenrir deleted

No, patch welcome.

comment:30 in reply to: ↑ description Changed 4 weeks ago by dl2rcf

Hello dear VLC guys, is there any patch for the issue?

I know, one can walkaround by starting VLC with the flags "--demux ffmpeg", but a solution would be of interest to me, so one can start the files again by just double clicking the video file.

Maybe a good trigger to start programming C++ :-) for myself lol.

Last edited 4 weeks ago by dl2rcf (previous) (diff)

comment:31 Changed 4 weeks ago by Dj_Fex

as said above by fenrir -> no one started working on it

so you are welcome providing a patch for this :) , I guess

I would like to see this fixed as well because it's annoying

especially since not only subtitles but other text files with the movies filename can prevent VLC from playing the movie :/

Note: See TracTickets for help on using tickets.