PDA

View Full Version : help recording from pegcentral.com


rezo
07-21-2011, 09:46 PM
I could really use some help with streams kept on pegcentral.com. Their media server looks like it is Wowza Media Server and RTMPT protocol over port 80

The material is mostly content from local public access stations such as city government, school districts, etc Not very interesting stuff but there are some clips I really need to grab for a school project.

for example, here is the main launch page to a hosted video.

_http://swoccstudios.pegcentral.com/player.php?video=1cb8dffbf0da798cc9a2eed64a7daec8

After launching it in my browser I am able to gather the following info about this stream from capture file with Wireshark (http://all-streaming-media.com/find-stream-URL/Wireshark-free-network-protocol-analyzer.htm).

app
'peg_c_stream/?doConnect=12345&doPublish=54321'

flashver
'WIN 10,3,181,26'

swfUrl
'http://swoccstudios.pegcentral.com/flash/media_player_102908.swf?server=swoccstudios.pegcen tral.com&account=swoccstudios&pointer=1cb8dffbf0da798cc9a2eed64a7daec8'

tcUrl
'rtmpt://beta-rtmp.pegcentral.com:80/peg_c_stream/?doConnect=12345&doPublish=54321'

pageUrl
'http://swoccstudios.pegcentral.com/player.php?video=1cb8dffbf0da798cc9a2eed64a7daec8'

play
'mp4:swoccstudios/SE_OlympicEvent_NOVI.mp4'

I've tried various commands but always end up quitting with
"ERROR: RTMP_ReadPacket, failed to read RTMP packet header"
if I use rtmpdump -r "rtmp://beta-rtmp.pegcentral..."

or

"ERROR: RTMP_Connect1, handshake failed."
if I use rtmpdump -r "rtmpt://beta-rtmp.pegcentral..."

It doesn't matter if I specify the port and which arguements I pass beyond that. May somebody please clue me in as to how I can grab their content with rtmpdump? Thanks in advance

KSV
07-21-2011, 11:24 PM
They are using SecureToken method.

rtmpdump.exe -r "rtmp://beta-rtmp.pegcentral.com/peg_c_stream" -a "peg_c_stream/?doConnect=12345&doPublish=54321" -p "http://swoccstudios.pegcentral.com/player.php?video=1cb8dffbf0da798cc9a2eed64a7daec8" -y "mp4:swoccstudios/SE_OlympicEvent_NOVI.mp4" -T "mytestpassword" --live -o Test.flv

RTMPDump v2.4 GIT-2011-07-11 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 30000.00
INFO: length 2696694.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 48000.00
INFO: length 4298752.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 48000.00
INFO: videoframerate 29.97
INFO: aacaot 2.00
INFO: avclevel 30.00
INFO: avcprofile 100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 480.00
INFO: height 360.00
INFO: frameWidth 480.00
INFO: frameHeight 360.00
INFO: displayWidth 480.00
INFO: displayHeight 360.00
INFO: moovposition 5054658.00
INFO: duration 89.89
4711.666 kB / 89.54 sec (99.6%)
Download may be incomplete (downloaded about 99.60%), try resuming

you can safely ignore the 'download incomplete' message. videos are little broken on server side at end position.

rezo
07-22-2011, 01:15 AM
as usual, excellent help KSV

Appreciate your time and effort :)

unseen wombat
09-27-2011, 07:51 AM
Background: My statistics teacher is in the hospital (possibly) close to death, and I want to download the streams of his lessons in the event he passes and the college decides to take them down because he's really a great teacher. The substitute they gave us recently is horrible.

I tried to do it on my own, but these rtmp things have a HUGE learning curve and I'm not even sure I'm using the right software for these particular videos. I don't want to learn all the nuances of rtmpdump or whatever just to find out I really needed something else. I have no aspirations of being an A/V downloading media expert. I just want to download these few videos for use in the class, and I need to do it quickly before they're gone.

Could someone please show me exactly and succinctly how to download from this website? I've tried all the easy firefox extension downloaders and none work.

The first video from the class is here: _http://tricsmarttv.pegcentral.com/player.php?video=23eabb6b7326bdbf3c46f807685128fe

Thank you. I appreciate any help you can give me.

TubeDigger
09-27-2011, 09:22 AM
If you want only this video from that site - just start RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) with the following command line: rtmpdump -r "rtmp://theta-rtmp.pegcentral.com/peg_c_stream/?doConnect=12345&doPublish=54321" -a "peg_c_stream/?doConnect=12345&doPublish=54321" -T "mytestpassword" -y "mp4:tricsmarttv/CCC-2010-04-14-160047.mp4" -o "CCC-2010-04-14-160047.flv"


c:\>rtmpdump -r "rtmp://theta-rtmp.pegcentral.com/peg_c_stream/?doConnect=12345&
doPublish=54321" -a "peg_c_stream/?doConnect=12345&doPublish=54321" -T "mytestpa
ssword" -y "mp4:tricsmarttv/CCC-2010-04-14-160047.mp4" -o "CCC-2010-04-14-160047
.flv"
RTMPDump v2.4 GIT-2011-07-11 (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: trackinfo:
INFO: timescale 30000.00
INFO: length 162041880.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 238175232.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 29.97
INFO: aacaot 2.00
INFO: avclevel 51.00
INFO: avcprofile 100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 480.00
INFO: height 360.00
INFO: frameWidth 480.00
INFO: frameHeight 360.00
INFO: displayWidth 480.00
INFO: displayHeight 360.00
INFO: moovposition 302509684.00
INFO: duration 5401.40
1133.895 kB / 30.43 sec (0.5%)


or you may try TubeDigger (http://all-streaming-media.com/record-video-stream/TubeDigger-streaming-audio-video-downloader-recorder-Adobe-Flash-Player-streaming-HTTP-RTMP-RTMPE.htm).

unseen wombat
09-27-2011, 09:44 AM
Thank you so much. And I've checked that if I want to download the other videos from that class, (such as _http://tricsmarttv.pegcentral.com/player.php?video=a8e6ec0268c6b0629fb46ba7feb68932) I just change the part that says: "mp4:tricsmarttv/CCC-2010-04-14-160047.mp4" (which in this case would be "CCC-2010-04-26-160025.mp4")

From each page's source code, I can find the other file names.

This is great. I really appreciate this. Thank you.

ggariepy
10-13-2011, 09:21 AM
I am using the most current build of RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) I could find, dated 2011-09-25, on both Windows and Ubuntu.

The address of the stream I'm trying to download is a city government website located here:
http://shtv.pegcentral.com/player.php?video=fc4a3b429c535f3a0d925c472e61d883



After a lot of researching and hacking, I came up with the following rtmpdump command line:
rtmpdump -e -r "rtmp://nu-rtmp.pegcentral.com/peg_c_stream/?doConnect=12345&doPublish=54321" -a "peg_c_stream/?doConnect=12345&doPublish=54321" -T "mytestpassword" -y "mp4:shtv/CityCouncil-2-1-11.mp4" -o "CityCouncil-2-1-11.flv"

Now here's the problem:
When downloading the stream, rtmpdump repeatedly stops and restarts, over and over and over again.

This behavior is the same on both of my machine's operating systems: Windows 7 64-bit and Ubuntu 10.x, which runs as an OracleBox VM on the Windows 7 machine. For your entertainment, I used CamStudio (http://all-streaming-media.com/record-video-from-screen/CamStudio-freeware-Windows-Free-video-screen-capture-software-supporting-audio-recording.htm) to take a short video snippet of this behavior. It's located here:

3BEJKwfBmhc

Originally I thought this was "normal" -- after all I am calling RTMPDump with the -e switch; maybe the connection to the pegcentral server is just crappy -- something that might be masked by the swf player on the site -- and I'm seeing what's really going on in the console window.

The problem is that while I can download what appears to be complete videos, they, too, stop suddenly at intervals that seem to correspond roughly with the restarts that happen during the download. VLC just gives up and crashes, as you can see in this short YouTube snippet here:

HZeNm-ylu4c

As you might have guessed, I'm having a bit of trouble getting the RTMPSuck application to work on Windoze; same for RTMPServer. None of the shareware FLV programs can handle streams from this site either.

Any help out there from the developer? Maybe someone with a working implementation of RTMPSuck can point out what I'm doing wrong?

Thanks!

--Geoff

nullacht
10-13-2011, 09:53 AM
The solution is really simple. Just add the following parameter to your command line: --live

KSV
10-13-2011, 10:00 AM
You need to add -v (--live) switch to correctly download the stream. although it's recorded stream but this flag disables the hack (Pause Unpause event hack) used by RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) which is causing problems with this particular server.

ggariepy
10-13-2011, 12:09 PM
Thanks to the two of you for the quick answer. Unfortunately, passing in the -v switch created a different problem: the download terminates after only a few hundred KB:

C:\Program Files (x86)\rtmpdump>rtmpdump -e -r "rtmp://nu-rtmp.pegcentral.com/peg_c_stream/?doConnect=12345&doPublish=54321" -a "peg_c_stream/?doConnect=12345&doPublish=54321" -T "mytestpassword" -y "
mp4:shtv/CityCouncil-2-1-11.mp4" -o "CityCouncil-2-1-11.flv" -v
RTMPDump v2.1
(c) 2009 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
Starting Live Stream
Metadata:
trackinfo:
timescale 30000.00
length 256906650.00
language eng
sampledescription:
sampletype avc1
timescale 44100.00
length 377610240.00
language eng
sampledescription:
sampletype mp4a
audiochannels 2.00
audiosamplerate 44100.00
videoframerate 29.97
aacaot 2.00
avclevel 51.00
avcprofile 100.00
audiocodecid mp4a
videocodecid avc1
width 480.00
height 360.00
frameWidth 480.00
frameHeight 360.00
displayWidth 480.00
displayHeight 360.00
moovposition 479556162.00
duration 8563.56
302.591 kB / 8.38 sec (0.0%)
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Download may be incomplete (downloaded about 0.10%), try resuming


Any ideas?

--Geoff

KSV
10-13-2011, 12:37 PM
it's working normally and downloaded video also plays fine.

RTMPDump v2.4 GIT-2011-09-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: trackinfo:
INFO: timescale 30000.00
INFO: length 256906650.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: timescale 44100.00
INFO: length 377610240.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
INFO: audiochannels 2.00
INFO: audiosamplerate 44100.00
INFO: videoframerate 29.97
INFO: aacaot 2.00
INFO: avclevel 51.00
INFO: avcprofile 100.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 480.00
INFO: height 360.00
INFO: frameWidth 480.00
INFO: frameHeight 360.00
INFO: displayWidth 480.00
INFO: displayHeight 360.00
INFO: moovposition 479556162.00
INFO: duration 8563.56
10667.084 kB / 271.42 sec (3.1%)

ggariepy
10-13-2011, 01:29 PM
I went on over to the Linux box and tried the same thing. Oh. My. God. Is. it. slow. But it is working.

So for some reason, works on Linux, not on Windows. Sheesh.

Thanks for the help. Hopefully I'll get these videos before I retire.

--Geoff

KSV
10-13-2011, 01:47 PM
So for some reason, works on Linux, not on Windows. Sheesh.


I am using Win XP SP3 and it works fine.download speed is also normal.

ggariepy
10-14-2011, 07:14 AM
I've got an XP SP3 machine. I will try it there. Thank you!

svnpenn
10-14-2011, 08:03 AM
You might want to try upgrading from 2.1 which is almost 2 years old now.