Identification of Subtitle tracks with stalker middleware

2,553 views
Skip to first unread message

Oscar Kratz

unread,
Feb 4, 2013, 9:43:29 AM2/4/13
to stalker-m...@googlegroups.com
Hi!

I cant get MAG-250 with stalker middleware to find any subtitle tracks?
Different audio tracks work just fine.
In the menu when i press mode or app on the remote, it just says that subtitles are off.

Obviously, it should work as the function exists.
As far as I know, most channels send the subtitle tracks in the same PID as teletext, as a page in teletext.
Is there any way to manually force stalker middleware to look in a specific pid for subtitles?
I have tried udp://x.x.x.x:x strack:PID , but it does not work, as the text track itself isnt a pid, but just a part of one.
atrack:PID works fine to specify default audio track.

All help and hints on how to make it work is MUCH appreciated.
Thanks in advance!

Aleksey Zhurbitsky

unread,
Feb 4, 2013, 9:48:44 AM2/4/13
to stalker-m...@googlegroups.com
Please try to run the portal in debug mode and show us output when the channel starts playing.

You can do this over SSH:
killall stbapp
/usr/share/qt-4.6.0/stbapp -qws -display directfb http://.../stalker_portal/c/?debug

Oscar Kratz

unread,
Feb 4, 2013, 10:26:53 AM2/4/13
to stalker-m...@googlegroups.com
Hi, and thanks for the quick response!

Here comes the output from where I think the player starts:

