Project

General

Profile

Actions

Bug #865

closed

Wrong subtitle page set

Added by Anonymous over 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
01/27/2012
Due date:
% Done:

100%

Estimated time:

Description

I have problem with e-tobi repository ttxtsubs 0.2.4 and VDR 1.7.22. It seems the page number is shifted by 8 bits. The log shows: "Found subtitle page:088", even the correct page is 888. Everything works fine, if I disable the "update channels PIDs" and enter manually the page number 888 in the channels.conf:

TF1;CSAT:11895:VC34M2O0S0:S19.2E:27500:171=2:124=fra@4,125=eng@4,126=deu@4:53+888=fra:0:8366:1:1074:0

But if I enable the update channels PIDs, the autoupdate finds page 088, the subtitles stop working and the channels.conf looks like this:

TF1;CSAT:11895:VC34M2O0S0:S19.2E:27500:171=2:124=fra@4,125=eng@4,126=deu@4:53+88=fra:0:8366:1:1074:0

I looked at the source and the file ttxtsubsdisplayer.c and the wrong value seems to be assigned here:

int bcdPage = (teletextSubtitlePages[p].ttxtMagazine << 8) + teletextSubtitlePages[p].ttxtPage;

but I did not yet have time to look further...

Also setting the page manually through OSD does not help, even if manual mode is enabled and page number 888 entered on the field


Files

ttxtsubs-French-fix.patch (2.1 KB) ttxtsubs-French-fix.patch JTe, 04/02/2012 10:49 AM
Actions #1

Updated by JTe about 12 years ago

I quickly checked the code and I guess the problem is in patch-set.1.7.21 in 0001-Record-teletext-subtitles.patch:

64 + tTeletextSubtitlePage(int page) { ttxtMagazine = (page / 100) & 0x7; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; strcpy(ttxtLanguage, "und"); }

should probably be:

64 + tTeletextSubtitlePage(int page) { ttxtMagazine = ((page / 100 - 1) & 0x7) + 1; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; strcpy(ttxtLanguage, "und"); }

As the teletext definition tells:

"Teletext allows up to eight 'magazines' to be broadcast, identified by the first digit of the three-digit page number (1-8)."

And the code here seems to ignore magazine 8 which is used by French TV channels. I had to still test that and check the code if there is similar limitations elsewhere.

Actions #2

Updated by JTe about 12 years ago

Ok, I had some time to look at the code. The Magazine number is stored in three (3) bit field, which means magazine 8 is represented as 0. When the subtitle teletext page number is written to channels.conf no conversion is made in magazine number, so magazine 8 is written as 0, and that causes the page number to be 88 instead of 888.

I will try to make a patch set for that.

Actions #3

Updated by JTe about 12 years ago

I had finally some time to look at this, and here is a work-a-round to get the French subtitles to show on TV stations that are still broadcasting the wrong subtitle page (for example 059 instead of 089).

1) Stop your vdr (eg /etc/init.d/vdr stop)
2) edit the channels.conf file by adding the subtitle page "und" (Manual/Undefined) to channels that have the French subtitle problem, eg change:

TF1;TNT:11934:VC34M2O0S0:S19.2E:27500:168=2:112=fra@4,113=deu@4,114=eng@4,115=qad@3:59:0:8159:1:1076:0

by adding +89=und (that is for page 089 = 889) to:

TF1;TNT:11934:VC34M2O0S0:S19.2E:27500:168=2:112=fra@4,113=deu@4,114=eng@4,115=qad@3:59+89=und:0:8159:1:1076:0

3) Start you vdr (eg /etc/init.d/vdr start)
4) Go to OSD menu Setup->Plugins->ttxtsubs and add as a Language 1 (the first language): Undef/Manual. Also add Hearing Impaired: yes. Put all the real languages you will be using for other channels after that.

Now you should have the teletext subtitles showing on you French channels that are not sending correctly the subtitle page.

Actions #4

Updated by JTe about 12 years ago

Here is a small patch to fix the problem with the French channels.

Before there was an option to select a fix for the French subtitles, but after looking through the ETSI documentation I found out that the pages 850-859 are not used (at least officially) for subtitles in any country, so after this patch the ttxtsubs will always reallocate those buggy French ttxtpages from 850-859 region to 880-889 where they are really belonging to.

At the same time I changed the subtitles left justified for better readability.

Actions #5

Updated by etobi about 12 years ago

  • Assignee set to etobi

Thanks for figuring this out!

It's annoying that the broadcaster still hasn't fixed this. But it's probably safe to assume that pages 850-859 are not used by anyone else for subtitles. At least I couldn't find any.

Actions #6

Updated by etobi about 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by etobi about 12 years ago

Can you please test the current version from the Git-Repository?

Please test the live-viewing as well as replaying of teletext subtitles works with those buggy channels.

Actions #8

Updated by JTe almost 12 years ago

Yes it works fine!
I did finally add also the menu support selection for the french subtitles, please see Feature #957

Actions

Also available in: Atom PDF