Bug #3933
RTSP Setup Error 9 switching channels using tuners from DVBViewer as a Sat>IP server
0%
Description
I'm quite new to TVHeadend but have spent the past few days setting it up and have finally got it configured so it all works.
As I don't have any spare tuners to use, I was pleased to see TVH detected all five tuners that I use on DVBViewer Recording Service as SAT>IP tuners, and I found I could use them to scan for channels ok, scan EPG etc. Using the KODI TVH Plugin I can view channels fine, but I have one issue when changing from one channel to another - I almost always get an error logged "RTSP Setup Error 9 (Unknown error -9) [6-200]" followed by "subscription: 001A: service instance is bad, reason: Tuning failed". I only get this when TVH tries to use the same tuner as is currently used - when I switch it seems to close the existing "subscription" but then fails setting up the new one. As I have multiple Sat>IP tuners, it then switches to another and tunes ok.
I raised this on IRC and Perexg replied " it appears that DVBViewer allocates wrong UDP ports; you may enable '--trace httpc' to see the RTSP communication between TVH and server... " I'm not sure what that means, but I did enable the trace he mentions and attached is a debug log showing the failure with the full trace.
I should also say the DVBViewer log doesn't show any problems when I hit this.
If this is a bug in DVBViewer, is there any way I can get round it? If not, could I have an exact description of what the bug is and I will try to raise it on the DVBViewer forums.
Thanks
Files
History
Updated by Jaroslav Kysela over 8 years ago
The server is broken. TVH asks to change the UDP ports to 46342-46343, but the server replied that client has ports 42998-42999.
2016-08-13 15:57:07.890 [ TRACE]:httpc: 000E: sending RTSP/1.0 cmd 2016-08-13 15:57:07.890 [ TRACE]:httpc: 53 45 54 55 50 20 72 74 73 70 3A 2F 2F 31 39 32 SETUP rtsp://192 2016-08-13 15:57:07.890 [ TRACE]:httpc: 2E 31 36 38 2E 31 2E 32 30 31 2F 73 74 72 65 61 .168.1.201/strea 2016-08-13 15:57:07.890 [ TRACE]:httpc: 6D 3D 35 3F 66 65 3D 33 26 66 72 65 71 3D 35 34 m=5?fe=3&freq=54 2016-08-13 15:57:07.891 [ TRACE]:httpc: 35 2E 38 33 33 26 62 77 3D 38 26 6D 73 79 73 3D 5.833&bw=8&msys= 2016-08-13 15:57:07.891 [ TRACE]:httpc: 64 76 62 74 32 26 6D 74 79 70 65 3D 32 35 36 71 dvbt2&mtype=256q 2016-08-13 15:57:07.891 [ TRACE]:httpc: 61 6D 26 74 6D 6F 64 65 3D 33 32 6B 26 67 69 3D am&tmode=32k&gi= 2016-08-13 15:57:07.891 [ TRACE]:httpc: 31 31 32 38 26 70 6C 73 3D 30 20 52 54 53 50 2F 1128&pls=0 RTSP/ 2016-08-13 15:57:07.891 [ TRACE]:httpc: 31 2E 30 0D 0A 54 72 61 6E 73 70 6F 72 74 3A 20 1.0..Transport: 2016-08-13 15:57:07.891 [ TRACE]:httpc: 52 54 50 2F 41 56 50 3B 75 6E 69 63 61 73 74 3B RTP/AVP;unicast; 2016-08-13 15:57:07.891 [ TRACE]:httpc: 63 6C 69 65 6E 74 5F 70 6F 72 74 3D 34 36 33 34 client_port=4634 2016-08-13 15:57:07.891 [ TRACE]:httpc: 32 2D 34 36 33 34 33 0D 0A 53 65 73 73 69 6F 6E 2-46343..Session 2016-08-13 15:57:07.891 [ TRACE]:httpc: 3A 20 34 30 39 32 0D 0A 43 53 65 71 3A 20 31 30 : 4092..CSeq: 10 2016-08-13 15:57:07.891 [ TRACE]:httpc: 0D 0A 0D 0A 2016-08-13 15:57:11.358 [ TRACE]:httpc: 000E: RTSP/1.0 answer 'RTSP/1.0 200 OK' (rcseq: 10) 2016-08-13 15:57:11.358 [ TRACE]:httpc: 52 54 53 50 2F 31 2E 30 20 32 30 30 20 4F 4B 00 RTSP/1.0 200 OK. 2016-08-13 15:57:11.358 [ TRACE]:httpc: 0A 43 53 65 71 3A 20 31 30 0D 0A 53 65 73 73 69 .CSeq: 10..Sessi 2016-08-13 15:57:11.358 [ TRACE]:httpc: 6F 6E 3A 20 34 30 39 32 3B 74 69 6D 65 6F 75 74 on: 4092;timeout 2016-08-13 15:57:11.358 [ TRACE]:httpc: 3D 32 30 0D 0A 54 72 61 6E 73 70 6F 72 74 3A 20 =20..Transport: 2016-08-13 15:57:11.358 [ TRACE]:httpc: 52 54 50 2F 41 56 50 3B 75 6E 69 63 61 73 74 3B RTP/AVP;unicast; 2016-08-13 15:57:11.358 [ TRACE]:httpc: 64 65 73 74 69 6E 61 74 69 6F 6E 3D 31 39 32 2E destination=192. 2016-08-13 15:57:11.358 [ TRACE]:httpc: 31 36 38 2E 31 2E 31 31 36 3B 73 6F 75 72 63 65 168.1.116;source 2016-08-13 15:57:11.358 [ TRACE]:httpc: 3D 31 39 32 2E 31 36 38 2E 31 2E 32 30 31 3B 63 =192.168.1.201;c 2016-08-13 15:57:11.358 [ TRACE]:httpc: 6C 69 65 6E 74 5F 70 6F 72 74 3D 34 32 39 39 38 lient_port=42998 2016-08-13 15:57:11.358 [ TRACE]:httpc: 2D 34 32 39 39 39 3B 73 65 72 76 65 72 5F 70 6F -42999;server_po 2016-08-13 15:57:11.358 [ TRACE]:httpc: 72 74 3D 36 32 30 30 2D 36 32 30 31 0D 0A 63 6F rt=6200-6201..co 2016-08-13 15:57:11.358 [ TRACE]:httpc: 6D 2E 73 65 73 2E 73 74 72 65 61 6D 49 44 3A 20 m.ses.streamID: 2016-08-13 15:57:11.358 [ TRACE]:httpc: 35 0D 0A 53 65 72 76 65 72 3A 20 44 56 42 56 69 5..Server: DVBVi 2016-08-13 15:57:11.358 [ TRACE]:httpc: 65 77 65 72 20 52 65 63 6F 72 64 69 6E 67 20 53 ewer Recording S 2016-08-13 15:57:11.358 [ TRACE]:httpc: 65 72 76 69 63 65 0D 0A 44 61 74 65 3A 20 53 61 ervice..Date: Sa 2016-08-13 15:57:11.358 [ TRACE]:httpc: 74 2C 20 31 33 20 41 75 67 20 32 30 31 36 20 31 t, 13 Aug 2016 1 2016-08-13 15:57:11.358 [ TRACE]:httpc: 34 3A 35 37 3A 31 32 20 47 4D 54 00 0A 0D 0A 4:57:12 GMT.... 2016-08-13 15:57:11.358 [ ERROR]:satip: SAT>IP DVB-T Tuner #3 (192.168.1.201) - RTSP SETUP error 9 (Unknown error -9) [6-200] 2016-08-13 15:57:11.468 [ TRACE]:satip: SAT>IP DVB-T Tuner #3 (192.168.1.201) - shutdown for /stream=5/4092
Updated by Jaroslav Kysela over 8 years ago
Try to disable 'Fast input switch' in the adapter tree for the server.
Updated by Laurie Davis over 8 years ago
Unticking 'Fast Input Switch' has fixed it!
I didn't realise there were a set of settings at the tree level in the TV adapter view - I said I was new to TVH
Anyway, thanks again for the quick response.
Updated by George S about 8 years ago
Laurie, I have tried configuring tvheadend as a DVBViewer recording service RTSP client, but I can't figure out how to actually scan channels. tvheadend sees my 3 tuners but when i add networks and go for a scan all muxes fail. I tried DVBViewer on another machine on my local network as a recording service rtsp client and all works well. Could you please tell me how you managed to scan your channels successfully?
Updated by Laurie Davis about 8 years ago
George, I didn't do anything specific - it just worked. Have you checked the settings in TVH for each DVBViewer DVB>SATIP tuner and ensured they are correctly set to either DVB-T/S/C, and you have associated the correct Network with it?
For me, as I'm in London, UK, and using DVB-T, I created a Network called 'Freeview' and set the pre-defined muxs to United Kingdom: Crystal Palace. Then I just edited each Mux and set the scan status to Active and away it went. What sort of failure messages do you get?
Updated by George S about 8 years ago
Thanks for the quick reply! That's exactly what I did, minus the editing the muxes, since they seem correct upon checking. I have two DVBS2 tuners with diseqc 1.1, each receiving 6 satellites, and 1 DVBT2 tuner for Terrestrial reception. I have declared the networks and associated them to the correct tuner position, and the muxes are populated automatically. Then I hit force scan for each network, but all muxes fail. One of my tuners has experimental support on linux, so I tried it on my Linux box, and most muxes scan correctly. But as when I use them on my windows computer, there's no signal. I tried all kinds of configurations, like full mux rx on and off, fast switch on and off, send full play command, but nothing seems to work. When you edited the muxes, what exactly did you change from the predefined ones? I read somewhere that maybe editing and giving the rtsp url instead of the frequencies might work, but I have no idea how to create an m3u playlist with all the rtsp urls. I would totally put all 3 tuners straight on the linux box, but they are not recognized, except for 1, and even that one isn't fully functional.
Updated by Laurie Davis about 8 years ago
Which version of TVH are you using? Mine works on a nightly from a few weeks ago (4.1-2190), but I've just tried it on another system I have which has the last stable installed (4.1.1945) and every scan fails. It just says "scan no data failed". So it looks like DVB>SATIP may be broken in that earlier version - try a recent nightly build if you can.
When I say edited the muxes, I only changed scan status to "Active" to force it to scan - I never touched any other setting.
Updated by George S about 8 years ago
version 4.1-2236~g817f67e
that's the exact fail message I'm getting. Interestingly, when it was grabbing epg on the background in the last few hours it managed to find a few services, like 40 only from 3 satellites, but the terrestrial channels which should be the easiest, since there's no switching involved, still keep failing. can you tell me if you have enabled or disabled the following settings: Full mux RX mode supported, addpids/delpids supported, PIDs in setup, PIDs 21 in setup, Disable device/firmware-specific workarounds, Send full PLAY cmd, Force teardown delay, Pass subscription weight, and if you've entered any value in UDP RTP port number, Network limit per position, and Network group in the TV adapters tab, and network ID (limit scanning) and SAT>IP source no in the networks tab?
Updated by Laurie Davis about 8 years ago
Full mux RX mode supported: Enabled
addpids/delpids supported: Enabled
PIDs in setup: Disabled
PIDs 21 in setup: Disabled
Disable device/firmware-specific workarounds: Disabled
Send full PLAY cmd: Disabled
Force teardown delay: Disabled
Pass subscription weight: Enabled
UDP RTP port number (2 ports): 0
Network limit per position, and Network group - I can't see these in my DVBT-T setup - maybe they are DVB-S only?
network ID (limit scanning): 0
SAT>IP source no:0
Another thought - what version of he DVBViewer RS are you running? I'm on 1.33.1.0 (the latest).
Updated by George S about 8 years ago
me too...
matched your settings, let's see what happens... it seems that the first satellite is populating... also on the sat>ip dvbt tuner settings the network type dvbt doesn't seem to stick no matter how many times i hit save :-\
Updated by George S about 8 years ago
no luck... did you build the nightly or just installed through a repo? i'm thinking of downgrading to your version...