I've been trying to get vdr-to-vdr (both version 1.4.4) streaming working with streamdev (cvs from last sunday) for the past couple of days. I've tweaked the different settings but can't get the streaming to work. As a side note, http streaming is working without problems, so there's something I've done correctly. Anyhow, when trying to stream vdr-to-vdr, this is what I get on the server side:
Nov 21 18:04:08 remote vdr: [7517] Streamdev: Accepted new client (VTP) 192.168.0.119:37794 Nov 21 18:04:19 remote vdr: [7517] Streamdev: Setting data connection to 192.168.0.119:44312
And this is on the client side:
Nov 21 18:04:06 localhost vdr: [5870] VDR version 1.4.4 started Nov 21 18:04:06 localhost vdr: [5870] loading plugin: ./PLUGINS/lib/libvdr-softdevice.so.1.4.4 Nov 21 18:04:07 localhost vdr: [5870] loading plugin: ./PLUGINS/lib/libvdr-streamdev-client.so.1.4.4 Nov 21 18:04:07 localhost vdr: [5870] loading /home/user/.vdr/video/setup.conf Nov 21 18:04:07 localhost vdr: [5870] ERROR: unknown config parameter: softdevice.Postprocess Method = 0 Nov 21 18:04:07 localhost vdr: [5870] ERROR: unknown config parameter: softdevice.Postprocess Quality = 0 Nov 21 18:04:07 localhost vdr: [5870] loading /home/user/.vdr/video/sources.conf Nov 21 18:04:07 localhost vdr: [5870] loading /home/user/.vdr/video/channels.conf Nov 21 18:04:07 localhost vdr: [5870] loading /home/user/.vdr/video/remote.conf Nov 21 18:04:07 localhost vdr: [5870] reading EPG data from /home/user/.vdr/video/epg.data Nov 21 18:04:07 localhost vdr: [5871] video directory scanner thread started (pid=5870, tid=5871) Nov 21 18:04:07 localhost vdr: [5872] video directory scanner thread started (pid=5870, tid=5872) Nov 21 18:04:07 localhost vdr: [5871] video directory scanner thread ended (pid=5870, tid=5871) Nov 21 18:04:07 localhost vdr: [5872] video directory scanner thread ended (pid=5870, tid=5872) Nov 21 18:04:07 localhost vdr: [5870] no DVB device found Nov 21 18:04:07 localhost vdr: [5870] initializing plugin: softdevice (0.3.1): A software emulated MPEG2 device Nov 21 18:04:07 localhost vdr: [5870] [XvVideoOut]: patch version (2006-11-05) Nov 21 18:04:07 localhost vdr: [5870] [XvVideoOut]: Initialize XShmCreateImage Successful (0xb65bbcd0) Nov 21 18:04:07 localhost vdr: [5870] [XvVideoOut]: Initialize shmget Successful (2949120 bytes) Nov 21 18:04:07 localhost vdr: [5870] [XvVideoOut]: Initialize shmat Successful Nov 21 18:04:08 localhost vdr: [5870] [softdevice-xscreensaver]: xscreensaver not running Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: initialized OK Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: Intel(R) Video Overlay: available ports 73 - 73 Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: grabbed port 73 Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: max area size 1920 x 1080 Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: using area size 736 x 576 Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_COLORKEY XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 66046 [0x000101fe] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_BRIGHTNESS XvGettable XvSettable ( -128 [0xffffff80] - 127 [0x0000007f]) ( 0 [0x00000000] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_CONTRAST XvGettable XvSettable ( 0 [0x00000000] - 255 [0x000000ff]) ( 64 [0x00000040] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_DOUBLE_BUFFER XvGettable XvSettable ( 0 [0x00000000] - 1 [0x00000001]) ( 1 [0x00000001] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA0 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 526344 [0x00080808] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA1 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 1052688 [0x00101010] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA2 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 2105376 [0x00202020] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA3 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 4210752 [0x00404040] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA4 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) ( 8421504 [0x00808080] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XV_GAMMA5 XvGettable XvSettable ( 0 [0x00000000] - 16777215 [0x00ffffff]) (12632256 [0x00c0c0c0] Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XvShmCreateImage Successful (0xb65bc5a8) Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: shmget Successful (0 bytes) Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: shmat Successful Nov 21 18:04:08 localhost vdr: [5870] [XvVideoOut]: XShmAttach rc = 1 (should be OK) Nov 21 18:04:08 localhost vdr: [5870] [softdevice] videoOut OK ! Nov 21 18:04:08 localhost vdr: [5870] [softdevice-audio] Opening alsa device default Nov 21 18:04:08 localhost vdr: [5870] [softdevice-audio] Using alsa AC3 device hw:0,1 Nov 21 18:04:08 localhost vdr: [5870] [softdevice-audio] Device opened! Ready to play Nov 21 18:04:08 localhost vdr: [5870] initializing plugin: streamdev-client (0.3.3-pre3-geni): VTP Streaming Client Nov 21 18:04:08 localhost vdr: [5870] setting primary device to 1 Nov 21 18:04:08 localhost vdr: [5870] SVDRP listening on port 2001 Nov 21 18:04:08 localhost vdr: [5870] setting current skin to "sttng" Nov 21 18:04:08 localhost vdr: [5870] loading /home/user/.vdr/video/themes/sttng-default.theme Nov 21 18:04:08 localhost vdr: [5870] starting plugin: softdevice Nov 21 18:04:08 localhost vdr: [5870] starting plugin: streamdev-client Nov 21 18:04:08 localhost vdr: [5870] reading EPG data from /home/user/.vdr/video/epg.data Nov 21 18:04:08 localhost vdr: [5877] section handler thread started (pid=5870, tid=5877) Nov 21 18:04:08 localhost vdr: [5876] streamdev-client: sections assembler thread started (pid=5870, tid=5876) Nov 21 18:04:08 localhost vdr: [5870] Streamdev: Connected to server 192.168.0.1:2004 using capabilities TSPIDS Nov 21 18:04:08 localhost vdr: [5870] Streamdev: Synchronizing EPG from server Nov 21 18:04:08 localhost vdr: [5873] [VideoOut]: 736x576 [0,0 736x576] -> 1024x576 [118,0 788x576] Nov 21 18:04:08 localhost vdr: [5873] [VideoOut]: 736x576 [0,0 736x576] -> 1024x576 [118,0 788x576] Nov 21 18:04:09 localhost vdr: [5870] remote control softdevice-xv - keys known Nov 21 18:04:09 localhost vdr: [5870] remote control KBD - learning keys Nov 21 18:04:09 localhost vdr: [5880] KBD remote control thread started (pid=5870, tid=5880) Nov 21 18:04:19 localhost vdr: [5870] switching to channel 27 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 18, 78, 254 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 18, 80, 240 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 18, 96, 240 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 20, 112, 255 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 0, 0, 255 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 17, 66, 255 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5870] Streamdev: Filter 16, 64, 255 not available from 192.168.0.119:37794 Nov 21 18:04:19 localhost vdr: [5887] receiver on device 6 thread started (pid=5870, tid=5887) Nov 21 18:04:19 localhost vdr: [5886] transfer thread started (pid=5870, tid=5886) Nov 21 18:04:21 localhost vdr: [5887] Streamdev: Lost connection to 192.168.0.1:2004: Connection timed out Nov 21 18:04:21 localhost vdr: [5887] receiver on device 6 thread ended (pid=5870, tid=5887) Nov 21 18:04:31 localhost vdr: [5873] [VideoOut]: 736x576 [0,0 736x576] -> 1024x576 [118,0 788x576] Nov 21 18:04:31 localhost vdr: [5880] KBD remote control thread ended (pid=5870, tid=5880)
Anybody able to tell from these, what's going wrong? The server side seems awfully quiet is syslog, maybe something wrong there? Anyway to debug this more closely?
Thanks, Juhis
On Wed, 22 Nov 2006 08:26:26 +0200, Juha Pahkala wrote
Anybody able to tell from these, what's going wrong? The server side seems awfully quiet is syslog, maybe something wrong there? Anyway to debug this more closely?
Weird... I assume your network is ok and the server is not too busy? Does it make any difference when you disable EPGSync? Is the client VDR able to reconnect immediately? Are you able to start an HTTP streaming session when the connection timeout occurs?
BTW: You can disable StreamFilters as they are not supported by the server anyway.
You could recompile streamdev with debugging enabled. In the streamdev source directory issue:
make clean; DEBUG=1 make all
Then install the plugins and restart VDR. Debug output is sent to stderr.
Cheers, Frank
Frank Schmirler wrote:
Weird... I assume your network is ok and the server is not too busy? Does it make any difference when you disable EPGSync? Is the client VDR able to reconnect immediately? Are you able to start an HTTP streaming session when the connection timeout occurs?
BTW: You can disable StreamFilters as they are not supported by the server anyway.
You could recompile streamdev with debugging enabled. In the streamdev source directory issue:
make clean; DEBUG=1 make all
Then install the plugins and restart VDR. Debug output is sent to stderr.
Cheers, Frank
Hi Frank,
Thanks for your answer and sorry mine took a while. Anyhow: network is fine and server is idle. disabling EPGSync doesn't make any difference. Usually the client hangs after I close the window and I have to 'kill -9' it. But after killing it, I'm not able to connect to the http server with mplayer, at least not right away.
I compiled both the client and the server with DEBUG enabled, and the logs are attached to this mail. For server, I have one with a successful http connection and one with a failed vdr connection. Can you make anything out of these?
Thanks, juhis
bash:# ./vdr -v /home/veehoo/.vdr/video/ -P 'softdevice -vo xv:' -Pstreamdev-client [softdevice] processing args [softdevice] argv [0] = softdevice [softdevice] argv [1] = -vo vo_argv: xv: [setup-softdevice] alsa ac3Mode set to: 0 [setup-softdevice] alsa AC3 device set to: hw:0,1 [setup-softdevice] alsa device set to: default [setup-softdevice] A/V Offset set to (0) [setup-softdevice] Cropping 0 lines from bottom [setup-softdevice] Cropping 0 columns from left [setup-softdevice] cropping mode set to 0 (none) [setup-softdevice] cropping mode toggle key set to 0 (none) [setup-softdevice] Cropping 0 columns from right [setup-softdevice] Cropping 0 lines from top [setup-softdevice] deinterlace method set to 0 none [setup-softdevice] mainMenu: 1 [setup-softdevice] setting alpha blend mode to pseudo [softdevice] picture mirroring set to 0 (off) [setup-softdevice] pixel format set to (I420) [setup-softdevice] shouldSuspend to: 0 [setup-softdevice] syncTimerMode: sig [softdevice] UseStretchBlitset to off [setup-softdevice] vidBrightness: 50 [setup-softdevice] vidContrast: 25 [setup-softdevice] vidHue: -1 [setup-softdevice] vidSaturation: -1 [setup-softdevice] startup aspect set to (16:9 wide) [softdevice] initializing Plugin [softdevice] Initializing Video Out [softdevice] ffmpeg build(3348736) [XvVideoOut]: osd_image shmid = 983055 [XvVideoOut]: got osd_image: width 1280 height 800, bytes per line 5120 [XvVideoOut]: max area size 1920 x 1080 [XvVideoOut]: using area size 736 x 576 [softdevice] Subplugin successfully opend [softdevice] Video Out seems to be OK [softdevice] Initializing Audio Out [softdevice] Audio out seems to be OK [softdevice] A/V devices initialized, now initializing MPEG2 Decoder ProvidesChannel, Channel=TV1, Prio=0 ReadUntil: Served from Linebuffer: 41, |220 Welcome to Video Disk Recorder (VTP)| IN: |220 Welcome to Video Disk Recorder (VTP)| OUT: |CAPS TSPIDS| ReadUntil: Served from Linebuffer: 33, |220 Capability "TSPIDS" accepted| IN: |220 Capability "TSPIDS" accepted| OUT: |PROV 0 C-0-1-17| ReadUntil: Served from Linebuffer: 22, |220 Channel available| IN: |220 Channel available| prov res = 1, ndr = 1 SetChannelDevice Channel: TV1, LiveView: false connection open select said nothing happened OUT: |TUNE C-0-1-17| ReadUntil: Served from Linebuffer: 18, |220 Channel tuned| IN: |220 Channel tuned| setchanneldevice r=1 OpenFilter OpenFilter OpenFilter OpenFilter OpenFilter OpenFilter OpenFilter SetPid, Pid=512, Type=5, On=1, used=1 connection open select said nothing happened OUT: |ADDP 512| ReadUntil: Served from Linebuffer: 22, |220 Pid 512 available| IN: |220 Pid 512 available| SetPid, Pid=650, Type=6, On=1, used=1 connection open select said nothing happened OUT: |ADDP 650| ReadUntil: Served from Linebuffer: 22, |220 Pid 650 available| IN: |220 Pid 650 available| OpenDvr CloseDvr connection open select said nothing happened connection open select said nothing happened OUT: |PORT 0 192,168,0,119,182,196| error: Connection timed out SetPid, Pid=512, Type=5, On=0, used=0 SetPid, Pid=650, Type=6, On=0, used=0 ProvidesChannel, Channel=MTV3 D, Prio=0 prov res = 0, ndr = 1 ProvidesChannel, Channel=TV1, Prio=0 prov res = 0, ndr = 1 ProvidesChannel, Channel=TV2, Prio=0 prov res = 0, ndr = 1 ProvidesChannel, Channel=MTV3 D, Prio=0 prov res = 0, ndr = 1 ProvidesChannel, Channel=Nelonen D, Prio=0 prov res = 0, ndr = 1 ProvidesChannel, Channel=subtv, Prio=0 prov res = 0, ndr = 1 X connection to :0.0 broken (explicit kill or server shutdown).
#### This gets printed on the console
constructor hsRequest command GET /TS/3 HTTP/1.0 Request command Host: remote:3000 header command User-Agent: MPlayer/1.0rc1-4.1.2 header command Icy-MetaData: 1 header command Connection: close header command process substr: 3 before channelfromstring Apid is 0 after channelfromstring * GetDevice(const cChannel*, int) * ------------------------------- * Found following device: 0x8430b68 (2) * NOT suspended Initializing Remuxer for full channel transfer ca pid: 0 Creating Receiver to respect changed pids Killing live receiver Creating Receiver to respect changed pids OUT: |HTTP/1.0 200 OK| OUT: |Content-Type: video/mpeg| OUT: || streamer start start streamer RIGHT ATTACH LiveReceiver->Activate(1) activate streamer Writer start Desctructing Live streamer stopping streamer RIGHT DETACH LiveReceiver->Activate(0) destructing writer Max. Transmit Blocksize was: 73320 Killing live receiver Desctructing streamer
#### This is in the syslog
Nov 26 16:48:10 remote vdr: [21252] Streamdev: Accepted new client (HTTP) 192.168.0.119:49387 Nov 26 16:48:10 remote vdr: [21821] streamdev-writer thread started (pid=21220, tid=21821) Nov 26 16:48:10 remote vdr: [21825] streamdev-livestreaming thread started (pid=21220, tid=21825) Nov 26 16:48:10 remote vdr: [21826] receiver on device 2 thread started (pid=21220, tid=21826) Nov 26 16:48:10 remote vdr: [21827] TS buffer on device 2 thread started (pid=21220, tid=21827) Nov 26 16:48:15 remote vdr: [21252] client (HTTP) 192.168.0.119:49387 has closed connection Nov 26 16:48:15 remote vdr: [21252] streamdev: closing streamdev connection to 192.168.0.119:49387 Nov 26 16:48:16 remote vdr: [21825] streamdev-livestreaming thread ended (pid=21220, tid=21825) Nov 26 16:48:16 remote vdr: [21827] TS buffer on device 2 thread ended (pid=21220, tid=21827) Nov 26 16:48:16 remote vdr: [21826] buffer stats: 65048 (3%) used Nov 26 16:48:16 remote vdr: [21826] receiver on device 2 thread ended (pid=21220, tid=21826) Nov 26 16:48:16 remote vdr: [21821] streamdev-writer thread ended (pid=21220, tid=21821) Nov 26 16:48:16 remote vdr: [21252] buffer stats: 65424 (1%) used Nov 26 16:48:24 remote vdr: [21252] Streamdev: Accepted new client (HTTP) 192.168.0.119:49388 Nov 26 16:48:24 remote vdr: [21828] streamdev-writer thread started (pid=21220, tid=21828) Nov 26 16:48:24 remote vdr: [21829] streamdev-livestreaming thread started (pid=21220, tid=21829) Nov 26 16:48:24 remote vdr: [21830] receiver on device 2 thread started (pid=21220, tid=21830) Nov 26 16:48:24 remote vdr: [21831] TS buffer on device 2 thread started (pid=21220, tid=21831) Nov 26 16:48:37 remote vdr: [21252] ERROR: read from client (HTTP) 192.168.0.119:49388 failed: Connection reset by peer Nov 26 16:48:37 remote vdr: [21252] streamdev: closing streamdev connection to 192.168.0.119:49388 Nov 26 16:48:37 remote vdr: [21829] streamdev-livestreaming thread ended (pid=21220, tid=21829) Nov 26 16:48:37 remote vdr: [21831] TS buffer on device 2 thread ended (pid=21220, tid=21831) Nov 26 16:48:37 remote vdr: [21830] buffer stats: 60724 (2%) used Nov 26 16:48:37 remote vdr: [21830] receiver on device 2 thread ended (pid=21220, tid=21830) Nov 26 16:48:37 remote vdr: [21828] streamdev-writer thread ended (pid=21220, tid=21828) Nov 26 16:48:37 remote vdr: [21252] buffer stats: 72380 (1%) used
#### This gets printed on the console
OUT: |220 Welcome to Video Disk Recorder (VTP)| OUT: |220 Capability "TSPIDS" accepted| * GetDevice(const cChannel*, int) * ------------------------------- * Found following device: 0x8430b68 (2) * NOT suspended OUT: |220 Channel available| * GetDevice(const cChannel*, int) * ------------------------------- * Found following device: 0x8430b68 (2) * NOT suspended Initializing Remuxer for full channel transfer ca pid: 0 pid streaming mode OUT: |220 Channel tuned| Creating Receiver to respect changed pids OUT: |220 Pid 512 available| Killing live receiver Creating Receiver to respect changed pids OUT: |220 Pid 650 available|
#### This is in the syslog
Nov 26 16:54:00 remote vdr: [21252] Streamdev: Accepted new client (VTP) 192.168.0.119:50356 Nov 26 16:54:00 remote vdr: [21252] Streamdev: Setting data connection to 192.168.0.119:46788
On Sun, 26 Nov 2006 17:21:35 +0200, Juha Pahkala wrote
Thanks for your answer and sorry mine took a while.
No problem - no tech support on weekends anyway ;-)
I compiled both the client and the server with DEBUG enabled, and the logs are attached to this mail. For server, I have one with a successful http connection and one with a failed vdr connection. Can you make anything out of these?
Looks like the VTP data connection is not coming through to your client. vdr2vdr works similar to active FTP. There's one control connection from the client to the server. For the actual video data a second connection is established where the server is the initiator. Most likely the firewall policy on your client silently discards all inbound connections.
Cheers, Frank
Frank Schmirler wrote:
Looks like the VTP data connection is not coming through to your client. vdr2vdr works similar to active FTP. There's one control connection from the client to the server. For the actual video data a second connection is established where the server is the initiator. Most likely the firewall policy on your client silently discards all inbound connections.
Cheers, Frank
Thanks alot for the tech support on weekdays though ;)
You might be right, although I don't know how to properly test it. All I could think of was to try a ssh connection from the server to the client, but that connection attempt hangs forever... strange. I do know it's not a firewall issue, since:
bash:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination
Chain FORWARD (policy ACCEPT) target prot opt source destination
Chain OUTPUT (policy ACCEPT) target prot opt source destination
And I know that sshd is running from this:
bash:~# netstat -putan tcp6 0 0 :::22 :::* LISTEN 7778/sshd
The client machine is a ubuntu edgy machine, pretty standard. I don't understand what it is that's blocking the connection though, since there seems to be no firewall between the machines.
Maybe I'll have to ask around the ubuntu forums for some help... unless there's a linux network specialist here that has an idea what's going on...
thanks again,
juhis
On Mon, 27 Nov 2006 22:51:47 +0200, Juha Pahkala wrote
You might be right, although I don't know how to properly test it. All I could think of was to try a ssh connection from the server to the client, but that connection attempt hangs forever... strange. I do know it's not a firewall issue, since:
To be absolutely sure that it's not iptables you might want to check the nat and mangle tables, too: iptables -t nat -L iptables -t mangle -L
Although it's very unlikely that the server is filtering outbound connections, you should also take a look at the server's iptables configuration. But AFAIK the connect call on the server would rather return with an "operation not permitted" instead of hanging forever.
And I know that sshd is running from this:
bash:~# netstat -putan tcp6 0 0 :::22 :::* LISTEN 7778/sshd
I guess this is just an excerpt from the output? Otherwise your sshd is listening on ipv6 socket only. When you issue this command after opening the streamdev-client you should see a listening socket on a tcp port above 1024 on the client. On the server you should find a connection attempt most likely in state SYN_SENT.
A sniffer might be helpfull to track this one down. At least it could tell you if the SYN packet is actually leaving the server.
Good luck, Frank
Frank Schmirler wrote:
Although it's very unlikely that the server is filtering outbound connections, you should also take a look at the server's iptables configuration. But AFAIK the connect call on the server would rather return with an "operation not permitted" instead of hanging forever.
Hi Frank,
Once again, you are spot-on correct. After some struggling I found out that it indeed was the server that was filtering outbound connections to my lan.... I hadn't noticed it before...
So thanks to you, I now have vdr-to-vdr streaming working! And it works quite well. I've got a couple of things to sort out still, though, but I'll start a new thread on those.
Thanks alot, juhis