Bug #4721

TVHClient Android app won't play live TV in VLC

Added by Michael Marley 12 days ago. Updated 9 days ago.

Status:FixedStart date:2017-11-10
Priority:NormalDue date:
Assignee:John Törnblom% Done:

0%

Category:Streaming
Target version:-
Found in version:4.3-625~g6cd246667 Affected Versions:

Description

When I attempt to do so, VLC says that the media cannot be played. Here is the logging output from TVHeadend with all debugging/tracing turned on:

Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: htsp: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - method getTicket
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: htsp-req: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - request '{"seq":40,"channelId":1728489020,"method":"getTicket"}'
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: htsp-ans: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - answer '{"path":"/stream/channelid/1728489020","ticket":"D607D568E0DCFEA0FCC2B651EFE72E94A594090F","seq":40}'
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: dvr: checking free and used disk space for config "Default profile" : OK
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: thread: created thread 139880352929536 [tvh:tcp-start / 0x560e49df9b50(0x7f388c001210)]
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: HTTP/1.1 GET /stream/channelid/1728489020?ticket=D607D568E0DCFEA0FCC2B651EFE72E94A594090F&mux=matroska{{Host=mamarley-desktop:9981,Accept=*/*,Accept-Language=en_US,User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git,Range=bytes=0-}}
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: ::ffff:10.3.4.228: using ticket D607D568E0DCFEA0FCC2B651EFE72E94A594090F for /stream/channelid/1728489020
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: idnode: find node (null) class profile
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: ::ffff:10.3.4.228: HTTP/1.1 GET /stream/channelid -- 503
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: thread: created thread 139880352929536 [tvh:tcp-start / 0x560e49df9b50(0x7f388c001210)]
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: HTTP/1.1 GET /stream/channelid/1728489020?ticket=D607D568E0DCFEA0FCC2B651EFE72E94A594090F&mux=matroska{{Host=mamarley-desktop:9981,User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git,Range=bytes=0-,Connection=close,Icy-MetaData=1}}
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: ::ffff:10.3.4.228: using ticket D607D568E0DCFEA0FCC2B651EFE72E94A594090F for /stream/channelid/1728489020
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: idnode: find node (null) class profile
Nov 10 07:22:14 mamarley-desktop tvheadend[22623]: http: ::ffff:10.3.4.228: HTTP/1.1 GET /stream/channelid -- 503

Associated revisions

Revision 6b42f0c5
Added by Jaroslav Kysela 10 days ago

profile: print an error when the profile is problematic, issue #4721

Revision fcdb57ec
Added by Jaroslav Kysela 10 days ago

profile: print an error when the profile is problematic, issue #4721

Revision af50dfb9
Added by Jaroslav Kysela 9 days ago

profile: fix typo (and remember to recompile things after each changes -perexg), issue #4721

Revision fd9c6abf
Added by Jaroslav Kysela 9 days ago

profile: fix typo (and remember to recompile things after each changes -perexg), issue #4721

History

#1 Updated by Jaroslav Kysela 12 days ago

Traces are only written to the file. https://tvheadend.org/projects/tvheadend/wiki/Traces

It looks like profile issue, mux=matroska in requested URL is wrong, it should be profile=matroska.

#2 Updated by Michael Marley 12 days ago

Here's the output that was printed to the file, but it looks about the same:

2017-11-10 07:44:08.836 [  TRACE]:htsp: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - method getTicket
2017-11-10 07:44:08.836 [  TRACE]:htsp-req: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - request '{"seq":42,"channelId":1728489020,"method":"getTicket"}'
2017-11-10 07:44:08.836 [  TRACE]:htsp-ans: ::ffff:10.3.4.228 [ michael | org.tvheadend.tvhguide ] - answer '{"path":"/stream/channelid/1728489020","ticket":"A485EC2DFEE8AC322076D5025E14498D86637791","seq":42}'
2017-11-10 07:44:09.171 [  TRACE]:thread: created thread 139880352929536 [tvh:tcp-start / 0x560e49df9b50(0x7f388c001210)]
2017-11-10 07:44:09.176 [  TRACE]:http: HTTP/1.1 GET /stream/channelid/1728489020?ticket=A485EC2DFEE8AC322076D5025E14498D86637791&mux=matroska{{Host=mamarley-desktop:9981,Accept=*/*,Accept-Language=en_US,User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git,Range=bytes=0-}}
2017-11-10 07:44:09.176 [   INFO]:http: ::ffff:10.3.4.228: using ticket A485EC2DFEE8AC322076D5025E14498D86637791 for /stream/channelid/1728489020
2017-11-10 07:44:09.176 [  TRACE]:idnode: find node (null) class profile
2017-11-10 07:44:09.176 [  ERROR]:http: ::ffff:10.3.4.228: HTTP/1.1 GET /stream/channelid -- 503
2017-11-10 07:44:09.195 [  TRACE]:thread: created thread 139880352929536 [tvh:tcp-start / 0x560e49df9b50(0x7f388c001210)]
2017-11-10 07:44:09.197 [  TRACE]:http: HTTP/1.1 GET /stream/channelid/1728489020?ticket=A485EC2DFEE8AC322076D5025E14498D86637791&mux=matroska{{Host=mamarley-desktop:9981,User-Agent=VLC/3.0.0-git LibVLC/3.0.0-git,Range=bytes=0-,Connection=close,Icy-MetaData=1}}
2017-11-10 07:44:09.198 [   INFO]:http: ::ffff:10.3.4.228: using ticket A485EC2DFEE8AC322076D5025E14498D86637791 for /stream/channelid/1728489020
2017-11-10 07:44:09.198 [  TRACE]:idnode: find node (null) class profile
2017-11-10 07:44:09.198 [  ERROR]:http: ::ffff:10.3.4.228: HTTP/1.1 GET /stream/channelid -- 503

I tried from a desktop instance of VLC and I can confirm that it works if I replace "mux" with "profile". I'm pretty sure that playing TV from TVHGuide (sorry, I got the wrong app name in the title) worked in the past though, and TVHGuide hasn't changed since 2013.

#3 Updated by Michael Marley 12 days ago

I also just checked the other Android TVHeadend client (TVHClient) (again, sorry for getting the name in the title screwed up) and it has the same problem.

#4 Updated by Jaroslav Kysela 12 days ago

Try to restrict the profiles for the user used for TVHGuide only to matroska in ACL.

#5 Updated by Mark Clarkstone 12 days ago

  • Subject changed from TVHClient Android app will no play live TV in VLC to TVHClient Android app won't play live TV in VLC

#6 Updated by Michael Marley 12 days ago

I tried that and it has no effect.

#7 Updated by saen acro 12 days ago

What profile is atached to user used in TVHClient
on my phone VLC work without problem.

I defenetly prefer bsplayer, mxplayer.
ProgTV Android is best, it support EPG, but don't support user/pass authentication,
need to write to support.

#8 Updated by Michael Marley 12 days ago

The user does not have any of the profiles selected, which should allow for any profile to be used as requested at runtime. As requested, I tried selecting only the Matroska profile for the user, but this had no effect and the video still fails to play with exactly the same error from VLC and output in the TVH logs.

Which video player I am using does not matter. The problem is that TVHeadend itself is returning a 503 when the request is made. This can be reproduced in any video player, any web browser, or even curl on the command line.

#9 Updated by saen acro 11 days ago

Error 503
do you use firewall or nat?

#10 Updated by Michael Marley 11 days ago

Both computers are in the same subnet, so NAT isn't applicable. I don't have a firewall on the TVHeadend server, but even if I did the error would likely be Connection Refused instead of HTTP 503.

#11 Updated by Jaroslav Kysela 11 days ago

Could you apply this change and retest?

