PDA

View Full Version : ERROR: RTMP_ReadPacket, failed to read RTMP packet header


nostromo
10-06-2014, 03:40 PM
I'm trying to receive live stream video from a site of a regional TV company (http://kuban24.tv/tv/).
I run rtmpdump -v -r rtmp://ntk-origin2.cdn.ngenix.net:1935/live/_definst_/9tv-orb_ -W http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf -p http://kuban24.tv/tv/ -z
with -z option and I get ERROR: RTMP_ReadPacket, failed to read RTMP packet header.
What's wrong?

troller12
10-06-2014, 04:11 PM
Your datas are wrong.Also your playpath is not complete.Try this below.
-v
-r "rtmp://ntk-live.cdn.ngenix.net/slive/_definst_/"
-a "slive/_definst_/"
-W "http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf"
-y "mp4:9tv-orb?t=1412632809&h=wHR0kJM1683OpDp8ZLxV4Q=="
-o "out.flv"

greetz

nostromo
10-06-2014, 04:31 PM
Your datas are wrong.Also your playpath is not complete.Try this below.
-v
-r "rtmp://ntk-live.cdn.ngenix.net/slive/_definst_/"
-a "slive/_definst_/"
-W "http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf"
-y "mp4:9tv-orb?t=1412632809&h=wHR0kJM1683OpDp8ZLxV4Q=="
-o "out.flv"

greetz
Another error: Closing connection: NetStream.Play.StreamNotFound

troller12
10-06-2014, 04:41 PM
Yes you need to refresh the playpath which is dynamic.Just reload the site to get the new session playpath.
-y "mp4:9tv-orb?t=1412635103&h=/p3er68fn+zbn9wbschbxg=="
This part below...
?t=1412635103&h=/p3er68fn+zbn9wbschbxg==
...before it was...
?t=1412632809&h=whr0kjm1683opdp8zlxv4q==
greetz

nostromo
10-07-2014, 12:54 AM
Thank a lot for your advice. It works. I add curl and grep subcommands on my Linux system for extract current dynamic part and it's successful:
rtmpdump -v -r "rtmp://ntk-live.cdn.ngenix.net/slive/_definst_/" -a "slive/_definst_/" -W "http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf" -y "$(curl -s http://kuban24.tv/tv/ | grep -o "mp4:9tv-orb[^\"]*")"
Could you help me again with other site (http://ru.parom.tv/ru/1tv)? I use the same way with dynamic part detection,
rtmpdump -v -r "rtmp://ua4.parom.tv:1935/stream/" -a "stream/" -W "http://ru.parom.tv/player.swf" -p "http://ru.parom.tv/ru/1tv" -y "$(curl -s http://ru.parom.tv/ru/1tv | grep -Po "file=\K[^\&]*")"
but I get the same error RTMP_ReadPacket, failed to read RTMP packet header. What's wrong?
P.S. Sorry for my bad English.

nostromo
10-08-2014, 01:23 PM
Could you help me again with other site (http://ru.parom.tv/ru/1tv)? I use the same way with dynamic part detection,
rtmpdump -v -r "rtmp://ua4.parom.tv:1935/stream/" -a "stream/" -W "http://ru.parom.tv/player.swf" -p "http://ru.parom.tv/ru/1tv" -y "$(curl -s http://ru.parom.tv/ru/1tv | grep -Po "file=\K[^\&]*")"
but I get the same error RTMP_ReadPacket, failed to read RTMP packet header. What's wrong?
P.S. Sorry for my bad English.
I already decompiled http://ru.parom.tv/player.swf via ffdec (http://www.free-decompiler.com/flash/), but there's not SecureToken in it. Other ideas how can I get this stream? What's wrong? Why I get ERROR: RTMP_ReadPacket, failed to read RTMP packet header? Please help me.

hasomaso
10-08-2014, 01:35 PM
works fine...!

rtmpdump -v -r "rtmp://ntk-live.cdn.ngenix.net/slive/_definst_/" -a "slive/_definst_/" -f "WIN 15,0,0,167" -W "http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf" -p "http://kuban24.tv/tv/" -y "mp4:9tv-orb?t=1412796614&h=5r5M83V9SAfnxxcBx9/z4g==" -o "output.flv"

RTMPDump v2.4 GIT-2014-07-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Sat Oct 04 17:42:40 2014
INFO: videodevice AVerMedia BDA Analog Capture
INFO: framerate 25.00
INFO: width 448.00
INFO: height 354.00
INFO: videocodecid avc1
INFO: videodatarate 650.00
INFO: avclevel 31.00
INFO: avcprofile 77.00
INFO: videokeyframe_frequency 5.00
INFO: audiodevice Realtek HD Audio Input
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: audioinputvolume 22.00
INFO: audiocodecid .mp3
INFO: audiodatarate 128.00
5748.160 kB / 63.48 sec

http://i.imgur.com/fpi0hqT.png

nostromo
10-08-2014, 01:53 PM
works fine...!

rtmpdump -v -r "rtmp://ntk-live.cdn.ngenix.net/slive/_definst_/" -a "slive/_definst_/" -f "WIN 15,0,0,167" -W "http://kuban24.tv/bundles/frontend/js/flowplayer-3.2.5.swf" -p "http://kuban24.tv/tv/" -y "mp4:9tv-orb?t=1412796614&h=5r5M83V9SAfnxxcBx9/z4g==" -o "output.flv"
.........

It works well, but I say about another site (http://ru.parom.tv/ru/1tv) with the same error (my previous posts)

hasomaso
10-08-2014, 02:23 PM
playpath line change every seconds that is the problem..!

rtmpdump -v -r "rtmp://ua4.parom.tv:1935/stream/" -a "stream/" -f "WIN 15,0,0,167" -W "http://ru.parom.tv/player.swf" -p "http://ru.parom.tv/ru/1tv" -y "stream237?87" -o "output.flv"

RTMPDump v2.4 GIT-2014-07-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: Server NGINX RTMP (github.com/arut/nginx-rtmp-module)
INFO: width 704.00
INFO: height 576.00
INFO: displayWidth 704.00
INFO: displayHeight 576.00
INFO: duration 0.00
INFO: framerate 25.00
INFO: fps 25.00
INFO: videodatarate 683.00
INFO: videocodecid 7.00
INFO: audiodatarate 125.00
INFO: audiocodecid 10.00
6357.014 kB / 46684.60 sec

http://i.imgur.com/OauxCbL.png

nostromo
10-08-2014, 03:19 PM
hasomaso,
It's intresting. When I watch network traffic via Wireshark I also see that the playpath (file) variable always changed, but it's always stream237?s=<big hex value (34 digits)>. You wrote -y "stream237?87". How you find it? Do you transform the big hex value after s= or do something else?

hasomaso
10-08-2014, 05:14 PM
@nostromo

i think the forum has a problem!!!
it only shows a portion of the parameter?

the right playpath is that here... http://i.imgur.com/NtSzRzE.png


and not this -y "stream237?87"



I would be very happy if Admin control that

nostromo
10-09-2014, 02:56 AM
It's a great pity, but it isn't working for me. I fine out the current playpath value via Wireshark or extract it from HTML code and add into the command, but I receive the same error.
I already compiled latest version rtmpdump from source (https://rtmpdump.mplayerhq.hu/) (OS: Ubuntu 14.04 amd64, Asus K53E, latest version of Google Chrome). I trying use rtmpdump in my Windows XP (https://rtmpdump.mplayerhq.hu/download/rtmpdump-2.4-git-010913-windows.zip) installation on VirtualBox. Nothing helps me. I have the same ERROR: RTMP_ReadPacket, failed to read RTMP packet header anywhere. I don't know what's the reason of the error.
Log files are attached (I use -z option for extended debug information).

chap
10-09-2014, 11:04 AM
example
use ip usa

$ rtmpdump -r "rtmp://ua4.parom.tv:1935/stream/" -a "stream/" -f "WIN 13,0,0,214" -W "http://america.parom.tv/player.swf" -p "http://america.parom.tv/ru/ort" -y "$(curl -s http://america.parom.tv/ru/ort | grep -Po "file=\K[^\&]*")" -o t.flv
RTMPDump v2.4 GIT-2014-07-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: Server NGINX RTMP (github.com/arut/nginx-rtmp-module)
INFO: width 720.00
INFO: height 576.00
INFO: displayWidth 720.00
INFO: displayHeight 576.00
INFO: duration 0.00
INFO: framerate 25.00
INFO: fps 25.00
INFO: videodatarate 683.00
INFO: videocodecid 7.00
INFO: audiodatarate 125.00
INFO: audiocodecid 10.00
258.340 kB / 48142.56 sec

nostromo
10-10-2014, 12:27 AM
I find another rtmp stream with the same contect without such troubles. But anyway thanks a lot for the members how tryed to help me.