|
Technology Forums: FTA, Satellite, Cable, Home Media, Hardware & Computers
|
|
|
|
||||||
| Register | Members List | Search | Search | Today's Posts | Mark Forums Read |
| Satellite Help & Support Anything satellite related |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Jan 2007
Posts: 541
Thanks: 0
Thanked 0 Times in 0 Posts
|
Calling Dreambox Linux (Enigma) gurus!
I need to write a script for streamts, which should do the following: 1. Listen to range of ports (say, 10000-10100) 2. Map lookup table in accordance with port requested 3. Issue streamts command according to lookup table. In short, if request came in form of: h**p://192.1.1.1:10000 that means user want to stream channel BBC 1 and issue then issue command in such format: streamts 192.1.1.2 10000 <VID> <AID> where: 192.1.1.1 is IP address of Dreambox 192.1.1.2 is IP address of stream recipient VID is BBC 1 Video ID AID is BBC 1 Audio ID Similar for other channels, so for BBC 2 it should be streamts 192.1.1.2 10001 <VID> <AID> and h**p://192.1.1.1 10001 This way, it should also switch channel according to port number (hence lookup table). Any ideas on how to do this? Do you know some Dreambox Linux forum where I can get help with it? |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
|
Hi T'Rookie, I am not quite sure what you are trying to do here. The Dreambox can only receive/pass on one channel at a time and that can be done by by means of VLC/Dreamview or similar. Are the requests being sent from local lan connected pcs or via internet connections?
__________________
Dreambox 800 HD; Dreambox 7000s + VBox + Channel Master 1.2 with 36v actuator CM120 feedhorn and Invacom .3 LNB Skystar 2 PCI card with links to my Dreambox If you like what you see here, tell your friends.
|
|
|
|
|
|
#3 (permalink) |
|
Senior Member
Join Date: Jan 2007
Posts: 541
Thanks: 0
Thanked 0 Times in 0 Posts
|
I know about 1 channel limitation
This is not the issue.The problem is that I want to stream video from Dreambox/TM9100 to my UPnP AV player (DLINK DSM-320RD). To do so, I installed Twonkyvision for DM7020 and forced it to accept VLC stream. Unfortunately, Twonky only understands VLC links in following format: h**p://<IP>:<PORT> whether Dreambox is outputting video via following command: h**p://<IP>:31339/0,<VID>,<AID> ATM I have to run VLC on my PC, which is just redirecting video from Dreambox to er... Dreambox (Twonkyvision on Dreambox, to be precise). Then my UPNP player picks it up. But the whole process is awkward and I am trying to simplify it. BTW, Dreambox video on UPnP player looks great ![]() |
|
|
|
|
|
#4 (permalink) |
|
Super Murderator
Join Date: Nov 2005
Location: Brighton
Posts: 10,633
Thanks: 3
Thanked 64 Times in 37 Posts
|
Don't really do Linux scripts, but of course it is possible to do what you want, assuming you can:
Use the standard hooks to initiate the background task, either on demand or at startup Write the code to listen to the requests coming in and capture both the port number requested and the requestor's IP address, assuming that this isn't passed as a parameter. Manually store the static lookup data in some kind of datastore - what about an .xml file? This would obviously have to be indexed by port number and contain all the PID data for each channel. Write the code to build and execute the streamts command using the requestor's IP and tabled PID data Put something in place to kill the task when it's done and cleanup Can't help any more than that, as I don't really write complex scripts, and I sure don't know much about .ts streaming more than the basic VLC parameterised jobbie.
__________________
Dreambox 7000, Skystar2 PCI, Skystar USB, Fibo 90cm on Moteck SG2100, Triax TD110 multi-LNB. Sky + ART cards. 45.0°E - 58.0°W |
|
|
|
|
|
#5 (permalink) |
|
Senior Member
Join Date: Jan 2007
Posts: 541
Thanks: 0
Thanked 0 Times in 0 Posts
|
Thanks for reply.
It looks like it should be possible to change /etc/services to include table of ports and streamts entries. Then to change inetd.conf to include actual commands to call the streamts with VID/AID parameters. If this article is right, it should be pretty easy task to do Of course, reality might have nothing to do with the article, but I'll give it a try. |
|
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Jan 2007
Posts: 541
Thanks: 0
Thanked 0 Times in 0 Posts
|
Dammit! The file system is read-only and I forgot about it!
Looks like the only way forward is to obtain source code and recompile the whole image... |
|
|
|
|
|
#7 (permalink) |
|
Super Murderator
Join Date: Nov 2005
Location: Brighton
Posts: 10,633
Thanks: 3
Thanked 64 Times in 37 Posts
|
The rights to the file system can be set as you wish, and the script doesn't have to be compiled? :?
__________________
Dreambox 7000, Skystar2 PCI, Skystar USB, Fibo 90cm on Moteck SG2100, Triax TD110 multi-LNB. Sky + ART cards. 45.0°E - 58.0°W |
|
|
|
|
|
#9 (permalink) |
|
Junior Member
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
Ok, I know you posted a long time ago but I have half solved it so I thought I'd post. My scripting is not good so anyone should be able to improve onthis but it works for me.
First off you need a script. stream.sh #!/bin/sh # Make web interface change to the correct channel (junks outputs and errors) n.b. Change path to correct one. wget -q http://localhost/cgi-bin/zapTo?path=...1:c00000:0:0:0: > /dev/null 2>&1 sleep 2 #starts streamts passinng in Program Stream switch, reads (stdin) from file /usr/sbin/streamts -ps < pids.txt exit 0 N.B. This script needs a lot more work , like checking if streamts is already initated and killing it first, but it'll get you going.. ------------- Next you need the pids.txt, took me a while to figure out as it must have the following format. The 2 pids I have set up are in the first line 0xa5,0x65.. GET /0xa5,0x65 HTTP/1.1 Host: 192.168.2.101:31320 User-Agent: VLC media player - version 0.8.6b Janus - (c) 1996-2007 the VideoLAN team Range: bytes=0- Icy-MetaData: 1 Connection: Close Then you need to add a line like this to the inetd.conf 313320 stream tcp nowait /etc/stream.sh Then: killall inetd Then: inetd Finally the dreambox need to have localhost specified as a trusted source, you can do this though the web interface..oh and of course chmod the script to 755. Now just open VLC and http: Dreambox:31320 Works well on my DM500+ running Gemini 4.4 flipit |
|
|
|