Jump to content

Capture And Retream A File


jazzman1

Recommended Posts

Hi friends,

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

Link to comment
Share on other sites

Hey Christian and thanks for reply :)

 

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
Link to comment
Share on other sites

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?

Not right off the bat, no. However, there are two problems to be solved in there:

  1. How to set up a multicast server, serving from a third party stream.
  2. 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.

Link to comment
Share on other sites

  • 2 weeks later...

Hey Christian!

 

I've made streaming into my local server in 4 different ways.

 

To obtain more information about it click here - http://www.videolan.org/doc/streaming-howto/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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.