PDA

View Full Version : Iptables redirect doe not seem to work


francus
10-06-2015, 08:40 PM
Fedora terminal:
[user@grab2 ~]$ sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
[user@grab2 ~]$ rtmpsrv
RTMP Server v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935


But after that nothing happens even if I refresh the firefox tab here https://www.rt.com/on-air/rt-america-air/

Also I can see the video as usual on firefox, but this is not expected to work this way, I understand

same result with rtmpsuck

biezom
10-06-2015, 10:04 PM
Fedora terminal:
[user@grab2 ~]$ sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
[user@grab2 ~]$ rtmpsrv
RTMP Server v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935


But after that nothing happens even if I refresh the firefox tab here https://www.rt.com/on-air/rt-america-air/

Also I can see the video as usual on firefox, but this is not expected to work this way, I understand

same result with rtmpsuck


not rtmp protocol but hls protocol (.m3u8)

peterpan
10-06-2015, 10:12 PM
Juts adding to what biezom mentioned above, here are the resolution available for this stream...You can choose the one that's best for your system...(i.e. the one that plays smoothly w/o too much buffering)

https://rt-a.akamaihd.net/ch_04@325608/master.m3u8

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=119000,RESOLUTION=428x240,CODECS="avc1.66.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_240p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=119000,RESOLUTION=428x240,CODECS="avc1.66.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_240p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=255000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_320p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=255000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_320p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=442000,RESOLUTION=854x480,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_480p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=442000,RESOLUTION=854x480,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_480p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=519000,RESOLUTION=1280x720,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_720p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=519000,RESOLUTION=1280x720,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_720p_av-b.m3u8?sd=10&rebase=on

francus
10-07-2015, 06:19 AM
Juts adding to what biezom mentioned above, here are the resolution available for this stream...You can choose the one that's best for your system...(i.e. the one that plays smoothly w/o too much buffering)

https://rt-a.akamaihd.net/ch_04@325608/master.m3u8

Many thanks Peterpan. Where did you find this address for my stream? Not with rtmpsuck because it is not rtmp, so?


#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=119000,RESOLUTION=428x240,CODECS="avc1.66.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_240p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=119000,RESOLUTION=428x240,CODECS="avc1.66.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_240p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=255000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_320p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=255000,RESOLUTION=640x360,CODECS="avc1.77.30, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_320p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=442000,RESOLUTION=854x480,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_480p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=442000,RESOLUTION=854x480,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_480p_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=519000,RESOLUTION=1280x720,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_720p_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=519000,RESOLUTION=1280x720,CODECS="avc1.640029, mp4a.40.2"
http://rt-lh.akamaihd.net/i/ch_04@325608/index_720p_av-b.m3u8?sd=10&rebase=on

These seem commands to record the stream, but do not know what this EXTM3U is.

Also the above stream is only an example I was trying to record, but what I really want to grab are webinars which will be on-line only at the last minute. So how can I know which stream are they transmitting, which tool to use to grab, and be able to get everything working in a short time? It seems impossible Peterpan or not?

peterpan
10-07-2015, 09:26 AM
Wireshark would work too, you just have to look for '.m3u8' string (see img1);) and manually tweak it to get the original "master" stream . You can also install and enable a simple Firefox addon, called HttpFox, play the stream and search for '.m3u8' string...(see img2) ;)
As for the webinars, since you don't have an example, you'll just have to try to find the correct string on the fly. I'm sure wireshark and HttpFox, will have it.. Cheers!

img1
http://i.imgur.com/XTTQlcu.png

img2
http://i.imgur.com/6CjmzGh.png

francus
10-07-2015, 12:14 PM
Impressive!!:eek: Many thanks

apart rtmp and m3u8 are there other streams usable for webinars?