Capture And Retream A File
#1
Posted 24 December 2012 - 11:25 AM
I know that the question is a quite specific, but maybe someone knows the answer of it.
I want to capture a stream file from one mms remote server and restream it without dumping it onto my server.
What tools I need to achieve that issue. Any ideas, links, etc.... could be help me.
OS's: Centos 6.3 / Red Hat 5 / Centos 5.3
Thanks in advance
#2
Posted 24 December 2012 - 02:09 PM
Edited by Christian F., 24 December 2012 - 02:10 PM.
#3
Posted 27 December 2012 - 10:22 PM
I've got it sorted out, here is my simple script:
Server' side:
#!/bin/bash
NAME='userName'
PASS='userPass'
HIDDEN=`date '+%s'`
TIME=`date '+%Y%m%d'`
curl --cookie-jar cjar --output /dev/null 'http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/'
curl --cookie cjar --cookie-jar cjar --data 'amember_login='${NAME} --data 'amember_pass='${PASS} --data 'login_attempt_id='${HIDDEN} --location \
'http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/'
curl --cookie cjar --output ~/televizia.html 'http://www.djtacho.com/members/televizia.php'
grep -o 'mms://video.djtacho.com/onlineBTV\-hq?token=[a-zA-Z0-9]*' televizia.html > tvFile.txt
while read line; do
cvlc -vvv $line --loop --sout '#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{mux=ts,dst=192.168.1.106,port=8081,sdp=sap://,name="TestStream"}'
done < tvFile.txt
Client' side code:
[jazzman@localhost ~]$ vlc rtp://@:8081
That script works perfectly, but...... there is only one problem!
H.264(codec standard) has a very good size/quality ratio but transcoding is much more cpu consuming.
What I want to do is, to create a multicast group in the same machine (server), which clients could be have specific permitions to this broadcasting without using transcoding at all.
Do you have any idea how to achieve that?
I will continue to search solutions and if I found it I'm going to post my solutions here.
PS: If someone wants to test the script, it could be run it into a linux terminal (it's a record from Wednesday)
Assuming that the ip address to a client machine in the local network is 192.168.1.106
Server:
cvlc -vvv 'mms://67.159.54.219/vod/onlineBTV/[BTV] 2012.12.27 -Thursday- (18-00).wmv?token=cc7c9858d94d3d5b119d6ffbd797e9ce' --sout '#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{mux=ts,dst=192.168.1.106,port=8081,sdp=sap://,name="TestStream"}'
Other machine:
vlc rtp://@:8081
Edited by jazzman1, 27 December 2012 - 10:30 PM.
#4
Posted 28 December 2012 - 10:46 AM
Not right off the bat, no. However, there are two problems to be solved in there:What I want to do is, to create a multicast group in the same machine (server), which clients could be have specific permitions to this broadcasting without using transcoding at all.
Do you have any idea how to achieve that?
- How to set up a multicast server, serving from a third party stream.
- How to set up access lists/control on said streaming server.
The first one should be pretty easy to get down, but will require some research into the software you want to use. It's the second that's going to be the challenge, especially if the software in question does not support access lists in the first place.
#5
Posted 05 January 2013 - 02:45 PM
I've made streaming into my local server in 4 different ways.
To obtain more information about it click here - http://www.videolan....to/en/ch04.html
If someone wants to test my streaming, I've started a song from Michael Jackson (mp3). It worked just fine with a video file too.
For windows users just copy/paste this part of code into IE browser - mms://216.58.61.35:8080
For UNIX one, they could be install a VLC and in Network Media Streaming's tab to paste that: mmsh://216.58.61.35:8080
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












