James Randi is a debunker extraordinaire and host to the million-dollar challenge, a challenge where any psychic who can convincingly demonstrate that they have supernatural powers will win a million dollars. BoingBoing just linked to an 18-minute video wherein James Randi embarasses James Hydrick, a psychic who claimed to be able to move objects with his mind.
Of course I couldn't stop at just one James Randi video, so I ended up pestering my SO with an hour or two of James Randi videos from YouTube. The videos had excellent footage of psychics in action, and while most of the psychics simply gave up or refused to be tested when confronted, I got to thinking that these would still be a good vehicle for starting discussions of skepticism and pseudoscience in the classroom. Thus, I thought I'd post a few of the videos here as the most recent installment of my teaching link series.
James Randi's classic experiment in horoscopes:
James Randi discussing Uri Geller and Peter Popoff:
James Randi performing psychic surgery (caution: filled with fake blood):
James Randi demonstrating spoon bending and discussing the preliminary test a psychic healer will undergo to earn the million-dollar prize:
James Randi discussing Doris Collins, a cold reader:
James Randi explaining homeopathy (contains no footage of psychics, but is a great lecture on the ridiculosity of homeopathy):
Showing posts with label video. Show all posts
Showing posts with label video. Show all posts
Tuesday, March 20, 2007
Tuesday, November 28, 2006
Creating and posting videos with xvidcap in Ubuntu
One of the reasons I'm excited about teaching online is that there are so many tools I can use to help me share information with students. Animations, videos, audio recordings (e.g., podcasts), blogs, discussion boards, PDFs of readings, textbooks, and plain ol' HTML pages can all be combined to make a course that is (hopefully) more interesting and accessible than just a textbook and HTML pages. So, in the coming months I'm going to be trying out various programs to see which ones I can use while creating content.
For the past few weeks I've been exploring different methods of creating videos. There are two specific things I want to do with videos in my course:
Xvidcap
The predominant free open source video capture solution for Linux seems to be xvidcap. The program is completely free; it can be downloaded from xvidcap's Sourceforge page. They even have a .deb file that installs in seconds on Ubuntu; to install it all you have to do is download the .deb file and then double-click on it in the file browser (Nautilus), which will bring up a dialog that installs the program.
Using xvidcap is fairly straightforward; it has a small control panel and a little red box. Once you hit record on the control panel, xvidcap records everything that occurs in that little red box. The box can be resized to fit whatever you want to record using the eyedropper tool, which allows you to either click and drag to move the box or click into a program window to have the box sized to fit that program's window. The box is attached to the bottom of the control panel by default, but can be undocked from the control panel by hitting the lock button.

Screenshot of xvidcap; the program records everything that occurs in the red box.
The preferences are accessed by right-clicking on the filename (to bring up the main menu) and then clicking "preferences." Xvidcap can either save a series of screencaps to a directory (what xvidcap calls single-frame recording, which lacks audio) or can record a full-motion video with audio (multi-frame recording). The preferences window allows you to set all sorts of preferences - you can choose your output file format, video and audio codecs, video and audio quality, and frame-rate. Choosing wisely here is key, as too high a quality or framerate will result in videos with skipped frames (which will look and sound bad) or files that are unplayable on most computers (e.g., Microsoft Windows doesn't have DIVX codecs installed by default). As a minor note, some codec and framerate combinations are not possible, which unfortunately is often reported to you solely in the form of a program crash (but it's easy to reopen).

Screenshot of xvidcap's multi-frame capture preferences.
My computer is old enough that I needed to lower the video quality and reduce the framerate as low as possible (7.5fps for the Microsoft DIVX 2 or MPEG DIVX codecs) to enable 700x700 video recordings without frame skippage. Reducing the size of the recording window does enable me to make higher-quality recordings, but there's only so small you can resize something before you lose important details.
Once you've got the options set, recording a video is about as easy as hitting the record button. When you're done recording, xvidcap will pop up a little screen summarizing the video that you just captured; pay attention to the framerate - if it's significantly lower than what you were hoping for, you will probably have to re-record the video (lowering the quality or recording area size). Practice recording with various settings to see what works best on your machine.
As a final note, if you're recording directly to flash video you may want to make note of the movie dimensions, as you may need that information to properly embed the video in a webpage.
Microphones and audio
Xvidcap will record audio along with your video; all you need is a working microphone and xvidcap takes care of the rest. This allows for easy narration of videos, something I plan to do regularly.
I'm using a Sennheiser PC 150 stereo headset with noise canceling microphone; it's probably not the best microphone out there, but it seems to work well. Setting up the microphone in Ubuntu was easy, if non-intuitive. I had to open the volume control (by right-clicking on the speaker in the task bar), go to the preferences in that control (edit/preferences), put a checkmark by all the microphone options ("microphone", "Mic boost", and "mic select"), unmute the microphone on the capture tab, and then turn on the "Mic boost +20db" option in the switches tab. As I said: easy, but not intuitive.
Choosing video codecs and creating Flash video files
Xvidcap has a number of codec options, and I'm still trying to figure out which codecs work best; here's what I've found so far (with very limited testing only only a couple of computers):
Converting from the DIVX MPEG4 codec to flash files was relatively easy using mencoder (a component of mplayer). The command line to convert the files I eventually settled on (thanks to the mplayer manual) was:
Flash movie files have timing information in them that helps flash players play them; mencoder apparently does not include this information. However, the program flvtool2 can add this information (I found this thanks to DRM's excellent post). There is no flvtool2 package for Ubuntu, but downloading and installing it was relatively easy1. Once you've got flvtool2 installed, all you need to do to add the timing information is:
Putting a flash video on the web
To actually play a flv file in a webpage you need a flash file on the webpage that will play the movie. While Adobe Flash can create these for you (for the low low price of $699 for Flash Pro 8), the entire point of this exercise has been to create videos using free open source tools. That's where FlowPlayer comes in.
FlowPlayer is a free open-source flash video player that can be easily added to a website; all you have to do is upload a few files to the server (as a user; no need to be root or actually install anything), insert FlowPlayer's quickstart HTML code into the HTML page of your choice, and you've got flash videos embedded into your webpage.
Samples
For a sample of how this looks, I've created three short videos and posted them here. Sorry, but you won't be hearing my voice in any of those videos, you'll just hear some music recorded by putting my microphone in front of a speaker (translation: badly recorded music)2.
And, here's an example of one of those sample videos embedded into this page:
Exciting, isn't it?
Conclusion
It seems like xvidcap will be able to produce satisfactory video tutorials that focus on how to use programs and websites, and the videos produced will be easy to distribute in a variety of formats, including flash videos on the web. However, I have no idea if xvidcap will be able to easily create videos of slide-based presentations (using OpenOffice Impress); figuring out how to create videos of slide-based content will have to be the subject of another post.
1: To install flvtool2 just unzip into a directory and follow the instructions in the readme.txt (which basically say to run "ruby setup.rb config", "ruby setup.rb setup", and "sudo ruby setup.rb install"). You may have to install ruby first; Ruby can be installed via Ubuntu's standard interface.
2: I can't very well be a pseudonymous blogger and have my voice plastered all over the internets, now can I?
For the past few weeks I've been exploring different methods of creating videos. There are two specific things I want to do with videos in my course:
- Create videos of tasks being performed on the desktop (screencap videos), primarily to create tutorials to help students use Excel, browse my course website, and other such things.
- Create animated mini-lectures on key topics, probably based on PowerPoint (or OpenOffice Impress) slides. These will ideally be less than 5 minutes each and contain a combination of text, images, and animations.
Xvidcap
The predominant free open source video capture solution for Linux seems to be xvidcap. The program is completely free; it can be downloaded from xvidcap's Sourceforge page. They even have a .deb file that installs in seconds on Ubuntu; to install it all you have to do is download the .deb file and then double-click on it in the file browser (Nautilus), which will bring up a dialog that installs the program.
Using xvidcap is fairly straightforward; it has a small control panel and a little red box. Once you hit record on the control panel, xvidcap records everything that occurs in that little red box. The box can be resized to fit whatever you want to record using the eyedropper tool, which allows you to either click and drag to move the box or click into a program window to have the box sized to fit that program's window. The box is attached to the bottom of the control panel by default, but can be undocked from the control panel by hitting the lock button.

Screenshot of xvidcap; the program records everything that occurs in the red box.
The preferences are accessed by right-clicking on the filename (to bring up the main menu) and then clicking "preferences." Xvidcap can either save a series of screencaps to a directory (what xvidcap calls single-frame recording, which lacks audio) or can record a full-motion video with audio (multi-frame recording). The preferences window allows you to set all sorts of preferences - you can choose your output file format, video and audio codecs, video and audio quality, and frame-rate. Choosing wisely here is key, as too high a quality or framerate will result in videos with skipped frames (which will look and sound bad) or files that are unplayable on most computers (e.g., Microsoft Windows doesn't have DIVX codecs installed by default). As a minor note, some codec and framerate combinations are not possible, which unfortunately is often reported to you solely in the form of a program crash (but it's easy to reopen).

Screenshot of xvidcap's multi-frame capture preferences.
My computer is old enough that I needed to lower the video quality and reduce the framerate as low as possible (7.5fps for the Microsoft DIVX 2 or MPEG DIVX codecs) to enable 700x700 video recordings without frame skippage. Reducing the size of the recording window does enable me to make higher-quality recordings, but there's only so small you can resize something before you lose important details.
Once you've got the options set, recording a video is about as easy as hitting the record button. When you're done recording, xvidcap will pop up a little screen summarizing the video that you just captured; pay attention to the framerate - if it's significantly lower than what you were hoping for, you will probably have to re-record the video (lowering the quality or recording area size). Practice recording with various settings to see what works best on your machine.
As a final note, if you're recording directly to flash video you may want to make note of the movie dimensions, as you may need that information to properly embed the video in a webpage.
Microphones and audio
Xvidcap will record audio along with your video; all you need is a working microphone and xvidcap takes care of the rest. This allows for easy narration of videos, something I plan to do regularly.
I'm using a Sennheiser PC 150 stereo headset with noise canceling microphone; it's probably not the best microphone out there, but it seems to work well. Setting up the microphone in Ubuntu was easy, if non-intuitive. I had to open the volume control (by right-clicking on the speaker in the task bar), go to the preferences in that control (edit/preferences), put a checkmark by all the microphone options ("microphone", "Mic boost", and "mic select"), unmute the microphone on the capture tab, and then turn on the "Mic boost +20db" option in the switches tab. As I said: easy, but not intuitive.
Choosing video codecs and creating Flash video files
Xvidcap has a number of codec options, and I'm still trying to figure out which codecs work best; here's what I've found so far (with very limited testing only only a couple of computers):
- The MPEG 4 DIVX and general AVI file (DIVX, mpeg) work well for me on Linux, but don't seem to play well on Windows or Mac computers by default (they need DIVX codecs)
- The Microsoft DIVX 2 and Microsfot avi file format seems to works well on Linux, Windows, and Macs.
- The mp2 audio codec seems to work well on Linux and Windows, but not Mac. Unfortunately, I can't seem to get the mp3 codec to work with the Microsoft DIVX 2 codec.
- Flash videos (.flv, what YouTube uses) work very well cross platform, but require a flash player to play.
- Create the flash files directly from xvidcap
- Create the movies using another codec and then convert them to flash files
Converting from the DIVX MPEG4 codec to flash files was relatively easy using mencoder (a component of mplayer). The command line to convert the files I eventually settled on (thanks to the mplayer manual) was:
mencoder inputfile.mpeg -o outputfile.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -lavfopts i_certify_that_my_video_stream_does_not_use_b_framesThis conversion step also allows you to scale the size of the video to whatever you want; simply add the flag -vf scale=YYY:-2 to the command line and the movie will be scaled to YYY pixels wide (proportionally scaling the vertical dimension).
Flash movie files have timing information in them that helps flash players play them; mencoder apparently does not include this information. However, the program flvtool2 can add this information (I found this thanks to DRM's excellent post). There is no flvtool2 package for Ubuntu, but downloading and installing it was relatively easy1. Once you've got flvtool2 installed, all you need to do to add the timing information is:
flvtool2 -U inputfile.flvFlvtool2 can also be used to do a number of other things, including adding timestamps to the video for thumbnails (so users can skip through the video to specific timepoints).
Putting a flash video on the web
To actually play a flv file in a webpage you need a flash file on the webpage that will play the movie. While Adobe Flash can create these for you (for the low low price of $699 for Flash Pro 8), the entire point of this exercise has been to create videos using free open source tools. That's where FlowPlayer comes in.
FlowPlayer is a free open-source flash video player that can be easily added to a website; all you have to do is upload a few files to the server (as a user; no need to be root or actually install anything), insert FlowPlayer's quickstart HTML code into the HTML page of your choice, and you've got flash videos embedded into your webpage.
Samples
For a sample of how this looks, I've created three short videos and posted them here. Sorry, but you won't be hearing my voice in any of those videos, you'll just hear some music recorded by putting my microphone in front of a speaker (translation: badly recorded music)2.
And, here's an example of one of those sample videos embedded into this page:
Adblock
Exciting, isn't it?
Conclusion
It seems like xvidcap will be able to produce satisfactory video tutorials that focus on how to use programs and websites, and the videos produced will be easy to distribute in a variety of formats, including flash videos on the web. However, I have no idea if xvidcap will be able to easily create videos of slide-based presentations (using OpenOffice Impress); figuring out how to create videos of slide-based content will have to be the subject of another post.
1: To install flvtool2 just unzip into a directory and follow the instructions in the readme.txt (which basically say to run "ruby setup.rb config", "ruby setup.rb setup", and "sudo ruby setup.rb install"). You may have to install ruby first; Ruby can be installed via Ubuntu's standard interface.
2: I can't very well be a pseudonymous blogger and have my voice plastered all over the internets, now can I?
Subscribe to:
Posts (Atom)