Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-15-2015, 06:04 PM
Koze Koze is offline
Member
 
Join Date: Sep 2015
Posts: 35
Koze is on a distinguished road
Default

How to re-stream CNN using ffmpeg


I would like to be able to re-stream CNN news using ffmpeg. The stream can be located here (I would like to get stream with the highest resolution).

http://www.livenewschat.eu/top/

Or

http://www.zahitvstation.com/watch-cnn-usa-live

I have tried this
Code:
ffmpeg -re -i "rtmp://h.cdn.newschat.tv/edge" -f "WIN 19,0,0,226" -W "http://newschat.tv/player.swf" -p "http://www.livenewschat.eu/top/" -y "cnn_live" -f flv rtmp://live.xxxxxxxxxxxxxxxxxx
but it will not work.

Thank you,

koze

Last edited by Koze : 11-15-2015 at 08:36 PM.
Reply With Quote
  #2  
Old 12-15-2015, 11:26 AM
kjvnasa kjvnasa is offline
Junior Member
 
Join Date: Sep 2015
Posts: 10
kjvnasa is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


I looked into the second website and the link I found is:
Code:
http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400
But what you get when you click on it is
Code:
Channel is domain protected. This channel can't be embedded on this domain name.
Hmm.. interesting. Thoughts anyone?
Reply With Quote
  #3  
Old 12-15-2015, 11:46 AM
iamsumit iamsumit is offline
Member
 
Join Date: Dec 2015
Posts: 72
iamsumit is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


Code:
rtmpdump -r "rtmp://77.92.76.192/live" -a "live" -f "MAC 20,0,0,228" -W "http://www.janjuaplayer.com/resources/scripts/eplayer.swf"  -p "http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400" --live -C S:OK -y "cnnkxsm?id=46549&pk=8a1d406a630ad872d5b5454fb8801d6202815f7c187b2e8cf0d2fe2348909dd7" -k -o-  | vlc -
But beware the playpath has dynamic variables and they might change and then this link will be unplayable.
Reply With Quote
  #4  
Old 12-15-2015, 08:30 PM
kjvnasa kjvnasa is offline
Junior Member
 
Join Date: Sep 2015
Posts: 10
kjvnasa is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