diff --git a/src/webui/webui.c b/src/webui/webui.c
index 622540593..70d6e3126 100644
--- a/src/webui/webui.c
+++ b/src/webui/webui.c
@@ -1309,6 +1309,8 @@ http_stream_channel(http_connection_t *hc, channel_t *ch, int weight)
                                   SUBSCRIPTION_PACKET | SUBSCRIPTION_MPEGTS)))
     return HTTP_STATUS_NOT_ALLOWED;

+  tvhtrace(LS_WEBUI, "selected profile: '%s'\n", profile_get_name(pro));
+
   if((tcp_id = http_stream_preop(hc)) == NULL)
     return HTTP_STATUS_NOT_ALLOWED;

#12 Updated by Michael Marley 11 days ago

After applying that patch, the output was "2017-11-10 14:27:18.527 [ TRACE]:webui: selected profile: 'htsp'". Because of that, I looked at the stream settings and found that the default had somehow gotten changed from Mastroska to HTSP. Therefore, it looks like this isn't actually a bug. Sorry to waste your time.

#13 Updated by saen acro 11 days ago

Can you explain step by step what you do
there is no such problem in my 2 android's and one Win10 phones
and few pc's with Win10 ubuntu and centos

2017-11-10 22:21:41.495 htsp: Got connection from 192.168.1.26
2017-11-10 22:21:41.502 htsp: 192.168.1.26: Identified as user '' (unverified)
2017-11-10 22:21:41.503 htsp: 192.168.1.26 [  ]: Welcomed client software: org.tvheadend.tvhclient (HTSPv23)
2017-11-10 22:21:41.509 htsp: 192.168.1.26 [  | org.tvheadend.tvhclient ]: Identified as user ''
2017-11-10 22:21:55.475 http: 192.168.1.26: using ticket 2009092E58ABF1A45EB116474C00D36C7929313B for /stream/channelid/562303109
2017-11-10 22:21:55.476 subscription: 028D: "HTTP" subscribing on channel "BTV", weight: 100, adapter: "DiBcom 3000MC/P : DVB-T #0", network: "dvb-t", mux: "626MHz", provider: "NURTS Digital", service: "BTV", profile="pass", hostname="192.168.1.26", client="VLC/3.0.0-git LibVLC/3.0.0-git" 
2017-11-10 22:22:04.272 subscription: 028D: "HTTP" unsubscribing from "BTV", hostname="192.168.1.26", client="VLC/3.0.0-git LibVLC/3.0.0-git" 
2017-11-10 22:22:13.241 htsp: 192.168.1.26 [  | org.tvheadend.tvhclient ]: Disconnected

#14 Updated by Michael Marley 11 days ago

As I stated in my previous post, I discovered that the default profile had been accidentally changed to "htsp". After changing it back to "matroska", everything works fine again.

#15 Updated by Jaroslav Kysela 9 days ago

I pushed a change to print an error in this case to get more clue, what's going wrong. It was not clear before. v4.3-629-g6b42f0c50

#16 Updated by b kuhls 9 days ago

Hi,

building tvheadend is broken after this commit
https://github.com/tvheadend/tvheadend/commit/6b42f0c5061363caad22c0518085ef23854043df

src/profile.c: In function 'profile_find_by_list':
src/profile.c:545:30: error: 'flags' undeclared (first use in this function)
     if (!profile_verify(res, flags))

using these configure options
./configure --prefix=/usr --arch="x86_64" --cpu="" --nowerror --python="/home/buildroot/output/host/usr/bin/python" --enable-dvbscan --enable-bundle --enable-pngquant --disable-ffmpeg_static --disable-hdhomerun_static --enable-dbus-1 --enable-libav --enable-vaapi --enable-dvbcsa --disable-hdhomerun_client --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libopus --enable-pcre --enable-libx264 --enable-libx265

#17 Updated by Jaroslav Kysela 9 days ago

Fixed, missing 's'.

#18 Updated by Jaroslav Kysela 9 days ago

  • Status changed from New to Fixed

Also available in: Atom PDF