DEBUG:: 1368s 439ms  player.play ({id:4, name:C MORE HITS, number:3, censored:0, cmd:udp://233.0.0.34:6010 atrack:684, descr:, cost:0, count:0, status:1, tv_genre_id:2, base_ch:0, hd:0, xmltv_id:, service_id:, bonus_ch:0, volume_correction:0, use_http_tmp_link:0, mc_cmd:1, enable_tv_archive:0, wowza_tmp_link:0, wowza_dvr:0, monitoring_status:1, monitoring_status_updated: null, enable_monitoring:0, monitoring_url:, enable_wowza_load_balancing:0, cmd_1:, cmd_2:, cmd_3:, logo:, correct_time:0, allow_pvr:, allow_local_pvr:1, lock:0, fav:0, archive:0, genres_str:, cur_playing:[No channel info], epg:[], open:1, cmds:[{id:42, ch_id:4, priority:0, url:udp://233.0.0.34:6010 atrack:684, status:1, use_http_tmp_link:0, wowza_tmp_link:0, user_agent_filter:, use_load_balancing:0, changed:2013-02-04 14:56:14, enable_monitoring:0}]], use_load_balancing:0})
DEBUG:: 1368s 441ms  cmd udp://233.0.0.34:6010 atrack:684
DEBUG:: 1368s 448ms  playback_limit.start_counting
DEBUG:: 1368s 450ms  stb.user[playback_limit] 0
DEBUG:: 1368s 452ms  playback_limit not set
DEBUG:: 1368s 454ms  item.position undefined
DEBUG:: 1368s 456ms  this.emulate_media_len false
DEBUG:: 1368s 458ms  cmd:  udp://233.0.0.34:6010 atrack:684
DEBUG:: 1368s 464ms  player.define_media_type udp://233.0.0.34:6010 atrack:684
DEBUG:: 1368s 466ms  stb.cur_place tv
DEBUG:: 1368s 477ms  player.proto udp
DEBUG:: 1368s 479ms  player.media_type:  stream
DEBUG:: 1368s 481ms  player.file_type:  undefined
DEBUG:: 1368s 483ms  player.is_tv:  true
DEBUG:: 1368s 488ms  player.on_play 4
DEBUG:: 1368s 493ms  player.hide_rec_icon
DEBUG:: 1368s 498ms  stb.setFrontPanel 3 undefined
DEBUG:: 1368s 562ms  player.play_now udp://233.0.0.34:6010 atrack:684
DEBUG:: 1368s 564ms  stb.player.media_type stream
DEBUG:: 1368s 565ms  stb.cur_place tv
DEBUG:: 1368s 567ms  stb.load()
DEBUG:: 1368s 568ms  params: ({type:stb, action:log, real_action:play, param:udp%3A%2F%2F233.0.0.34%3A6010%20atrack%3A684, tmp_type:1})
DEBUG:: 1368s 586ms  show_info
DEBUG:: 1368s 593ms  item ({id:4, name:C MORE HITS, number:3, censored:0, cmd:udp://233.0.0.34:6010 atrack:684, descr:, cost:0, count:0, status:1, tv_genre_id:2, base_ch:0, hd:0, xmltv_id:, service_id:, bonus_ch:0, volume_correction:0, use_http_tmp_link:0, mc_cmd:1, enable_tv_archive:0, wowza_tmp_link:0, wowza_dvr:0, monitoring_status:1, monitoring_status_updated: null, enable_monitoring:0, monitoring_url:, enable_wowza_load_balancing:0, cmd_1:, cmd_2:, cmd_3:, logo:, correct_time:0, allow_pvr:, allow_local_pvr:1, lock:0, fav:0, archive:0, genres_str:, cur_playing:[No channel info], epg:[], open:1, cmds:[{id:42, ch_id:4, priority:0, url:udp://233.0.0.34:6010 atrack:684, status:1, use_http_tmp_link:0, wowza_tmp_link:0, user_agent_filter:, use_load_balancing:0, changed:2013-02-04 14:56:14, enable_monitoring:0}]], use_load_balancing:0})
DEBUG:: 1368s 601ms  epg_loader.get_epg 4
DEBUG:: 1368s 609ms  epg_loader.get_curr_and_next 4
DEBUG:: 1368s 611ms  typeof(ch_id) string
DEBUG:: 1368s 613ms  now 1359991368
DEBUG:: 1368s 615ms  this.epg[ch_id] []
DEBUG:: 1368s 617ms  typeof this.epg[ch_id] object
DEBUG:: 1368s 619ms  epg []
DEBUG:: 1368s 632ms  player.init_con_menu
DEBUG:: 1368s 636ms  context_menu
DEBUG:: 1368s 643ms  context_menu.set_x_offset 100
DEBUG:: 1368s 646ms  context_menu.set_y_offset 100
DEBUG:: 1368s 655ms  context_menu.construct [{title:Complain, cmd:[{cmd:, title:}, {cmd:, title:}, {cmd:, title:}, {cmd:, title:}]]}]]
DEBUG:: 1368s 657ms  context_menu.reset
DEBUG:: 1368s 660ms  context_menu.destroy_container
DEBUG:: 1368s 662ms  remove DOM element - container
Opening:
sol auto
URL udp://233.0.0.34:6010
Found solution "rtp" num 2
Settrack v:-1 a:684 s:-1
DEBUG:: 1368s 724ms  send_last_tv_id 4
DEBUG:: 1368s 726ms  stb.load()
DEBUG:: 1368s 730ms  params: ({type:itv, action:set_last_id, id:4})
DEBUG:: 1368s 741ms  this.hist_ch_idx [0, {id:4, name:C MORE HITS, number:3, censored:0, cmd:udp://233.0.0.34:6010 atrack:684, descr:, cost:0, count:0, status:1, tv_genre_id:2, base_ch:0, hd:0, xmltv_id:, service_id:, bonus_ch:0, volume_correction:0, use_http_tmp_link:0, mc_cmd:1, enable_tv_archive:0, wowza_tmp_link:0, wowza_dvr:0, monitoring_status:1, monitoring_status_updated: null, enable_monitoring:0, monitoring_url:, enable_wowza_load_balancing:0, cmd_1:, cmd_2:, cmd_3:, logo:, correct_time:0, allow_pvr:, allow_local_pvr:1, lock:0, fav:0, archive:0, genres_str:, cur_playing:[No channel info], epg:[], open:1, cmds:[{id:, ch_id:, priority:, url:, status:, use_http_tmp_link:, wowza_tmp_link:, user_agent_filter:, use_load_balancing:, changed:, enable_monitoring:}]], use_load_balancing:0}]]
Check type 1fff
Video_PESBufferSize 770048
Audio SetDecoder OK type 4 pid 684 state 2
PCR PID 518
VPID 518 type 8193
APID 684 type 4097
Video_PESBufferSize 770048
DEBUG:: 1368s 962ms  generated in: 0.022s; query counter: 8; cache hits: 0; cache miss: 0; php errors: 0; sql errors: 0;
DEBUG:: 1368s 964ms  connection_problem.hide
DEBUG:: 1368s 972ms  generated in: 0.025s; query counter: 6; cache hits: 0; cache miss: 0; php errors: 0; sql errors: 0;
DEBUG:: 1368s 974ms  connection_problem.hide
DEBUG:: 1368s 987ms  last_tv_id saved true
DEBUG:: 1368s 989ms  typeof this.send_last_tv_id_callback function
Audio SetDecoder OK type 8 pid 684 state 2
Event 2
DEBUG:: 1369s 237ms  event:  2
DEBUG:: 1369s 240ms  stb.GetMetadataInfo() {"album":"","album_artist":"","artist":"","comment":"","composer":"","copyright":"","date":"","disc":"","encoder":"","encoded_by":"","filename":"","genre":"","language":"","performer":"","publisher":"","title":"","track":""}
DEBUG:: 1369s 249ms  this.cur_media_item ({id:4, name:C MORE HITS, number:3, censored:0, cmd:udp://233.0.0.34:6010 atrack:684, descr:, cost:0, count:0, status:1, tv_genre_id:2, base_ch:0, hd:0, xmltv_id:, service_id:, bonus_ch:0, volume_correction:0, use_http_tmp_link:0, mc_cmd:1, enable_tv_archive:0, wowza_tmp_link:0, wowza_dvr:0, monitoring_status:1, monitoring_status_updated: null, enable_monitoring:0, monitoring_url:, enable_wowza_load_balancing:0, cmd_1:, cmd_2:, cmd_3:, logo:, correct_time:0, allow_pvr:, allow_local_pvr:1, lock:0, fav:0, archive:0, genres_str:, cur_playing:[No channel info], epg:[], open:1, cmds:[{id:42, ch_id:4, priority:0, url:udp://233.0.0.34:6010 atrack:684, status:1, use_http_tmp_link:0, wowza_tmp_link:0, user_agent_filter:, use_load_balancing:0, changed:2013-02-04 14:56:14, enable_monitoring:0}]], use_load_balancing:0})
DEBUG:: 1369s 251ms  this.prev_state 0
STVID_SEQUENCE_INFO_EVT w 720 h 576 
Event 4
DEBUG:: 1369s 477ms  event:  4
DEBUG:: 1369s 493ms  volume.correct_level 0
DEBUG:: 1369s 496ms  this.level 35
DEBUG:: 1369s 499ms  this.correction 0
DEBUG:: 1369s 501ms  level 35
DEBUG:: 1369s 504ms  this.correction 0
DEBUG:: 1369s 506ms  this.level 35
DEBUG:: 1369s 509ms  level 35
DEBUG:: 1369s 511ms  this.mute.on false
DEBUG:: 1369s 513ms  real_volume_level 35
DEBUG:: 1369s 516ms  volume.update_bar 35
DEBUG:: 1369s 518ms  bar width 65
DEBUG:: 1369s 521ms  time_shift_indication.hide
DEBUG:: 1369s 526ms  player.cur_media_length 0
DEBUG:: 1369s 528ms  player.cur_pos_time 33119
DEBUG:: 1369s 537ms  player.set_pos_button_to_cur_time
DEBUG:: 1369s 539ms  this.active_time_shift false
DEBUG:: 1369s 543ms  this.cur_pos_time 33119
DEBUG:: 1369s 545ms  player.set_pos_button 33119
DEBUG:: 1369s 547ms  player.update_current_time 0
DEBUG:: 1369s 550ms  to_pos 0
DEBUG:: 1369s 552ms  stb.cur_place tv
DEBUG:: 1369s 554ms  this.prev_state 2
DEBUG:: 1369s 560ms  player.get_pids
DEBUG:: 1369s 569ms  audio_pid.get_all
DEBUG:: 1369s 574ms  audio_pids str [{pid:684,lang:["swe",""]},{pid:645,lang:["eng",""]}]
DEBUG:: 1369s 584ms  audio_pids obj [{pid:684, lang:[swe, ]]}, {pid:645, lang:[eng, ]]}]]
DEBUG:: 1369s 588ms  cur_pid 684
DEBUG:: 1369s 590ms  test
DEBUG:: 1369s 593ms  typeof this.subtitle_pid object
DEBUG:: 1369s 595ms  typeof this.subtitle_pid.get_all function
DEBUG:: 1369s 605ms  subtitle_pid.get_all
DEBUG:: 1369s 611ms  subtitle_pid.disable
DEBUG:: 1369s 615ms  subtitle_pids str []
DEBUG:: 1369s 620ms  cur_pid 8191
DEBUG:: 1369s 623ms  this.cur_pid_idx null
DEBUG:: 1369s 625ms  subtitle_pids []
DEBUG:: 1369s 635ms  player.build_con_menu
DEBUG:: 1369s 646ms  subtitle_pid.get_for_menu
DEBUG:: 1369s 666ms  sub_off false
DEBUG:: 1369s 675ms  audio_pid.get_for_menu
DEBUG:: 1369s 684ms  map [{title:Track 1 - swe, cmd:[function], active:true}, {title:Track 2 - eng, cmd:[function], active:false}]]
DEBUG:: 1369s 713ms  this.con_menu.map [{title:Audio, type:switch, cmd:[{title:, cmd:, active:}, {title:, cmd:, active:}]]}, {title:Subtitles, type:switch, cmd:[{title:, cmd:, active:}]]}, {title:3D mode, type:switch, cmd:[{title:, cmd:, active:}, {title:, cmd:}, {title:, cmd:}, {title:, cmd:}]]}, {title:Complain, cmd:[{cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}]], dom_obj:undefined, title_dom_obj:undefined, sub_dom_obj:undefined}]]
DEBUG:: 1369s 722ms  context_menu.construct [{title:Audio, type:switch, cmd:[{title:, cmd:, active:}, {title:, cmd:, active:}]]}, {title:Subtitles, type:switch, cmd:[{title:, cmd:, active:}]]}, {title:3D mode, type:switch, cmd:[{title:, cmd:, active:}, {title:, cmd:}, {title:, cmd:}, {title:, cmd:}]]}, {title:Complain, cmd:[{cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}, {cmd:, title:, dom_obj:, space:, bull:, title_dom_obj:}]], dom_obj:undefined, title_dom_obj:undefined, sub_dom_obj:undefined}]]
DEBUG:: 1369s 725ms  context_menu.reset
DEBUG:: 1369s 727ms  context_menu.destroy_container
DEBUG:: 1369s 729ms  remove DOM element - container
FrameRate 25000 dem 0
STVID_SEQUENCE_INFO_EVT w 720 h 576 
Event 7
STVID Change AR 2 
Changed FrameRate 25000 dem 0
DEBUG:: 1370s 375ms  event:  7

