HLS Streaming

DVBLink Remote API clients and tools

HLS Streaming

Postby jzeller » Thu Jan 31, 2013 1:10 am

I have been looking at the API code and I am trying to get an HLS stream from the DVBlink server. When I craft a POST command to the server, I get a proper URL back. However, I have tried multiple HLS players and none seem to be able to play the stream, as if it does not exist or work. Any tips? I tried looking at the logs for dvblink_server and dvblink_webserver but nothing shows up.

Thanks,
Jason Zeller
jzeller
 
Posts: 8
Joined: Tue Jul 31, 2012 11:11 pm


Re: HLS Streaming

Postby jzeller » Thu Jan 31, 2013 1:28 am

After setting the logging to extended info, I was able to find much more data. When I run the following command in a web browser:

Code: Select all
http://192.168.1.104:8080/cs/?command=play_channel&xml_param=<stream xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.dvblogic.com"><channel_dvblink_id>11740000</channel_dvblink_id><client_id>client1</client_id><stream_type>hls</stream_type><server_address>192.168.1.104</server_address><transcoder><height>1280</height><width>768</width></transcoder></stream>


I get back the following:
Code: Select all
0<?xml version="1.0" encoding="UTF-8"?> <stream xmlns="http://www.dvblogic.com"><channel_handle>1</channel_handle><url>http://192.168.1.104:8081/dvblink/dvblink_top_index_1.m3u8</url></stream>


Below is from the dvblink_server log file:
Code: Select all
2013-Jan-30 18:20:15:   [I] Starting iphone transcoder. w 768, h 1280, b 0
2013-Jan-30 18:20:16:   [I] broker::change_channel(): sink: 3b9682e1-0512-4089-94a9-dc15340e8292, channel: 11740000
2013-Jan-30 18:20:16:   [I] broker::change_channel(): quit_lock_ acquired, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] broker::stop_current_stream(): CurrentSource is not found for sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] broker::find_source(): sink-source pair was established, source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] broker::switch_to_channel(): Switching to channel 0:udp://@224.0.7.17:2001:2001 ... source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] CIPTVBridgeControlImpl::ChangeChannel. Request channel: 0:udp://@224.0.7.17:2001:2001
2013-Jan-30 18:20:16:   [I] *** IPTV: Streaming thread is started
2013-Jan-30 18:20:16:   [I] *** IPTV: GetStreamReader() - DL_NET_PROTO_UDP
2013-Jan-30 18:20:16:   [I] ts_source_control::change_channel(): ts_source has 1 consumers [source: 444346d5-b245-48a6-8452-35d6481d739f]
2013-Jan-30 18:20:16:   [I] broker::switch_to_channel(): ...Switching to channel 0:udp://@224.0.7.17:2001:2001 succeeded, source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] broker::switch_to_channel(): New pair sink-channel registered. source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] broker::change_channel(): quit_lock_ unlocked. sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:16:   [I] network_streamer::start_channel_streaming: resource_url = http://192.168.1.104:8081/dvblink/dvblink_top_index_1.m3u8
2013-Jan-30 18:20:16:   [I] *** IPTV: Local IP address - 10.22.36.156
2013-Jan-30 18:20:16:   [I] *** IPTV: udp_reader - LocalAddr=10.22.36.156, RemoteAddr=224.0.7.17, Port=2001
2013-Jan-30 18:20:16:   [I] *** IPTV: Pre-buffering started
2013-Jan-30 18:20:16:   [I] *** IPTV: udp_reader - StreamReceiving() started
2013-Jan-30 18:20:17:   [I] *** IPTV: Pre-buffering finished
2013-Jan-30 18:20:17:   [I] ts_converter::ProcessPATPacket. PAT is found and parsed successfully. Now looking for PMT...
2013-Jan-30 18:20:17:   [I] CTSStreamWaiter::GetPidToCheck. PID to check 7680
2013-Jan-30 18:20:17:   [I] ts_converter::ProcessPMTPacket. PMT is found and parsed successfully. Starting streaming.
2013-Jan-30 18:20:17:   [I] CTSStreamWaiter::ProcessStream. Found first not encrypted packet. Start streaming
2013-Jan-30 18:20:24:   [I] *** IPTV: Waiting for data...
2013-Jan-30 18:20:24:   [I] iphone_segmentor::callback: DeltaPTS > segment_duration
2013-Jan-30 18:20:24:   [I] iphone_segmentor::send_stream: segment 0 has been put into the ready_list
2013-Jan-30 18:20:30:   [I] iphone_segmentor::callback: DeltaPTS > segment_duration
2013-Jan-30 18:20:30:   [I] iphone_segmentor::send_stream: segment 1 has been put into the ready_list
2013-Jan-30 18:20:36:   [I] iphone_segmentor::callback: DeltaPTS > segment_duration
2013-Jan-30 18:20:36:   [I] iphone_segmentor::send_stream: segment 2 has been put into the ready_list
2013-Jan-30 18:20:36:   [I] iphone_segmentor::is_client_connected: segment number 3 EXCEEDED ALLOWED QUANTITY 2
2013-Jan-30 18:20:36:   [I] broker::change_channel(): sink: 3b9682e1-0512-4089-94a9-dc15340e8292, channel: 0
2013-Jan-30 18:20:36:   [I] broker::change_channel(): quit_lock_ acquired, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] broker::stop_current_stream(): Pair sink-channel was removed. sink: 3b9682e1-0512-4089-94a9-dc15340e8292, channel: 0
2013-Jan-30 18:20:36:   [I] broker::stop_current_stream(): Try to stop stream... source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] ts_source_control::stop_stream(): Try to stop epg_processor... [source: 444346d5-b245-48a6-8452-35d6481d739f sink: 3b9682e1-0512-4089-94a9-dc15340e8292]
2013-Jan-30 18:20:36:   [I] ts_source_control::stop_stream(): ...epg_processor stopped. source: [444346d5-b245-48a6-8452-35d6481d739f sink: 3b9682e1-0512-4089-94a9-dc15340e8292]
2013-Jan-30 18:20:36:   [I] ts_source_control::stop_stream(): Try to stop ts-stream... [source: 444346d5-b245-48a6-8452-35d6481d739f]
2013-Jan-30 18:20:36:   [I] stream_control::StreamingThread. Streaming thread is finished
2013-Jan-30 18:20:36:   [I] ts_source_control::stop_stream(): ...ts-stream stopped. [source: 444346d5-b245-48a6-8452-35d6481d739f]
2013-Jan-30 18:20:36:   [I] ts_source_control::stop_stream(): ts_source is free [source: 444346d5-b245-48a6-8452-35d6481d739f]
2013-Jan-30 18:20:36:   [I] broker::stop_current_stream(): ...stream stopped source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] broker::stop_current_stream(): sink-source pair has been removed, source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] broker::stop_current_stream(): Stream stopped from source: 444346d5-b245-48a6-8452-35d6481d739f, sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] broker::change_channel(): quit_lock_ unlocked. sink: 3b9682e1-0512-4089-94a9-dc15340e8292
2013-Jan-30 18:20:36:   [I] iphone_segmentor::check_stream_timer_procedure - aborted


