Opened 15 years ago

Closed 15 years ago

#259 closed defect (fixed)

DVB subtitles don't work after a channel change

Reported by: John Pullan <john.pullan@…> Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


DVB subtitles work until you change channel. So, enabling subtitles on BBC1, then changing to BBC2 will cause them to stop working. BBC2 is on a different mux to BBC1 but I'm not sure if that's important or not. Exiting and reentering live tv mode fixes the issue.

Attachments (1)

259-v1.patch (10.0 KB) - added by danielk 15 years ago.
Possible fix

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by Ian Caulfield

If you go to the subtitle track list on the OSD menu, can you select a track that does work? (ie is the old track being left on the list, and the new track being added, instead of replacing the old one?)

comment:2 Changed 15 years ago by John Pullan <john.pullan@…>

I did the following :

Change channel to break the subtitles. Hit T to switch them off, and again to switch them back on. (still broken) Use the OSD menu to change to None (only two options none, English) Then change back to English, subtitles now work.

Hope this helps.

comment:3 Changed 15 years ago by anonymous

Milestone: 0.19

comment:4 Changed 15 years ago by danielk

(In [7509]) References #259. Resets currentSubtitleTrack on stream changes.

I don't know if this fixes the problem, but it should at least trigger autoSelectSubtitleTrack()...

comment:5 Changed 15 years ago by imc25 at

Does this function get called every time a new stream is detected, or just on channel change events? I remember not sticking a reset in somewhere (can't remember if it was there or not), because sometimes subtitle streams can start at different points, and having your track reset itself can be very annoying (this is mostly the case for DVDs).

comment:6 Changed 15 years ago by danielk

It get's called whenever the PMT for the current program changes.

You should probably save some kind of context for the subtitle stream, so you can resume a subtitle stream after a commercial in the UK (where they change the PMT often). Without this reset the streams still will be reset whenever the subtitles go away for a couple minutes due to commercials... If you remember what the user explicitly selected last and then you can try to resume that stream whenever possible. Do if they picked the second english subtitle, go back that when it exists, and use the autoselected stream otherwise.

comment:7 Changed 15 years ago by John Pullan <john.pullan@…>

It's possibly improving. I still lose sub-title (less frequently?) but they can be restored by hitting 'T' twice which is something that didn't work before.

comment:8 Changed 15 years ago by danielk

Milestone: 0.190.20
Owner: changed from Isaac Richards to danielk
Version: head

comment:9 Changed 15 years ago by danielk

(In [8096]) References #259. "subtitles don't work after a channel change"

  • adds a method to iso639 that lets you get a list of the canonical language keys of the preferred languages rather than their QString representations.
  • adds a method to convert the canonical key to a human readable lanugage name.
  • renames iso639_toName to iso639_str_toName to differentiate it from the canonical key toName function.

Just a little cleanup prior to the fix for #259.

Changed 15 years ago by danielk

Attachment: 259-v1.patch added

Possible fix

comment:10 Changed 15 years ago by John Pullan <john.pullan@…>

The patch didn't help. I failed to get any subtitles with it applied. Having said that it didn't apply cleanly. (revision 8145)

comment:11 Changed 15 years ago by danielk

(In [8152]) Fixes some audio initialization problems + audio/subtitle selection References #259.

For the audio initialization problem, the problem was that the audio was only getting reinitialized if the number of channels or sample_rate before decoding was changed, but this doesn't work properly in the presence of AC3 since the number of channels output depends on the number of channels encoded and is not reported until you begin decoding A/V packets. The number of channels were also not detected properly with codecs like AC3 either because of the late channel/rate reporting.

There still seems to be a clicking problem with channels > 2, at least when using ALSA out, so I kept the 2 channel restriction for AC3 streams, but it is now a documented define, MAX_OUTPUT_CHANNELS, which can be set to a larger number or zero (to use the same number of channels as the encoding.) The number of mp3 channels was not restricted before, and I haven't added any restriction; if you have a problem let me know, these could be easily left out of auto-selection at least.

For the auto audio/subtitle stream selection, this adds a language preference for audio, and saves the last user selected audio/subtitle so MythTV should resume a manually selected stream after a commercial break, and try to find a stream in the same language on channel changes. The channel change feature will only work on properly on streams that have a language descriptor, but the resumption after a commercial break should work even in the absence of descriptors.

If you have problems with the DVB subtitle parts of this please attach a 'mythfrontend -v playback' log to the #259 ticket.

comment:12 Changed 15 years ago by danielk

Resolution: fixed
Status: newclosed

I haven't heard any reports that the DVB subtitle part of this doesn't work in 5 days, so I'm closing this ticket.

Note: See TracTickets for help on using tickets.