Aleksey Zhurbitsky

unread,
Feb 4, 2013, 10:37:31 AM2/4/13
to stalker-m...@googlegroups.com
From this debug we can see that this channel has two audio tracks (swe and eng):
audio_pids str [{pid:684,lang:["swe",""]},{pid:645,lang:["eng",""]}]

and doesn't have subtitles:
subtitle_pids str []

As far as I know - subtitles is not the same thing as teletext.

Oscar Kratz

unread,
Feb 4, 2013, 10:51:16 AM2/4/13
to stalker-m...@googlegroups.com
No, they are not the same thing.
When I look at the streams and the PIDS, it seems like the subtitles are embedded in the same PID as teletext.
Other boxes Ive tried seem to identify the subtitles on the same stream, and it works just fine.
So the subtitles are there, somewhere, the question is just how to make the MAG250/Stalker identify and show them correctly.

How do subtitles usually work? As individual DVB-PIDS in the the stream? 
I Take the channels down from Thor5 and 6, and none of the channels seem to have separate PIDS for different subtitle tracks. They are all like a "page" in the teletext PID.

Dimitar Ganchev

unread,
Feb 4, 2013, 5:05:12 PM2/4/13
to stalker-m...@googlegroups.com
There are 3 types of subtitles:

1. DVB (dvbs) - subtitles are encoded as pictures, encapsulated within the TS with different PID
2. Teletext (telx) - subtitles are encoded as text, encapsulated within the TS with different PID
3. Plain teletext pages, encoded within the videostream (inside the first invisible lines)

So far I wasn't able to make MAG250 work with Teletext subtitles, although the hardware and probably the player (as it is ffmpeg-based) should be capable of displaying them (if it displays .srt subtitles from external files, it should be able to display teletext subtitles within the stream). My assumption is that stb.GetSubtitlePIDs() returns only those pids that have DVB (dvbs) codec, ignoring the ones with teletext (telx) codec.

The plain old teletext is another thing. As long as I know, MAG250 does not support teletext decoding at all. I'm not sure if this can be made in software in case the chipset does not support it. Probably not.

Mitko

Aleksey Zhurbitsky

unread,
Feb 5, 2013, 3:26:20 AM2/5/13
to stalker-m...@googlegroups.com
Yes, stb.GetSubtitlePIDs() returns DVB subtitles.
MAG250 supports old teletext, but only on analog video out (s-video). Also the TV itself  must support teletext.

Oscar Kratz

unread,
Feb 5, 2013, 4:24:45 AM2/5/13
to stalker-m...@googlegroups.com
So really what we need to do is to find a way to grab the old teletext subtitles and send them out as a DVB subtitle.
There seems to be some tools to do this on .ts -files and make .srt from a page in teletext, so it have to be possible.
If we succeed I will post the solution in this thread.

Who develops stbapp? Is it possible to get hold of the source code in any way?

