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
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
kjvnasa
12-15-2015, 10:26 AM
I looked into the second website and the link I found is:
http://www.janjuaplayer.com/embedplayer/cnnkxsm/1/600/400
But what you get when you click on it is
Channel is domain protected. This channel can't be embedded on this domain name.
Hmm.. interesting. Thoughts anyone?
iamsumit
12-15-2015, 10:46 AM
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=8a1d406a630ad872d5b5454fb8801d6202815f7c187b2e8 cf0d2fe2348909dd7" -k -o- | vlc -
But beware the playpath has dynamic variables and they might change and then this link will be unplayable.
kjvnasa
12-15-2015, 07:30 PM
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.
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..flas hVer...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.Su ccess..description...Connection succeeded...data.......version..
3,5,5,2004.. ..clientid.A..>+@....objectEncoding.@......... ...c.........&%.................createStream.@........B.....
..........................._result.@.........?.... .........r.........play............Tcnnkxsm?id=465 49&pk=e6db29d23047ddf29ce5f094dc7651985379f269374c8ed ed8431c01e763126f...@............................. ....................onStatus.............level...s tatus..code...NetStream.Play.Reset..description..C Playing and resetting rtmp://janjua.tv:1935/live/_definst_/cnnkxsm...clientid.A..>+@.... ...............onStatus.............level...status ..code...NetStream.Play.Start..description..=Start ed playing rtmp://janjua.tv:1935/live/_definst_/cnnkxsm...clientid.A..>+@...
isFastPlay....timecodeOffset.. 36741510L.. E..........|RtmpSampleAccess..........,........onS tatus...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
iamsumit
12-15-2015, 08:19 PM
Watch this perhaps - https://www.youtube.com/watch?v=8PuUnQCS7DQ
biezom
12-16-2015, 02:22 AM
hi
two dynamic variable
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=4bd7d90713b155409601c8221bdf43ecdb7a93d7467093f 301b9d726d1b1653e" -o video.flv
1) http://www.janjuapublisher.com:1935/loadbalancer
2) you can download the source of the pageUrl (need Referer header)
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
<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=4bd7d90713b155409601c8221bdf43ecdb7a93d7467093f 301b9d726d1b1653e');
so.write("flashcontent");
it's possible to write php code or use LiveStreamsPro on kodi to get them automatically
kjvnasa
12-16-2015, 06:08 PM
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?)
biezom
12-16-2015, 06:31 PM
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
<?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";
?>
vBulletin® , Copyright ©2000-2025, Jelsoft Enterprises Ltd.