2012-10-24, 00:53
(2012-10-23, 16:54)jdembski Wrote:Well i have nothing there maybe it works for DVB subtitles but not for Teletext subtitles.(2012-10-23, 12:43)Leatherface Wrote:(2012-10-22, 23:25)Memphiz Wrote: Because of teletext subtitles is so damn oldschool that there is not much demand. What prevents you from using the subtitle addon instead and get real subtitles on demand? Or doesn't your htpc have any internet connection?Because many channels in sweden for example use Teletext subtitles and addons lika Vu+/Enigma2 doesn't have Teletext subtitle support so i have to use Teletext plugin and manually go to subtitle page.
Sorry Leatherface, but why do you keep stating that there is no Teletext support in VU+ / Enigma2?
If I activate subtitles in the audio preferences then I got subtitles - but I never checked whether they are in sync. Actually I'm not aware of any teletext-related functions in the PVR-API, so I don't know what to do here. The addon just provides the stream URL to XBMC.
Maybe this would be fixed if the addon would provide the raw MPEG-TS stream like the mediaportal / fortherecord addon. Unfortunately I still do not fully understand how I could do this. Too bad that the PVR-Demo-Addon didn't have that functionality when I first started programming the addon
@dushmaniac: Isn't that a generic use case (providing the raw MPEG-TS stream through either a file or an network stream)? - i.e. isn't it possible to encapsulate that in a helper class that can be shared amongst all the addons? That way people with very limited coding skills (like me) could make use of it + less there would be less code duplication.
And yes there is support for Teletext because tvheadend (HTS PVR addon) have Teletext subtitles and worked for me atleast in Eden.
Part of HTSPDemux.cpp file in HTS
else if(!strcmp(type, "DVBSUB"))
{
uint32_t composition_id = 0, ancillary_id = 0;
htsmsg_get_u32(sub, "composition_id", &composition_id);
htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_DVB_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iIdentifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
HTSPSetDemuxStreamInfoLanguage(m_Streams.stream[m_Streams.iStreamCount], sub);
}
else if(!strcmp(type, "TEXTSUB"))
{
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_TEXT;
HTSPSetDemuxStreamInfoLanguage(m_Streams.stream[m_Streams.iStreamCount], sub);
}
else if(!strcmp(type, "TELETEXT"))
{
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_DVB_TELETEXT;
}
Part of VNSIDemux.cpp file for VDR PVR addon
else if(!strcmp(type, "DVBSUB"))
{
const char *language = resp->extract_String();
uint32_t composition_id = resp->extract_U32();
uint32_t ancillary_id = resp->extract_U32();
m_Streams.stream[m_Streams.iStreamCount].iStreamIndex = m_Streams.iStreamCount;
m_Streams.stream[m_Streams.iStreamCount].iPhysicalId = index;
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_DVB_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[0]= language[0];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[1]= language[1];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[2]= language[2];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[3]= 0;
m_Streams.stream[m_Streams.iStreamCount].iIdentifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
m_Streams.iStreamCount++;
delete[] language;
}
else if(!strcmp(type, "TEXTSUB"))
{
const char *language = resp->extract_String();
m_Streams.stream[m_Streams.iStreamCount].iStreamIndex = m_Streams.iStreamCount;
m_Streams.stream[m_Streams.iStreamCount].iPhysicalId = index;
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_TEXT;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[0]= language[0];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[1]= language[1];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[2]= language[2];
m_Streams.stream[m_Streams.iStreamCount].strLanguage[3]= 0;
m_Streams.stream[m_Streams.iStreamCount].iIdentifier = -1;
m_Streams.iStreamCount++;
delete[] language;
}
else if(!strcmp(type, "TELETEXT"))
{
m_Streams.stream[m_Streams.iStreamCount].iStreamIndex = m_Streams.iStreamCount;
m_Streams.stream[m_Streams.iStreamCount].iPhysicalId = index;
m_Streams.stream[m_Streams.iStreamCount].iCodecType = AVMEDIA_TYPE_SUBTITLE;
m_Streams.stream[m_Streams.iStreamCount].iCodecId = CODEC_ID_DVB_TELETEXT;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[0]= 0;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[1]= 0;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[2]= 0;
m_Streams.stream[m_Streams.iStreamCount].strLanguage[3]= 0;
m_Streams.stream[m_Streams.iStreamCount].iIdentifier = -1;
m_Streams.iStreamCount++;
}
So yes support for Teletext is there but all PVR addons needs support for it.
But not sure if teletext was synced there or not have to check that some day.
You can check ffmpeg (libavcodec/libavformat) sources also it's there you can find the support for Teletext.
It's not the streams fault either because exactly same stream gives me working Teletext subtitles with VLC for example without manually go to that page.