PDA

View Full Version : Help getting greek channel to work with rtmpdump


opelcalibra
09-16-2012, 06:14 AM
Hi All,
I used to have this stream working, then something changed and i can no longer get the correct url. i tried 2.4 and the ksv build with no success. the webpage is

http://kanalia.eu/player.php?id=91

and im trying

rtmpdump -r rtmp://freeview.fms.visionip.tv/live/tvnetwork-hellenictv-sigma-hsslive-25f-4x3-SDh --live

all i get is failed to read rtmp packet header. thanks in advance for your help!

karlo2105
09-16-2012, 10:28 AM
rtmpdump -v -r "rtmp://freeview.fms.visionip.tv/live/mp4:tvnetwork-hellenictv-sigma-hsslive-25f-4x3-SDh" | %systemdrive%\progra~2\videolan\vlc\vlc -
RTMPDump v2.4 GIT-2012-07-26 (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: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 426.00
INFO: height 320.00
INFO: frameWidth 432.00
INFO: frameHeight 320.00
INFO: displayWidth 426.00
INFO: displayHeight 320.00
INFO: framerate 25.00
INFO: trackinfo:
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type audio
INFO: config 1210
INFO: description {AACFrame: codec:AAC, channels:2, frequency:4410
0, samplesPerFrame:1024, objectType:LC}
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type video
INFO: profile-level-id 42801f
INFO: sprop-parameter-sets Z0KAH5ZTg2FN/4AoACi1BQUFQAAAAwBAAAAMuAgAJJ8AAST5
mc8DtCxc8A==,aMmMNSA=
INFO: description {H264CodecConfigInfo: codec:H264, profile:Baseli
ne, level:3.1, frameSize:432x320, displaySize:426x320, frameRate:25.0, PAR:80:81
}
INFO: rtpsessioninfo:
INFO: connectiondata IN IP4 226.45.20.66
INFO: name WowzaMediaServer
INFO: origin - -1121299399 -1121299399 IN IP4 127.0.0.1
INFO: timing 0 0
INFO: protocolversion 0
INFO: attributes:
INFO: range npt=now-
5688.275 kB / 67.75 sec
ERROR: Download: Failed writing, exiting!

KSV
09-16-2012, 01:09 PM
Though the trick posted by karlo (adding mp4: to playpath) works for the time being but it wasn't the actual reason of breakage. if you monitor it with wireshark you will see that it's still using the old playpath (without mp4:) but it has added two non-ASCII characters at the end (CRLF = \x0D\x0A = \r\n) which are newline characters. AFAIK it's not possible to pass on those characters as command line arguments because windows cmd shell treats everything separated by newline as separate command.

svnpenn
09-16-2012, 04:55 PM
Though the trick posted by karlo (adding mp4: to playpath) works for the time being but it wasn't the actual reason of breakage. if you monitor it with wireshark you will see that it's still using the old playpath (without mp4:) but it has added two non-ASCII characters at the end (CRLF = \x0D\x0A = \r\n) which are newline characters. AFAIK it's not possible to pass on those characters as command line arguments because windows cmd shell treats everything separated by newline as separate command.

Like this

$ rtmpdump -r rtmp://freeview.fms.visionip.tv/live/tvnetwork-hellenictv-sigma-h
sslive-25f-4x3-SDh$'\r' -o out.flv
RTMPDump v2.4-39-g0d1cfdd
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 426.00
INFO: height 320.00
INFO: frameWidth 432.00
INFO: frameHeight 320.00
INFO: displayWidth 426.00
INFO: displayHeight 320.00
INFO: framerate 25.00
INFO: trackinfo:
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type audio
INFO: config 1210
INFO: description {AACFrame: codec:AAC, channels:2, frequency:44100,
samplesPerFrame:1024, objectType:LC}
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type video
INFO: profile-level-id 42801f
INFO: sprop-parameter-sets Z0KAH5ZTg2FN/4AoACi1BQUFQAAAAwBAAAAMuAgAJJ8AAST5mc
8DtCxc8A==,aMmMNSA=
INFO: description {H264CodecConfigInfo: codec:H264, profile:Baseline
, level:3.1, frameSize:432x320, displaySize:426x320, frameRate:25.0, PAR:80:81}
INFO: rtpsessioninfo:
INFO: connectiondata IN IP4 226.45.20.66
INFO: name WowzaMediaServer
INFO: origin - -500117104 -500117104 IN IP4 127.0.0.1
INFO: timing 0 0
INFO: protocolversion 0
INFO: attributes:
INFO: range npt=now-
1040.726 kB / 13.19 sec

KSV
09-16-2012, 11:26 PM
Like this

it's not default windows cmd shell.

svnpenn
09-16-2012, 11:34 PM
it's not default windows cmd shell.

Ideally what needs to happen is allow RtmpDump to interpret escape sequences, like "echo" does

$ help echo
echo: echo [-neE] [arg ...]
Write arguments to the standard output.

Display the ARGs on the standard output followed by a newline.

Options:
-n do not append a newline
-e enable interpretation of the following backslash escapes
-E explicitly suppress interpretation of backslash escapes

`echo' interprets the following backslash-escaped characters:
\a alert (bell)
\b backspace
\c suppress further output
\e escape character
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ backslash
\0nnn the character whose ASCII code is NNN (octal). NNN can be
0 to 3 octal digits
\xHH the eight-bit character whose value is HH (hexadecimal). HH
can be one or two hex digits

This way you could add switch, maybe "-E", and that enable interpret carriage return, for example.

rtmpdump -E -r "rtmp://freeview.fms.visionip.tv/live/tvnetwork-hellenictv-sigma-hsslive-25f-4x3-SDh\r" -o out.flv

opelcalibra
09-17-2012, 02:55 AM
As always you guys are awesome. Thankyou very much for your help this time and every other time I have required it.

My in-laws will be extremely appreciative!

svnpenn
10-19-2012, 11:55 PM
You can actually do this without Bash, you just encode the Carriage Return as %d

lists.mplayerhq.hu/pipermail/rtmpdump/2012-October/002109.html

$ rtmpdump -o a.flv -r rtmp://freeview.fms.visionip.tv/live/tvnetwork-hellenict
v-sigma-hsslive-25f-4x3-SDh%d
RTMPDump v2.4-47-gc26c541
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 426.00
INFO: height 320.00
INFO: frameWidth 432.00
INFO: frameHeight 320.00
INFO: displayWidth 426.00
INFO: displayHeight 320.00
INFO: framerate 25.00
INFO: trackinfo:
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type audio
INFO: config 1210
INFO: description {AACFrame: codec:AAC, channels:2, frequency:44100,
samplesPerFrame:1024, objectType:LC}
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype
INFO: type video
INFO: profile-level-id 42801e
INFO: sprop-parameter-sets Z0KAHpZTg2FN/4AoACi1BQUFQAAAAwBAAAAMuAgAJJ8AAST5mc
8DtCxc8A==,aMmMNSA=
INFO: description {H264CodecConfigInfo: codec:H264, profile:Baseline
, level:3.0, frameSize:432x320, displaySize:426x320, frameRate:25.0, PAR:80:81}
INFO: rtpsessioninfo:
INFO: connectiondata IN IP4 226.45.20.66
INFO: name WowzaMediaServer
INFO: origin - 1430037116 1430037116 IN IP4 127.0.0.1
INFO: timing 0 0
INFO: protocolversion 0
INFO: attributes:
INFO: range npt=now-
1277.476 kB / 14.51 sec

nhjm449
10-20-2012, 01:29 PM
You can actually do this without Bash, you just encode the Carriage Return as %d

Please note that the only reason "%d" works (as opposed to "%0d") is because it's at the end of the string.

If you were to do somehting like "foo%Dabc", "%Da" would be replaced with 0xda and you'd lose your "a".
If you were to do something like "foo%Dzabc", "%Dz" would be replaced with 0x0d and you'd lose your "z".