Hey thanks for your quick answer. I checked over all the information and I now have a general idea of how you got it. Unfortunately by the time i got it the "token" changed so i took the challenge upon myself and were searching myself. The thing is I am unsure of how to enter all the information i found from the packets into TCP.
Here's a fragment of the packet.
Code:
8...\.bE....*......ORc..)..8..}..W@.U..h.g9.#..g ...7....r.RF..iR.3..>.`d.........,.$....v.. .fL._<
...adw
 ..K\......<.A	...X..y...MJZM...].....&...V.4.~o!H.(...Zi3........g..A"oq...6.a.....d..@.j:....b..!.`.nr.../.]X}.Jx..:.....MP=...........47.j.E......>.#.o.../...m.......@(>..{.e...=
(dI....u....;....
.w.C ...+ b).`. l.....}....`...
..D.f.......j...=.*K....y.....RF.	.%d|$.....).g.*U.^..7`....WH.r=........r....P....:s-1.).	,.'.1W3....
. q..V@....}..s..2UbZ...6g..p..d...HW$.b.V.v..}f,$s...@xV>...Xb..6...<.O.P..l...'i.`z...AR.....b.i.2j.y.YeN.av.....&...?.C.s..Q;....)Qi..|...W.	....<......j........connect.?..........app...live..flashVer...WIN 20,0,0,228..swfUrl..9http://www.janjuaplayer.com/resources/scripts/eplayer.swf...tcUrl...rtmp://46.28.48.116/live..fpad....capabilities.@m........audioCodecs.@.........videoCodecs.@o.......
videoFunction.?..........pageUrl..9http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400..objectEncoding.@.........	...OK_." ..GY.0..=.Q 	..V.......x....l.a:#I....N...4J...R..g..'8..+.m.............R...e6}../.7C.+..I.}L\h+j.4..1G&..`
.NV.Z..G..g...\.e
..).......	......;...4.............&%..............&%..................................................._result.?..........fmsVer...FMS/3,5,5,2004..capabilities.@?........mode.?.........	...level...status..code...NetConnection.Connect.Success..description...Connection succeeded...data.......version..
3,5,5,2004..	..clientid.A..>+@....objectEncoding.@.........	...c.........&%.................createStream.@........B.....
..........................._result.@.........?.............r.........play............Tcnnkxsm?id=46549&pk=e6db29d23047ddf29ce5f094dc7651985379f269374c8eded8431c01e763126f...@.................................................onStatus.............level...status..code...NetStream.Play.Reset..description..CPlaying and resetting rtmp://janjua.tv:1935/live/_definst_/cnnkxsm...clientid.A..>+@....	...............onStatus.............level...status..code...NetStream.Play.Start..description..=Started playing rtmp://janjua.tv:1935/live/_definst_/cnnkxsm...clientid.A..>+@...
isFastPlay....timecodeOffset..	36741510L..	E..........|RtmpSampleAccess..........,........onStatus...code...NetStream.Data.Start..	............. ....E.........
onMetaData...author....	copyright.....description.....keywords.....rating.....title....
presetname...Custom..creationdate...Tue Dec 15 07:08:30 2015
..videodevice...Conexant Polaris Video Capture.	framerate.@4........width.@y........height.@l........videocodecid...avc1.
videodatarate.@r........avclevel.@?.......
avcprofile.@P........videokeyframe_frequency.@.........audiodevice...Conexant Polaris Video Capture..audiosamplerate.@........
audiochannels.@.........audioinputvolume.@R........audiocodecid....mp3.
audiodatarate.@X........	......6	..........B....."gB...T...
.......q.......F0....	.P...h.5 F......	W......@.	...........@.e...:..M....... . N..]..).m....p.Y.........ph......qDa.._........	..
...(P5... .6 X...<....(a..............
......	.)...}....<,.	......h.n.n...` D..)...~.i..{....`jd$.Af.@....`.{..H.n.......s..9...
"i>[	..W.o....@..<..<....p...s.y..y.;:.b....@.......URd...9.m|&.......J.......[.}....p....ye.....[m.2B...4..7.....`...n.o{].M@.7A.....{......D..."3.{x.Vs.}..l.+...u.8......E..q.].?..JJ.K.eK.......sUU..M.FK......L...
... 0.(...P@.Q}.N.@l...E1..._..F...2:.7^PwN......K....].....u.K..2|.|..L....rL-.. .L....X.
....k.18..jt..%..F....D.......[&...;C.|}_. ..@..Zb...[7........XI....5....k.......t..siB.gUZA...4..94.......=4.....g....j..|.l.S..}....
..fd...E_..i.?N.a@.....m...]2o._....H......=.....Ysiu.\K|..m.....</,U..m...m.............
.-.f...AV.)x..,UP.:E....li......{.J.. s..#@.9...H...~\...<....y..7.y.....`4..f"
a....;..,2.p!$...w.vu.vvvyggg.p.....I4....l*H..D........U..	........m...g.q...W....=....n.R@.z3...............www.(.o......$..*....JH_m......8);..?[}C.#.........g..4(..=. ....N..."	?...4........k.}...N...o..X....yQ.E...j.l.:.... .........n)......u.....$&5>...	.oS..o+@Y0T...w..BV0b.I~.|.......&E.....X.}4.7#.....X.n./BU.@.zKL%pV_....
?.,(.....7&9.S..%<..(....*.4..g..T`.....O:..S....6
.D\....2....H..c.r..N..{........	.*k
.......{p..+!.4...q.0....,............sm.4........{.7........0.,..;oo.................p..l;..{..vWVM....p.} .'.H#I.....s.....jDs..+.....C.I."..U....m..L.m...(.......Cu
.....M5...o....4.....>.P..t....?...e.D!..4...D(....>.
.o......
l.d..Q3v.......Rf.La..7.F..0..1...%h..^	 ....g......y._}Oi...C...$.I.n.{N\r.2.Y.{.O"o..h..h...$..c.......
..8.$w.........#..G.,O........p.....;-..........3v....}...z.2e....2.....#.&s.!)...@P.....x0.3).1.......'....K...#.`...................m...d.C.{}4....L
K...M?.Du.........\c.....C.........\.e.I:.8....L....Oc......{6..R.p.m.9.8s.w.....m...H(.Qc....U.B9!....V.....g....\G......z....nJ... %.
..f..=a.r ..>2..0..5...[.._................-"Y...-:@0...0....
So from what i see there i managed to see where you got that information from... my question is now how would i enter that to play in vlc? Like how would i put all the parts together?
Thanks again
Matthew
Reply With Quote
  #5  
Old 12-15-2015, 09:19 PM
iamsumit iamsumit is offline
Member
 
Join Date: Dec 2015
Posts: 72
iamsumit is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


Watch this perhaps - https://www.youtube.com/watch?v=8PuUnQCS7DQ
Reply With Quote
  #6  
Old 12-16-2015, 03:22 AM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


hi
two dynamic variable

Code:
rtmpdump -r "rtmp://89.248.171.23/live" -a "live" -f "MAC 20,0,0,228" -W "http://www.janjuaplayer.com/resources/scripts/eplayer.swf"  -p "http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400" --live -C S:OK -y "cnnkxsm?id=46549&pk=4bd7d90713b155409601c8221bdf43ecdb7a93d7467093f301b9d726d1b1653e"  -o video.flv
1)
Code:
http://www.janjuapublisher.com:1935/loadbalancer
2) you can download the source of the pageUrl (need Referer header)
Code:
livestreamer --http-header "Referer=http://www.zahitvstation.com/"   "httpstream://http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400" best -o source.txt
in source.txt file you can find your pk variable

Code:
<script type="text/javascript">
                    var so = new SWFObject("/resources/scripts/eplayer.swf", "eplayer", "600", "400", "9");
                    so.addParam('allowfullscreen','true');
                    so.addParam('allowscriptaccess','always');
                    so.addParam('wmode','transparent');
                    so.addParam('FlashVars', 'id=46549&s=cnnkxsm&g=1&a=1&l=&ea=&pk=4bd7d90713b155409601c8221bdf43ecdb7a93d7467093f301b9d726d1b1653e');
                    so.write("flashcontent");

it's possible to write php code or use LiveStreamsPro on kodi to get them automatically
Reply With Quote
  #7  
Old 12-16-2015, 07:08 PM
kjvnasa kjvnasa is offline
Junior Member
 
Join Date: Sep 2015
Posts: 10
kjvnasa is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


Thanks for your answer. I tried everything you wrote and it works perfectly. You got me all curious when you said you could write a script to make it update automatically... Is it hard to do? How would i go about doing this?(where would i start?)
Reply With Quote
  #8  
Old 12-16-2015, 07:31 PM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

Re: How to re-stream CNN using ffmpeg


Quote:
Originally Posted by kjvnasa View Post
Thanks for your answer. I tried everything you wrote and it works perfectly. You got me all curious when you said you could write a script to make it update automatically... Is it hard to do? How would i go about doing this?(where would i start?)
hi

example of php script

Code:
<?php
$opts1 = array(
  'http'=>array(
    'method'=>"GET",
    'header'=>"Referer: http://www.zahitvstation.com/\r\n" .
		"User-Agent: Mozilla/5.0 (A (X11; Linux i686; rv:40.0) Gecko/20100101 Firefox/40.0 Iceweasel/40.0.3"              
  )
);

$source1= file_get_contents('http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400', false, stream_context_create($opts1));
preg_match("/(pk=.*)'/", $source1, $pk);
echo "$pk[1]\n";

$source2= file_get_contents('http://www.janjuapublisher.com:1935/loadbalancer');
preg_match("/redirect=(.*)/", $source2, $ip);
echo "$ip[1]\n";

echo "Starting vlc with rtmpdump...\n\n";
	echo shell_exec("rtmpdump -r \"rtmp://$ip[1]/live\" -a live -f \"LNX 19,0,0,207\" -W \"http://www.janjuaplayer.com/resources/scripts/eplayer.swf\" -p \"http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400\" --live -C S:OK -y \"cnnkxsm?id=46549&$pk[1]\" | vlc -  &");
	echo "Done.\n";

?>
Reply With Quote
Reply Post New Thread
Tags:



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 07:33 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons