Get C-Span.Org Videos

Note:

It is NOT piracy to use portions of C-SPAN videos for purposes qualified under the Fair Use Doctrine and non commercial purposes. This tutorial MUST only be used for legitimate, legal, and lawful purposes and Fair Use used for educational, news reporting, political, criticism, non commercial, and social justice purposes. C-SPAN gives permission to use their material for non commercial purposes. As long as you do not make any profits off the material, then you are all good. You may support C-SPAN by contacting them: http://www.c-span.org/about/contactUs/.

What Is C-Span!?

C-SPAN (Cable-Satellite Public Affairs Network) is a non-profit American cable television network. It has got public affairs programming, and federal government proceedings as well. Their website http://www.c-span.org/ has a lot of video resources for people in the academe or other fields of endeavor.
Let's say you are a student, and was tasked present a video of the late Franklin Delano Roosevelt's 1942 State of the Union Address in class. Right away, you got what you need from C-Span: http://www.c-span.org/video/?152565-1/D. The problem is that you have an unstable internet connectivity. Downloading the video would be a simple solution that you can resort to. The problem is that it is not quite simple to get videos from C-Span, unless you know what you are doing.


Tools, Anyone!?

Before we proceed with the "how-to" part, let us first prepare all the tools that we would need:
  1. 7zip from http://www.7-zip.org/, or just about any archiver / unpacker that should allow you to unpack your downloaded RTMPDump zip file.
  2. Notepad / Notepad++, or just about any text editor that we can use to create a "Batch file".
  3. RTMPDump. Get this from http://rtmpdump.mplayerhq.hu/.
  4. URL Helper from http://www.urlhelper.com/. Even the evaluation copy would do.
  5. Your internet browser. Preferably Google Chrome.
Unzip your downloaded RTMPDump zip file and place all its contents in one folder. You can probably name that folder "RTMPDump". Install the URL Helper in your computer and run it, just don't mind the prompt that asks for the registration key. At first run, URL Helper may require you to choose the Network Adapter you want it to use. I choose my "Realtek PCIe GBE Family Controller" for this tutorial.



Click on URL Helper's "Start" button located on the upper left, then launch your Google Chrome and type in the c-span URL that contains the video on your Google Chrome's address bar. In this example "http://www.c-span.org/video/?152565-1/D".





URL Helper will give you these information within a few moments:
  • playpath
  • swfUrl
  • pageUrl

It may somehow look like this on the URL Helper GUI:

rtmp://cspan-147.c-spanarchives.org:80/bwcheckmp4:downloads/152/152565-1/152565-1-MP4-STD/152565-1-MP4-STD_01.mp4http://static.c-span.org/assets/swf/CSPANPlayer.1390921496.swf?programid=167246 http://www.c-span.org/video/?152565-1/D




The next step is to create a new text file inside the folder where you placed all your RTMPDump components. Change the extension of the text file from ".txt" into ".bat". You may probably name your batch file "FDR1942.bat". Make sure your Windows folder option is configured to show file extensions. Please check Microsoft's website (http://windows.microsoft.com/en-ph/windows/show-hide-file-name-extensions#show-hide-file-name-extensions=windows-7) if you don't know how to do this.

This is what you got from URL Helper:

rtmp://cspan-147.c-spanarchives.org:80/bwcheckmp4:downloads/152/152565-1/152565-1-MP4-STD/152565-1-MP4-STD_01.mp4http://static.c-span.org/assets/swf/CSPANPlayer.1390921496.swf?programid=167246 http://www.c-span.org/video/?152565-1/D


This will be the format that you need to get your target video. Most that will comprise this are information you got from your URL Helper:

rtmpdump -v -r "rtmp://cspan-147.c-spanarchives.org:80/bwcheck" -a "bwcheck" -f "WIN 11,9,900,170" -W "http://static.c-span.org/assets/swf/CSPANPlayer.1390921496.swf" -p "http://www.c-span.org/video/?152565-1/D" -y "mp4:downloads/152/152565-1/152565-1-MP4-STD/152565-1-MP4-STD_01.mp4" -T "T4#up_Ko!" -o "FDR1942.flv"


Parameters Galore

If you notice we have used quite a number of parameters of RTMP Dump:
  1. -v: Also known as "live", this parameter tells RTMP Dump that the media is a live stream. No resuming or seeking in live streams is possible.
  2. -r: Also known as "url" of the server and media content.
  3. -a: Also known as the app parameter. This is the name of application to connect to on the RTMP server. This also overrides the app in the RTMP URL and sometimes, the rtmpdump URL parser cannot determine the app name automatically; thus, this must be given explicitly using this option.
  4. -f: Also known as the flashVer, or the version of the Flash plugin used to run the SWF player. The default is "LNX 10,0,32,18".
  5. -W: Also known as the URL of the SWF player for your target media, or swfVfy in RTMP Dump's documentation. This option replaces all three of the −−swfUrl, −−swfhash, and −−swfsize options. When this option is used, the SWF player is retrieved from the specified URL and the hash and size are computed automatically. Also the information is cached in a .swfinfo file in the user's home directory, so that it doesn't need to be retrieved and recalculated every time rtmpdump is run. The .swfinfo file records the URL, the time it was fetched, the modification timestamp of the SWF file, its size, and its hash. By default, the cached info will be used for 30 days before re-checking.
  6. -p: Also known as the pageUrl parameter, or the URL of the web page in which your target media was embedded.
  7. -y: Also known as the playpath. This overrides the playpath parsed from the RTMP URL due to the fact that sometimes, the rtmpdump URL parser cannot determine the correct playpath automatically. This must be provided explicitly using this option.
  8. -T: Also know as the token parameter. This is a key needed for SecureToken response. This is used if the server requires SecureToken authentication.
  9. -o: Also known as output parameter. This lets you specify the filename of the media file that you are downloading.

Once done with the above-mentioned steps, open the FDR1942.bat you have just created in Notepad / Notepad++ (or any text editor of your preference) and paste all the codes in the textbox below:

rtmpdump -v -r "rtmp://cspan-147.c-spanarchives.org:80/bwcheck" -a "bwcheck" -f "WIN 11,9,900,170" -W "http://static.c-span.org/assets/swf/CSPANPlayer.1390921496.swf" -p "http://www.c-span.org/video/?152565-1/D" -y "mp4:downloads/152/152565-1/152565-1-MP4-STD/152565-1-MP4-STD_01.mp4" -T "T4#up_Ko!" -o "FDR1942.flv"


If you notice the construction of the string, you will notice that these are the same pieces of information we got from URL Helper on the upper portion of this tutorial. Once you saved your Batch File, you may just run it and it will start the download process.





When your download is done, RTMPDump (through the Batch File you have created) will have prepared your downloaded C-Span video. All that is needed is to watch the downloaded video using your favorite video player, such as VideoLAN.





You may want to play around with RTMPDump, this tool can offer you more than you can imagine - and it is for free.


Reference(s) / Test Environment(s):

  1. Fellow oDesker.
  2. The Non-Technical Technical Support Admin.
  3. Tested on Windows XP, Windows 7, and with "ffmpeg-20150220-git-6c91afe-win64-static".
  4. Should work until C-Span change the way they keep their video links.



Get C-Span.Org Videos Get C-Span.Org Videos Reviewed by Admin Moronman on 8:47 PM Rating: 5

1 comment:

  1. I use allavsoft to download Video from C-SPAN to MP4, WMV, MOV, AVI etc and find it at http://www.allavsoft.com/how-to/download-cspan-video-podcast-library-flash-video.html

    ReplyDelete