From that XML that was returned, I use VLC (It works fine connecting to HLS streams) to try and connect to the HLS stream at:

http://192.168.1.104:8081/dvblink/dvbli ... dex_1.m3u8

That stream never starts. From the look of the log file it is having trouble with IPTV going into the encoder maybe? Regardless it looks like streamer stops thus why the stream never works.
jzeller
 
Posts: 8
Joined: Tue Jul 31, 2012 11:11 pm

Re: HLS Streaming

Postby Oberon » Thu Jan 31, 2013 9:31 am

From the log file everything looks goods. Stream is produced and prepared for download in HLS chunks. It is that noone downloads them.
I do not know whether VLC can play HLS. In any case make sure that you do not have any custom firewall that blocks 8081 port.
Also you need to specify a bitrate in your HLS request.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: HLS Streaming

Postby jzeller » Thu Jan 31, 2013 8:43 pm

Oberon,

Thanks for the reply. I realized when you said no client was connecting to it, I had to make the HTTP post immediately before requesting the stream via HLS. Otherwise the playlist would timeout. As soon as I tested, instant working! Now I just need to fiddle with the code and make the request when the user presses play. I understand now its a dynamic playlist in that its not static. Makes perfect sense otherwise the server would get buried. I appreciate the help and hope to have a client out soon!

Thanks!
jzeller
 
Posts: 8
Joined: Tue Jul 31, 2012 11:11 pm


Return to Development corner

Who is online

Users browsing this forum: No registered users and 2 guests