Everything works if we use analog output from the box, and have a tv that supports it, its not a solution you want to provide your customers with though.
So thanks for all quick replys, you have been a lot of help sorting out what needs to be done.

Best regards
//Oscar

Dovydas Zakas

unread,
Nov 18, 2014, 12:46:12 PM11/18/14
to stalker-m...@googlegroups.com
Are there any news about this problem?

Oscar Kratz

unread,
Nov 18, 2014, 1:48:00 PM11/18/14
to Stalker Middleware on behalf of netmaster

Well, we had to modify the source code of our streaming software to grab the closed caption subtitles and create a dvb-subtitle package from it. Has been working 100% for all Astra and thor channels so far. Took a lot of coding to make it work good, as many channels send the cc -subs in different ways.. Quite complicated. I could post the code we implemented in dvblast If you want it?

Den 18 nov 2014 18:46 skrev "Dovydas Zakas, Stalker Middleware" <stalker-middleware+APn2wQer2CuGW...@googlegroups.com>:
Are there any news about this problem?

--
Вы получили это сообщение, так как подписаны на группу "Stalker Middleware".
Чтобы отменить подписку на эту тему, перейдите по ссылке https://groups.google.com/d/topic/stalker-middleware/7I72eSa5Bwk/unsubscribe.
Чтобы отменить подписку на эту группу и все ее темы, отправьте письмо на электронный адрес stalker-middlew...@googlegroups.com.
Чтобы добавлять сообщения в эту группу, отправьте письмо по адресу stalker-m...@googlegroups.com.
Просмотреть это обсуждение в Сети можно по адресу https://groups.google.com/d/msgid/stalker-middleware/e44d7e50-5b15-46c4-9fa6-1bd330dc00d6%40googlegroups.com.
Настройки подписки и доставки писем: https://groups.google.com/d/optout.

Dovydas Zakas

unread,
Nov 18, 2014, 4:01:42 PM11/18/14
to stalker-m...@googlegroups.com
Thanks but I'm just a end consumer so I'm not interested into source codes very much ;) But if I understand correnctly to make this work the iptv provider should make some changes ?

Oscar Kratz

unread,
Nov 18, 2014, 4:03:41 PM11/18/14
to Stalker Middleware on behalf of netmaster

Yes

Den 18 nov 2014 22:01 skrev "Dovydas Zakas, Stalker Middleware" <stalker-middleware+APn2wQer2CuGW...@googlegroups.com>:
Thanks but I'm just a end consumer so I'm not interested into source codes very much ;)  But if I understand correnctly to make this work the iptv provider should make some changes ?

--
Вы получили это сообщение, так как подписаны на группу "Stalker Middleware".
Чтобы отменить подписку на эту тему, перейдите по ссылке https://groups.google.com/d/topic/stalker-middleware/7I72eSa5Bwk/unsubscribe.
Чтобы отменить подписку на эту группу и все ее темы, отправьте письмо на электронный адрес stalker-middlew...@googlegroups.com.
Чтобы добавлять сообщения в эту группу, отправьте письмо по адресу stalker-m...@googlegroups.com.
Просмотреть это обсуждение в Сети можно по адресу https://groups.google.com/d/msgid/stalker-middleware/ec5c4c24-ddae-4a02-a3b7-5dd478c319bb%40googlegroups.com.

Mustafa Sarmadawy

unread,
Jun 19, 2016, 6:18:11 PM6/19/16
to Stalker Middleware
Hi

i know this is an old thread.. but i am still struggeling with the same thing. 
do you still have that code or do you have a better solution for this?


On Tuesday, November 18, 2014 at 7:48:00 PM UTC+1, Oscar Kratz wrote:

Well, we had to modify the source code of our streaming software to grab the closed caption subtitles and create a dvb-subtitle package from it. Has been working 100% for all Astra and thor channels so far. Took a lot of coding to make it work good, as many channels send the cc -subs in different ways.. Quite complicated. I could post the code we implemented in dvblast If you want it?

Den 18 nov 2014 18:46 skrev "Dovydas Zakas, Stalker Middleware" <stalker-middleware+APn2wQer2CuGWwsI8p88VDIp7EvTg00rcFq46-GxUMiDM@googlegroups.com>:
Are there any news about this problem?

--
Вы получили это сообщение, так как подписаны на группу "Stalker Middleware".
Чтобы отменить подписку на эту тему, перейдите по ссылке https://groups.google.com/d/topic/stalker-middleware/7I72eSa5Bwk/unsubscribe.
Чтобы отменить подписку на эту группу и все ее темы, отправьте письмо на электронный адрес stalker-middleware+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages