How to Record TWiT

From The Official TWiT Wiki
Jump to: navigation, search

You may want to record TWiT audio or video for personal use or to share with others. All audio or video streamed by TWiT is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. If you have already captured the video and want to convert it to a different format please read the Converting TWiT Video tutorial for further instructions.

Contents

GNU Wget

This method works for both TWiT video (using the BitGravity stream) and audio (using twit.am). Wget can be used on all major operating systems including BSDs, GNU/Linux, OSX and Windows.

Installing

We have guides to help you install wget on the following operating systems:

Capturing Audio

To capture an mp3 of the live broadcast, use the following command:

wget http://twit.am:80/listen -O output.mp3

This will save an MP3 file called "output.mp3" to the current working directory. Since this is a live stream this will not stop on its own. When you want to stop recording, press your interrupt character (default is Ctrl+C), and this will terminate wget. You now have a 64kbps MP3 on your system.

Capturing Video

Capturing video is very similar to capturing audio. Use the following command:

wget http://bglive-a.bitgravity.com/twit/live/high --ignore-length -O output.flv

This will save an flv file (using h.264 video and mp3 audio) to your system called "output.flv". You will also need to stop this using ctrl+c.

cURL

CURL accomplishes the same task as Wget. It can capture both the audio and video stream from TWiT Live. It can also be used on all major operating systems.

Installing

We have guides to help you install cURL on the following operating systems.:

Capturing Audio

To capture an mp3 of the live broadcast, use the following command:

curl http://twit.am:80/listen -o output.mp3

This will save an mp3 file called "output.mp3" to the current working directory. Since this is a live stream this will not stop on its own. When you want to stop recording, press ctrl+c and this will terminate wget. You now have the 64kbps mp3 on your system.

Capturing Video

Capturing video is very similar to capturing audio. Use the following command:

curl http://bglive-a.bitgravity.com/twit/live/high --ignore-content-length -o output.flv

This will save an flv file (using h.264 video and mp3 audio) to your system called "output.flv". You will also need to stop this using ctrl+c.

Auto-Reconnect Bash Script

You can get the bash script from here (last updated on May 4, 2009 at 00:21 EDT). To run this program you will want to save it to your /usr/local/bin directory as 'odtvrecord' and make sure it's executable by running the following command on it:

$ chmod a+x odtvrecord

This Bash script will make it easier for you to capture TWiT. It takes two parameters for input; The first is the filename (without the extension) and the second is the part number (you should not have to ever use this). If the stream disconnects this script will attempt to reconnect and save the output as a new file. The following command would start to capture to a file called twif16.1.flv:

$ odtvrecord twif16

If the stream disconnects (without you pressing Ctrl+C) then the script will attempt to reconnect and will output the new captured data to twif16.2.flv.

Timed Recording Bash Script (depends on Auto-Reconnect)

You can get the bash script from here (last updated Nov 28, 2009 at 16:20 EDT). To run this program you will want to save it to your /usr/local/bin directory as 'odtvtimer' and make sure it's executable by running the following command on it:

$ chmod a+x odtvtimer

This bash script will start 'odtvrecord' like normal but it will also stop it for you after a specified amount of time (default is 60 minutes). This makes it easier to set a cron job to capture a certain show. The following command would start to capture a file called twif16.1.flv and set it to stop recording after two hours:

$ odtvtimer twif16 120

ffmpeg

Ffmpeg can be used to capture video from the Bitgravity high and Flosoft streams and save it as an MP4.

Installing

There are guides for installing ffmpeg on the following operating systems:

Capturing video to an MP4 file

Use the following command to capture video from the Bitgravity High stream:

ffmpeg.exe -i http://bglive-a.bitgravity.com/twit/live/high -c copy -absf aac_adtstoasc Output.mp4

Capturing the Flosoft 720p stream

To capture 720p video from the Flosoft stream use:

ffmpeg.exe -i http://46.105.115.117/flosoft/mp4:twitStream_720/playlist.m3u8 -c copy -absf aac_adtstoasc Output.mp4

To stop the capture use ctrl+c. The output from both of these will be in .mp4 format.

If the Flosoft stream gives an error and does not capture, the URL or IP may have changed. Check the Flosoft stream URLs for any updates.

Setting up shortcuts in Windows

If you are going to be using these commands in Windows it is more convenient to create shortcuts to simplify the process.

  • Right click on the desktop and select New then Shortcut.
  • Select Browse and navigate to the corresponding folder and select the command for this shortcut; either wget.exe, curl.exe or ffmpeg.exe. Click Next.
  • Give the shortcut a name. Click Finish.
  • Right click on the shortcut and select Properties.
  • Copy the corresponding options from the above commands and paste them after the command in the Target box. Make sure there's a space between the command and the options.
  • For example, the options for wget.exe would be:
http://bglive-a.bitgravity.com/twit/live/high --ignore-length -O output.flv
  • Set the path and the name for the output file to whatever you want otherwise it will save to the folder the command is in. Remember to use the correct extension for the command that is used; either .flv or .mp4.

Now just double click the shortcut to start the recording and use ctrl+c to stop recording.

Personal tools