Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#11949 closed Developer Task (fixed)

IPTV don't work with freebox TV (france)

Reported by: snouf@… Owned by: Karl Egly
Priority: minor Milestone: 0.27.1
Component: MythTV - Recording Version: 0.27-fixes
Severity: medium Keywords: freeboxtv, iptv, rtp, rtcp rr
Cc: Ticket locked: no

Description

Freebox TV does not work on 0.27. Another user (http://mythtv-fr.org/forums/viewtopic.php?pid=23321#p23321) used on 0.26 and since the upgrade to 0.27 it does not work.

Versions

$mythbackend --version
Please attach all output as a file in bug reports.
MythTV Version : v0.27-72-gea5af90-dirty
MythTV Branch : fixes/0.27
Network Protocol : 77
Library API : 0.27.20131021-1
QT Version : 4.8.2
Options compiled in:
 linux profile use_hidesyms using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_mythlogserver using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2

$ mythfrontend --version
Please attach all output as a file in bug reports.
MythTV Version : v0.27-72-gea5af90-dirty
MythTV Branch : fixes/0.27
Network Protocol : 77
Library API : 0.27.20131021-1
QT Version : 4.8.2
Options compiled in:
 linux profile use_hidesyms using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_mythlogserver using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2

Backend log

[...]
2013-11-02 15:09:33.907511 I  MainServer::ANN Playback
2013-11-02 15:09:33.907518 I  adding: mythbox as a client (events: 0)
2013-11-02 15:09:33.918412 I  TVRec[15]: Changing from None to WatchingLiveTV
2013-11-02 15:09:33.921382 I  TVRec[15]: HW Tuner: 15->15
2013-11-02 15:09:33.924213 I  Loaded [data]rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376[fectype][fec0][fec1] for 7014
2013-11-02 15:09:33.924256 E  DTVChan[15](): SetChannelByString(14): Tuning to IPTV URL
2013-11-02 15:09:33.924268 E  TVRec[15]: Failed to set channel to 14. Reverting to kState_None
2013-11-02 15:09:33.924288 I  TVRec[15]: Changing from WatchingLiveTV to None
2013-11-02 15:09:35.550719 I  TVRec[10]: ASK_RECORDING 10 323 0 0
2013-11-02 15:09:35.554564 I  TVRec[11]: ASK_RECORDING 11 323 0 0
2013-11-02 15:09:35.903594 I  TVRec[1]: ASK_RECORDING 1 323 0 0
2013-11-02 15:10:00.138141 I  TVRec[1]: Changing from None to RecordingOnly
2013-11-02 15:10:00.138659 I  TVRec[1]: HW Tuner: 1->1
2013-11-02 15:10:00.151459 N  AutoExpire: CalcParams(): Max required Free Space: 42.0 GB w/freq: 14 min
[...]

mythavtest

$ mythavtest -v audio,playback --loglevel=debug "rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376"
[...]
2013-11-16 12:22:14.325601 I  TV: Init -- begin
2013-11-16 12:22:14.376607 I  TV: Created TvPlayWindow.
2013-11-16 12:22:14.400530 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:22:14.400867 I  TV: DrawUnusedRects() -- end
2013-11-16 12:22:14.584993 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:22:14.585012 I  TV: DrawUnusedRects() -- end
2013-11-16 12:22:14.597298 I  TV: Init -- end
2013-11-16 12:22:14.597427 I  TV: tv->Playback() -- begin
2013-11-16 12:22:14.677283 I  TV: HandleStateChange(0) -- begin
2013-11-16 12:22:14.677320 I  TV: Attempting to change from None to WatchingVideo
2013-11-16 12:22:14.888353 I  FileRingBuf(rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376): OpenFile(rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376, 2000 ms)
2013-11-16 12:22:15.063843 E  No address defined for host: mafreebox.freebox.fr
2013-11-16 12:22:15.094576 E  MythSocket(1c9c880:-1): Failed to connect to (212.27.38.253:6543) Connection refused
2013-11-16 12:22:15.094617 E  RemoteFile::openSocket(control socket): Could not connect to server mafreebox.freebox.fr:6543
2013-11-16 12:22:15.094773 E  FileRingBuf(rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376): RingBuffer::RingBuffer(): Failed to open remote file (rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376)
2013-11-16 12:22:15.095265 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:22:15.095272 I  TV: DrawUnusedRects() -- end
2013-11-16 12:22:15.095318 I  TV: Main UI disabled.
2013-11-16 12:22:15.095329 I  TV: HandleStateChange(0) -- end
2013-11-16 12:22:15.095407 I  TV: tv->Playback() -- end
2013-11-16 12:22:15.095422 I  TV: Entering main playback loop.
2013-11-16 12:22:15.106208 I  ScreenSaverX11Private: DPMS Deactivated 1
2013-11-16 12:22:15.106325 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:22:15.106362 I  TV: DrawUnusedRects() -- end
2013-11-16 12:22:15.106696 I  TV: Exiting main playback loop.
2013-11-16 12:22:15.106706 I  TV: StartTV -- process events 2 begin
2013-11-16 12:22:15.106761 I  TV: StartTV -- process events 2 end
[...]

"2013-11-16 12:22:15.063843 E No address defined for host: mafreebox.freebox.fr" => I tried with IP

$ traceroute mafreebox.freebox.frtraceroute to mafreebox.freebox.fr (212.27.38.253), 30 hops max, 60 byte packets
 1  freeplayer.freebox.fr (212.27.38.253)  3.054 ms  5.001 ms  4.837 ms

$ mythavtest -v audio,playback --loglevel=debug "rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376"
[...]
2013-11-16 12:20:33.978685 I  TV: Init -- begin
2013-11-16 12:20:34.026982 I  TV: Created TvPlayWindow.
2013-11-16 12:20:34.030491 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:20:34.030513 I  TV: DrawUnusedRects() -- end
2013-11-16 12:20:34.190254 I  TV: Init -- end
2013-11-16 12:20:34.190584 I  TV: tv->Playback() -- begin
2013-11-16 12:20:34.282058 I  TV: HandleStateChange(0) -- begin
2013-11-16 12:20:34.282313 I  TV: Attempting to change from None to WatchingVideo
2013-11-16 12:20:34.301769 I  FileRingBuf(rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376): OpenFile(rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376, 2000 ms)
2013-11-16 12:20:34.326432 E  MythSocket(20a5160:-1): Failed to connect to (212.27.38.253:6543) Connection refused
2013-11-16 12:20:34.326584 E  RemoteFile::openSocket(control socket): Could not connect to server 212.27.38.253:6543
2013-11-16 12:20:34.326876 E  FileRingBuf(rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376): RingBuffer::RingBuffer(): Failed to open remote file (rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376)
2013-11-16 12:20:34.327443 I  TV: DrawUnusedRects() -- begin
2013-11-16 12:20:34.327452 I  TV: DrawUnusedRects() -- end
2013-11-16 12:20:34.327513 I  TV: Main UI disabled.
2013-11-16 12:20:34.327532 I  TV: HandleStateChange(0) -- end
2013-11-16 12:20:34.327627 I  TV: tv->Playback() -- end
2013-11-16 12:20:34.327638 I  TV: Entering main playback loop.
2013-11-16 12:20:34.334408 I  ScreenSaverX11Private: DPMS Deactivated 1
2013-11-16 12:20:34.334424 I  TV: DrawUnusedRects() -- begin
[...]

"rtsp://212.27.38.253/fbxtv_pub/stream?namespace=1&service=376" and "rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376" work with VLC

Change History (45)

comment:1 Changed 10 years ago by benoit.heraud@…

I am also affected by this bug

comment:2 Changed 10 years ago by Raymond Wagner

Component: MythTV - HTTP StreamingMythTV - Recording
Milestone: 0.27.1unknown
Owner: changed from cpinkham to danielk
Priority: majorminor

Resetting defaults.

Please do not add "me toos" to trac. Such discussion not directly pertaining to solving the issue belongs on the mailing list.
http://code.mythtv.org/trac/wiki/TicketHowTo#WhatNext

comment:3 Changed 10 years ago by Raymond Wagner

2013-11-16 12:20:34.326432 E  MythSocket(20a5160:-1): Failed to connect to (212.27.38.253:6543) Connection refused
2013-11-16 12:20:34.326584 E  RemoteFile::openSocket(control socket): Could not connect to server 212.27.38.253:6543

Port 6543 is our port for internal communication to the backend. It appears as if you have your ISP's content server configured as your master backend.

comment:4 Changed 10 years ago by nicolas@…

i'm also affected by this bug. I think the mythavtest is meaningless: the last argument is not supposed to be an iptv url.

In my case, i have the same error in the server log: "failed to set channel ...". It seems there's a new table in 0.27 called iptv_channel, and for an unknown reason this table is empty (but my m3u file is not empty).

I tried to manually add an entry in the table (but i have no idea what the 'type' is, so i set it do 'data'), but it doesn't work:

Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: I TVRecEvent tv_rec.cpp:1050 (HandleStateChange?) TVRec[2]: Changing from None to RecordingOnly? Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: I TVRecEvent tv_rec.cpp:3602 (TuningCheckForHWChange) TVRec[2]: HW Tuner: 2->2 Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: I TVRecEvent channelutil.cpp:2099 (GetIPTVTuningData) Loaded [data]rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=203&flavour=sd[fectype][fec0][fec1] for 2005 Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: E TVRecEvent recorders/dtvchannel.cpp:296 (SetChannelByString?) DTVChan[2](): SetChannelByString?(5): Tuning to IPTV URL Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: I TVRecEvent channelutil.cpp:2099 (GetIPTVTuningData) Loaded [data]rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=203&flavour=sd[fectype][fec0][fec1] for 2005 Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: E TVRecEvent recorders/dtvchannel.cpp:296 (SetChannelByString?) DTVChan[2](): SetChannelByString?(5): Tuning to IPTV URL Dec 30 23:52:10 symphonie mythbackend: mythbackend[2551]: E TVRecEvent tv_rec.cpp:3790 (TuningFrequency?) TVRec[2]: Failed to set channel to 5. Reverting to kState_None

Am i missing something ? Why iptv_channel is empty ?

comment:5 in reply to:  3 Changed 10 years ago by snouf@…

Replying to wagnerrp:

2013-11-16 12:20:34.326432 E  MythSocket(20a5160:-1): Failed to connect to (212.27.38.253:6543) Connection refused
2013-11-16 12:20:34.326584 E  RemoteFile::openSocket(control socket): Could not connect to server 212.27.38.253:6543

Port 6543 is our port for internal communication to the backend. It appears as if you have your ISP's content server configured as your master backend.

I changed master port by 6533 (and the "listen port" by 6533 en "status port" by 6534).

I have same error

2013-12-31 16:12:37.191149 E  MythSocket(7f5b007a2020:-1): Failed to connect to (212.27.38.253:6543) Connection refused
2013-12-31 16:12:37.191182 E  RemoteFile::openSocket(control socket): Could not connect to server mafreebox.freebox.fr:6543

Note: I have update mythtv to v0.27-124-gd965061-dirty

comment:6 Changed 10 years ago by stuartm

I think you've misunderstood what Raymond was saying. It would be a very strange coincidence if your IPTV provider is using the exact same port as MythTV when it has hundreds of ports to chose from. Are you _sure_ that 6543 is the correct port?

A google search shows only one relevant match for mafreebox.freebox.fr and 6543 and that is this ticket!

comment:7 Changed 10 years ago by snouf@…

Effectively I did not understand.

I trace the connection with wireshark (by running the video stream in VLC) and I can not find connection with the 6543 port.

Log with wireshark with filter "ip.addr 212.27.38.253 eq"

No.     Time           Source                Src port Destination           Dest port Protocol Length Info
  63001 108.843821000  192.168.0.1           44613    212.27.38.253         rtsp      TCP      74     44613 > rtsp [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=23035588 TSecr=0 WS=128
  63002 108.848369000  212.27.38.253         rtsp     192.168.0.1           44613     TCP      74     rtsp > 44613 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=386321935 TSecr=23035588 WS=64
  63003 108.848468000  192.168.0.1           44613    212.27.38.253         rtsp      TCP      66     44613 > rtsp [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=23035593 TSecr=386321935
  63004 108.848569000  192.168.0.1           44613    212.27.38.253         rtsp      RTSP     228    OPTIONS rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376 RTSP/1.0
  63005 108.853660000  212.27.38.253         rtsp     192.168.0.1           44613     TCP      66     rtsp > 44613 [ACK] Seq=1 Ack=163 Win=15552 Len=0 TSval=386321935 TSecr=23035593
  63006 108.853689000  212.27.38.253         rtsp     192.168.0.1           44613     RTSP     193    Reply: RTSP/1.0 200 OK
  63007 108.853704000  192.168.0.1           44613    212.27.38.253         rtsp      TCP      66     44613 > rtsp [ACK] Seq=163 Ack=128 Win=29312 Len=0 TSval=23035598 TSecr=386321935
  63008 108.853895000  192.168.0.1           44613    212.27.38.253         rtsp      RTSP     254    DESCRIBE rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376 RTSP/1.0
  63009 108.858321000  212.27.38.253         rtsp     192.168.0.1           44613     RTSP/SDP 470    Reply: RTSP/1.0 200 OK
  63028 108.886358000  192.168.0.1           44613    212.27.38.253         rtsp      RTSP     278    SETUP rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376 RTSP/1.0
  63030 108.895181000  212.27.38.253         rtsp     192.168.0.1           44613     RTSP     407    Reply: RTSP/1.0 200 OK
  63031 108.895359000  192.168.0.1           51110    212.27.38.253         32794     RTP      46     Unknown RTP version 3
  63032 108.895388000  192.168.0.1           51111    212.27.38.253         32795     RTCP     46     Source port: 51111  Destination port: 32795
  63033 108.895402000  192.168.0.1           51110    212.27.38.253         32794     RTP      46     Unknown RTP version 3
  63034 108.895421000  192.168.0.1           51111    212.27.38.253         32795     RTCP     46     Source port: 51111  Destination port: 32795
  63035 108.895613000  192.168.0.1           44613    212.27.38.253         rtsp      RTSP     270    PLAY rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=376 RTSP/1.0
  63036 108.896899000  212.27.38.253         51110    192.168.0.1           32794     ICMP     74     Destination unreachable (Port unreachable)
  63037 108.896917000  212.27.38.253         51110    192.168.0.1           32794     ICMP     74     Destination unreachable (Port unreachable)
  63038 108.897663000  212.27.38.253         rtsp     192.168.0.1           44613     RTSP     397    Reply: RTSP/1.0 200 OK
  63039 108.901207000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63043 108.901271000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63052 108.902896000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63056 108.904976000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63057 108.906607000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63058 108.908603000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63059 108.914407000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63060 108.914428000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63061 108.914991000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63062 108.917106000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63063 108.922214000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63064 108.922228000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63065 108.923160000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63066 108.925143000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63067 108.929583000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63068 108.929603000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63069 108.931638000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63070 108.933956000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63086 108.937367000  192.168.0.1           44613    212.27.38.253         rtsp      TCP      66     44613 > rtsp [ACK] Seq=767 Ack=1204 Win=32512 Len=0 TSval=23035682 TSecr=386321940
  63087 108.937514000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63093 108.937678000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63094 108.939841000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63095 108.941629000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63096 108.944055000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110
  63097 108.946134000  212.27.38.253         52026    192.168.0.1           51110     UDP      1370   Source port: 52026  Destination port: 51110

I do not understand why mythavtest trying to connect to the port 6543.

comment:8 Changed 10 years ago by snouf@…

The default rtsp port is 554 so I try specifying the port. I have an other error

$ mythavtest -v audio,playback --loglevel=debug "rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376"
...
2013-12-31 19:26:22.252252 I  FileRingBuf(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376): OpenFile(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376, 2000 ms)
2013-12-31 19:26:22.259108 E  No address defined for host: mafreebox.freebox.fr
2013-12-31 19:26:52.299173 E  MythSocket(c62cb0:59): ReadStringList: Error, timed out after 30000 ms.
2013-12-31 19:26:52.299381 C  Protocol version check failure.
			The response to MYTH_PROTO_VERSION was empty.
			This happens when the backend is too busy to respond,
			or has deadlocked due to bugs or hardware failure.
2013-12-31 19:26:52.299422 E  RemoteFile::openSocket(control socket): Failed validation to server mafreebox.freebox.fr:554
2013-12-31 19:26:52.299722 E  FileRingBuf(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376): RingBuffer::RingBuffer(): Failed to open remote file (rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376)
2013-12-31 19:26:52.301098 I  TV: DrawUnusedRects() -- begin
...

with vlc it work

comment:9 Changed 10 years ago by snouf@…

I found a way to reproduce the bug without connection to "mafreebox.freebox.fr".

Create VOD server with VLC

vlc --ttl 12 -vvv --color -I telnet --telnet-password pwd --rtsp-host 0.0.0.0 --rtsp-port 5554

Open un telnet terminal

telnet localhost 4212
# password is pwd

Create a new channel (for my test video.mpg is a mythtvrecording)

new test vod input video.mpg  mux mp2t enabled

Open the stream rtsp://127.0.0.1:5554/test With vlc player and totem it work With mythavtest I have errors

2014-01-04 14:25:43.998788 E  MythSocket(1397140:59): ReadStringList: Error, timed out after 30000 ms.
2014-01-04 14:25:43.999040 C  Protocol version check failure.
			The response to MYTH_PROTO_VERSION was empty.
			This happens when the backend is too busy to respond,
			or has deadlocked due to bugs or hardware failure.
2014-01-04 14:25:43.999068 E  RemoteFile::openSocket(control socket): Failed validation to server 127.0.0.1:5554
2014-01-04 14:25:43.999355 E  FileRingBuf(rtsp://127.0.0.1:5554/test): RingBuffer::RingBuffer(): Failed to open remote file (rtsp://127.0.0.1:5554/test)

comment:10 Changed 10 years ago by nicolas@…

OK, i found the issue: if you add the port in the URL (:554), it works

rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd

The IPTVChannel::Tune method (which include a big TODO for rtsp) call 'IsValid?' which returns false if the port is not specified.

(btw, i don't know why you guys persisted on using an iptv Url with mythavtest : this is not what mythavtest expects: it expect a local file name or a mythbackend address)

comment:11 Changed 10 years ago by nicolas@…

Well, it has worked only once ... (tried with Live TV )

Now when i retry, it's stuck in "partial lock", even after a restart of mythbackend

comment:12 Changed 10 years ago by snouf@…

I test on the backend I also have a "partial lock"

(TL__) signal 0%

Backend log when I changed to an iptv channel

2014-01-04 19:09:31.923027 I  TVRec[1]: Changing from WatchingLiveTV to None
2014-01-04 19:09:32.002058 I  MainServer::ANN Playback
2014-01-04 19:09:32.002067 I  adding: mythbox as a client (events: 0)
2014-01-04 19:09:32.014366 I  TVRec[15]: Changing from None to WatchingLiveTV
2014-01-04 19:09:32.017046 I  TVRec[15]: HW Tuner: 15->15
2014-01-04 19:09:32.061776 I  Loaded [data]rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376&flavour=sd[fectype][fec0][fec1] for 7014
2014-01-04 19:09:32.102073 I  Loaded [data]rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=376&flavour=sd[fectype][fec0][fec1] for 7014
2014-01-04 19:09:32.103599 N  AutoExpire: CalcParams(): Max required Free Space: 42.0 GB w/freq: 14 min
2014-01-04 19:09:32.135677 I  IPTVSH(mafreebox.freebox.fr::554): run()

For mythavtest I tested it after a post found on the mailing list (for IPTV in Germany I think)

Note: There are some days I subscribe on the mailing list mythtv-dev

comment:13 Changed 10 years ago by nicolas@…

with record logging:

Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: D StreamHandler? recorders/cetonrtsp.cpp:94 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): read: RTSP/1.0 200 OK#015 Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: D StreamHandler? recorders/cetonrtsp.cpp:94 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): read: Cseq: 1#015 Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: D StreamHandler? recorders/cetonrtsp.cpp:94 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): read: Server: fbxrtspd/1.2 Freebox RTSP server#015 Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: D StreamHandler? recorders/cetonrtsp.cpp:94 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): read: Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY#015 Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: D StreamHandler? recorders/cetonrtsp.cpp:94 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): read: #015 Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: W StreamHandler? recorders/cetonrtsp.cpp:133 (ProcessRequest?) CetonRTSP(rtsp://mafreebox.freebox.fr:554/fbxtv_pub/stream?namespace=1&service=203&flavour=sd): Expected CSeq of 1 but got Jan 4 18:44:02 symphonie mythbackend: mythbackend[13287]: E StreamHandler? recorders/iptvstreamhandler.cpp:142 (run) IPTVSH(mafreebox.freebox.fr::554): RTSP interface did not support the necessary options

First theres is a warning, it looks like mythtv expects 'CSeq' and the server sends 'Cseq'. Mythtv could handle this case to avoid the warning.

The real problem comes from the parsing of options:

the failing test is in iptvstreamhandler.cpp:

       if (!(rtsp->GetOptions(options)     && options.contains("OPTIONS")  &&
              options.contains("DESCRIBE")  && options.contains("SETUP")    &&
              options.contains("PLAY")      && options.contains("TEARDOWN")))

the culprit is the split:

        options = _responseHeaders.value("Public").split(",");

the leading spaces are not removed here: we should use

        options = _responseHeaders.value("Public").split(QRegExp(",\\s*"));

instead to remove them. Otherwise 'options' contains " OPTIONS" " SETUP" and so on ...

comment:14 Changed 10 years ago by snouf@…

Ok but ... my knowledge in C/C + + are very poor :D.

Can I mody code before compiling mythtv to test? if so where and what ?

comment:15 Changed 10 years ago by nicolas@…

OK, there was also a bug in session-id handling.

i pushed a commit in my fork on github; i can submit a pull request if it's ok for the mythtv devs.

my repo is here: https://github.com/nniclausse/mythtv/tree/fixes/0.27

the commit is here: https://github.com/nniclausse/mythtv/commit/ddb49fa681353b46e17894b780eb7b6bf4b47fd1

comment:16 Changed 10 years ago by Karl Dietz <dekarl@…>

In f2e0dea9f9a9957186df72c1c60cb3d444abc8d0/mythtv:

add simple unit test for IPTV tuning data

Refs #11949

comment:17 Changed 10 years ago by Karl Dietz <dekarl@…>

In a93e14d3f528328e8e280c54003fb2a4bc4d47aa/mythtv:

change IPTV Url test to consider RTSP without explicit port as valid

Found by Nicolas Niclausse
Refs #11949

comment:18 Changed 10 years ago by snouf@…

Thank you!

I can not test it now but probably Friday

comment:19 Changed 10 years ago by Karl Dietz <dekarl@…>

In 2131558d64e269cb0b700f4faf126e4fca9b2d47/mythtv:

strip whitespace when splitting RTSP OPTIONS

Patch by Nicolas Niclausse
Refs #11949

comment:20 Changed 10 years ago by Karl Dietz <dekarl@…>

In 864bbe0e65c4be9275aac5e1dfb362fd5bf65aab/mythtv:

RTSP session-id is NOT a number but a random string of at least 8 chars

Patch by Nicolas Niclausse
Refs #11949

comment:21 Changed 10 years ago by Karl Egly

Milestone: unknown
Owner: changed from danielk to Karl Egly
Status: newaccepted
Type: Bug Report - GeneralPatch - Bug Fix

comment:22 Changed 10 years ago by snouf@…

to me it works for a few seconds then it freezes mythfrontend

The backend does not return error

the frontend

2014-01-10 15:35:34.556269 N  Player(4): Waited 102ms for video buffers AAAAAAAAAAAAUAAUUUUUuUUuLULAAAAP
2014-01-10 15:35:40.369911 I  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Waited 0.2 seconds for data 
			to become available... 2656 < 32768
2014-01-10 15:35:40.602965 N  Player(4): Waited 101ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:40.706142 N  Player(4): Waited 205ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:40.808958 N  Player(4): Waited 307ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:40.912871 N  Player(4): Waited 411ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.015018 N  Player(4): Waited 513ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.119907 N  Player(4): Waited 618ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.221941 N  Player(4): Waited 720ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.324677 N  Player(4): Waited 823ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.427231 N  Player(4): Waited 926ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.529018 N  Player(4): Waited 1027ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.561577 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:41.632407 N  Player(4): Waited 1131ms for video buffers AAAAAAAAAAUUUUUUUUuUAULAALAAAAAP
2014-01-10 15:35:41.721655 I  TV: Attempting to change from WatchingLiveTV to None
2014-01-10 15:35:41.821783 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:41.866994 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:41.921872 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.021968 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.122064 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.172390 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:42.222154 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.322251 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.422348 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.477791 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:42.522436 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.622533 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.722629 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.783193 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:42.822714 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:42.922808 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.022904 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.088593 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:43.122987 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.223084 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.323182 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.393992 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:43.423265 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.523361 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.623457 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.699390 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:43.723540 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.823630 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:43.923726 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.004784 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:44.023821 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.123914 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.224012 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.310258 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:44.324095 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.424198 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.524297 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.615677 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:44.624379 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.724477 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.824570 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:44.921088 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:44.924652 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.024746 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.124843 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.224943 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.226528 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:45.325042 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.425143 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.525239 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.531870 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:45.625337 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.725432 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.825526 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:45.837300 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:45.925623 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.025720 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.125821 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.142674 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:46.225921 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.326019 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.426118 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.448057 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:46.526216 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.626309 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.726406 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.753457 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:46.826501 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:46.926600 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.026698 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.058863 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:47.126795 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.226899 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.327000 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.364335 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:47.427093 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.527189 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.627288 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.669730 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:47.727376 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.827474 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.927574 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:47.975140 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:48.027663 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.127776 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.227882 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.280543 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:48.327972 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.428062 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.528160 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.585941 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:48.628250 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.728346 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.828439 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:48.891352 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:48.928526 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.028620 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.128721 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.196756 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:49.228813 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.328910 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.429007 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.502155 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:49.529092 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.629175 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.729272 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.807550 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:49.829359 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:49.929455 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.029552 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.112967 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:50.129635 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.229730 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.329825 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.418311 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:50.429907 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.530000 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.630097 W  Player(4): Waited 100ms for decoder to pause
2014-01-10 15:35:50.723704 W  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Taking too long to be allowed to read..
2014-01-10 15:35:50.723717 E  RingBuf(/mnt/mythtv/livetv/7013_20140110143510.mpg): Took more than 10 seconds to be allowed to read, aborting.
2014-01-10 15:35:50.729522 I  Setup Interrompre handler
2014-01-10 15:35:50.729539 I  Setup Complété handler
2014-01-10 15:35:50.811528 I  TV: Changing from WatchingLiveTV to None
2014-01-10 15:35:50.811853 I  TV: Exiting main playback loop.
2014-01-10 15:35:50.812099 I  ScreenSaverX11Private: DPMS Reactivated 1
2014-01-10 15:35:50.829160 N  Resuming idle timer

Also note must indicate the port for it works

comment:23 Changed 10 years ago by snouf@…

Or rather the frontend is frozen for about 10 seconds (it is not possible to change channels)

Video restarts for 1/2 second (without sound) and mythfonrtend displays a black screen.

After that I can change channels, reviving a different channel or the same chain refonction it for a few seconds

I feel that the backend stop playing the stream if it contains errors.

comment:24 Changed 10 years ago by nicolas@…

For me, when a recording starts, everything works OK for 30s, then no more data is coming from the server (a tcpdump shows that). The file size is growing until it reached ~7.5 MB

I used tcpdump with vlc, and it regularly sends these kind of packets to the server :

No.     Time        Source                Destination           Protocol Length Info
   3982 17.443552   192.168.0.13          212.27.38.253         RTCP     102    Receiver Report   Source description   

Frame 3982: 102 bytes on wire (816 bits), 102 bytes captured (816 bits)
Ethernet II, Src: IntelCor_66:f4:48 (24:77:03:66:f4:48), Dst: FreeboxS_b6:8a:68 (00:24:d4:b6:8a:68)
Internet Protocol Version 4, Src: 192.168.0.13 (192.168.0.13), Dst: 212.27.38.253 (212.27.38.253)
User Datagram Protocol, Src Port: 32101 (32101), Dst Port: filenet-pch (32775)
Real-time Transport Control Protocol (Receiver Report)
    10.. .... = Version: RFC 1889 Version (2)
    ..0. .... = Padding: False
    ...0 0001 = Reception report count: 1
    Packet type: Receiver Report (201)
    Length: 7 (32 bytes)
    Sender SSRC: 0x03de05fd (64882173)
    Source 1
Real-time Transport Control Protocol (Source description)
    10.. .... = Version: RFC 1889 Version (2)
    ..0. .... = Padding: False
    ...0 0001 = Source count: 1
    Packet type: Source description (202)
    Length: 6 (28 bytes)
    Chunk 1, SSRC/CSRC 0x3DE05FD
        Identifier: 0x03de05fd (64882173)
        SDES items
            Type: CNAME (user and domain) (1)
            Length: 17
            Text: nocturne.inria.fr
            Type: END (0)
[RTCP frame length check: OK - 60 bytes]

it looks like mythtv does not send these kind of keep alive packets, no (i see nothing with tcpdump, only the udp packets from the server during the first 30sec) ? (i'm not familiar with RTP/RTSP ...)

comment:25 Changed 10 years ago by snouf@…

I confirm I scheduled some recordings. Their duration is 28-29 seconds.

I also tested "Serenity" mode, there are no changes..

"Serenity" mode *: Our ISP offers differents settings.

  • "patate" mode: a good ping and high-speed put with packet error probably (for gammers)
  • "standard" mode the default setting
  • Mode "Serenity" ping and flow a little less good with minimal packet error.

My knowledge does not allow me to be more precise :D

comment:26 in reply to:  description Changed 10 years ago by typo@…

It still does not work as of version 0.27-169-g28b768a. Is there something we can do? Some tests?

comment:27 Changed 10 years ago by snouf@…

0.27-169-g28b768a it's https://github.com/MythTV/mythtv/commits/devel/027candidates branche no ?

on https://forum.mythtv.org/viewtopic.php?uid=87&f=2&t=75&start=0#p258 jyavenard say :

"No... If anything was broken there before, it still will be"

Is it necessary to test? (I haven't test machine is little bit complicated for me)

comment:28 Changed 10 years ago by Karl Egly

Status: acceptedinfoneeded

I have looked over the free.fr API documentation but could not find anything related to the IPTV service. (/freeboxtv on HTTP or /fbxtv_pub on RTSP) To fix the recorder we need to know how it is broken aka how does the freebox want its keepalive. Is it only RTCP RR, as suggested by comment:24, or is that a red herring and we need RTSP keepalive, if so which one?

If anyone can provide some insight into that it would be greatly appreciated. A packet capture from the RTSP session setup until the first RTSP keepalive / RTCP RR is send may be useful, too. Seeing how the freebox player communicates with the box could add some insight, too.

comment:29 Changed 10 years ago by Jonas <snouf@…>

I think http://dev.freebox.fr/sdk/os/ is not for "FreeboxTV" but it for "Freebox OS" an "operating system" installed on the ISP "router" (similar to a DSM for synology NAS). This router is a little more than a router, it also serves as a NAS, IPTV recorder, telephone answering ...

I listen to the traffic between my PC and FreeboxTV server with wireshark. The pcap file is avaialble here: http://gcweb.web4me.fr/ajaxplorer/data/public/aba478.php (~10Mo)

Is that what you need to work on this bug?

comment:30 Changed 10 years ago by Karl Egly

Keywords: rtp rtcp rr added
Status: infoneededassigned
Type: Patch - Bug FixDeveloper Task

Thank you, that is what I was looking for. It appears that the client lets the RTSP session time out (no action within the 30 seconds of timeout that the server communicated) but does send RTCP receiver reports. So adding them may be all that is missing.

The contained playlist is very interesting, too. There appear up to four copies of the same channel, but with different properties. Nothing wrong with that, but they all share the same channel number. e.g. the first channel:

#EXTM3U
#EXTINF:0,2 - France 2 (bas débit)
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=ld
#EXTINF:0,2 - France 2 (HD)
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=hd
#EXTINF:0,2 - France 2 (standard)
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=sd
#EXTINF:0,2 - France 2 (auto)
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201

Btw, some other websites explain how to remote control the Freebox TV. But I could not find anything on the streaming itself.

All patches have been applied. I'm changing this ticket to a task to implement RTCP RR. Patches are appreciated, as always :)

comment:31 Changed 10 years ago by Jonas <snouf@…>

The contained playlist is very interesting, too. There appear up to four copies of the same channel, but with different properties. Nothing wrong with that, but they all share the same channel number. e.g. the first channel:

I confirm they are different quality depending on the quality of the connection (some users do not have enough speed to play the HD streams) sd + ld: 720x576 @ 25fps (I do not know the differance between the two) hd + auto (for me): 1440x1080 @ 25fps

Note that when mythtv scan retain only the last channel. This is not a problem for most users ("auto" is kept) but sometimes it is necessary to purge the playlist where writing http://www.mythtv.org/wiki/Freeiptv_m3u.py by a contributor). If you want I create a bug for this problem but it seems to me a special case and a problem for the playlist (not for mythtv).

comment:32 Changed 10 years ago by Karl Dietz <dekarl@…>

In 3e0f0d81e97db7231ec4d29563b788029e90c609/mythtv:

test m3u playlist parsing with multiple channels with the same channel id

Refs #11949

comment:33 Changed 10 years ago by JYA

As far as I can tell (and remember) there's never been any support to play with mythavtest rtp://, rtsp:// or udp:// urls.

You could only ever record those url using the "Freebox" recorder

comment:34 Changed 10 years ago by JYA

opening rtsp:// url from mythavtest won't work without some work as FFmpeg doesn't have a transport protocol support for it.

list of protocol transport: http://www.ffmpeg.org/ffmpeg-protocols.html

so mythavtest can support rtp:// and srtp:// and tcp:// easily; but that's about it at this stage

comment:35 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: assignedclosed

In 88e0bc07b3d30f18403ea39d070fed6df1c213fb/mythtv:

Rework IPTV and RTSP recorders

Lots of issues fixed and addition of missing (but required) features

  • Add IPv6 support
  • Handle RTCP channel (not 100% sure it’s the right information sent, but it allows to keep alive the connection with some server, and doesn’t impact playback)
  • Handle Keep Alive and maintain the RTSP TCP connection life so the rtsp server doesn’t drop us (seen with VLC rtsp server and FreeBox? IPTV stream)
  • Can use hostnames in URL instead of just IP addresses
  • Proper support of rtsp’s SDP

Fixes #11949

comment:36 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 672c46994d23b4717ae184b8b84e9a911c5d4007/mythtv:

Rework IPTV and RTSP recorders

Lots of issues fixed and addition of missing (but required) features

  • Add IPv6 support
  • Handle RTCP channel (not 100% sure it’s the right information sent, but it allows to keep alive the connection with some server, and doesn’t impact playback)
  • Handle Keep Alive and maintain the RTSP TCP connection life so the rtsp server doesn’t drop us (seen with VLC rtsp server and FreeBox? IPTV stream)
  • Can use hostnames in URL instead of only IP addresses
  • Proper support of rtsp’s SDP

Fixes #11949

comment:37 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 57b64c4af16aedee1608119f8e68ee01e2343d6f/mythtv:

Rework IPTV and RTSP recorders

Lots of issues fixed and addition of missing (but required) features

  • Add IPv6 support
  • Handle RTCP channel (not 100% sure it’s the right information sent, but it allows to keep alive the connection with some server, and doesn’t impact playback)
  • Handle Keep Alive and maintain the RTSP TCP connection life so the rtsp server doesn’t drop us (seen with VLC rtsp server and FreeBox? IPTV stream)
  • Can use hostnames in URL instead of just IP addresses
  • Proper support of rtsp’s SDP

Fixes #11949

comment:38 Changed 10 years ago by Karl Dietz <dekarl@…>

In 7eaeaa34de1223c0fe0b66cb1adfab452d540421/mythtv:

change IPTV Url test to consider RTSP without explicit port as valid

Found by Nicolas Niclausse
Refs #11949

(cherry picked from commit a93e14d3f528328e8e280c54003fb2a4bc4d47aa)

Conflicts:

mythtv/libs/libmythtv/test/test_iptvrecorder/test_iptvrecorder.h

comment:39 Changed 10 years ago by Karl Dietz <dekarl@…>

In d870d54ab3d048088a97f3e159cf4438de884cc5/mythtv:

strip whitespace when splitting RTSP OPTIONS

Patch by Nicolas Niclausse
Refs #11949

(cherry picked from commit 2131558d64e269cb0b700f4faf126e4fca9b2d47)

comment:40 Changed 10 years ago by Karl Dietz <dekarl@…>

In 361b792f2ed767c6641aee7bc9b3aad04032c699/mythtv:

RTSP session-id is NOT a number but a random string of at least 8 chars

Patch by Nicolas Niclausse
Refs #11949

(cherry picked from commit 864bbe0e65c4be9275aac5e1dfb362fd5bf65aab)

comment:41 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 1ae6a1fd64e5721099c9f80f34a6d0ba19f0c614/mythtv:

Rework IPTV and RTSP recorders

Lots of issues fixed and addition of missing (but required) features

  • Add IPv6 support
  • Handle RTCP channel (not 100% sure it’s the right information sent, but it allows to keep alive the connection with some server, and doesn’t impact playback)
  • Handle Keep Alive and maintain the RTSP TCP connection life so the rtsp server doesn’t drop us (seen with VLC rtsp server and FreeBox? IPTV stream)
  • Can use hostnames in URL instead of just IP addresses
  • Proper support of rtsp’s SDP

Fixes #11949

(cherry picked from commit 57b64c4af16aedee1608119f8e68ee01e2343d6f)

Conflicts:

mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp

comment:42 Changed 10 years ago by Jonas <snouf@…>

I tested devel/027candidates (00ddef063742ea6d3265ba08c807a1cd48e31b41) with a freebox everything is good for me. Thank you!

comment:43 Changed 9 years ago by paulh

Milestone: 0.27.1

comment:44 Changed 8 years ago by jonas@…

For about two weeks, at home, the rtsp stream of ISP free.fr work any more on mythtv. I tested Debian stable, mythtv 0.27.6 + e01a961 fixed (21 February 2016) compiled Debian stable mythtv 0.27.5 (debian multimedia) Debian unstable, 0.27.6 + mythtv recent fixed (debian multimedia) I think it comes from ISP side of change but I do not know which. It's work with vlc and tvheadend I do not know what to give as information to help solve the problem.

comment:45 Changed 8 years ago by Karl Egly

Jonas, can you open a new ticket with a network packet capture of a) the failed recording attempt of MythTV and b) a successful start of watching with VLC/TVHeadend?

Note: See TracTickets for help on using tickets.