This summer the issue of recording on-duty police officers has received a great deal of media attention. Camera-wielding citizens were arrested in Maryland, Illinois, and Massachusetts under interpretations of state wiretapping laws, while others were arrested in New Hampshire, Ohio, Oregon, Florida, and elsewhere based on vaguer charges related to obstructing or interfering with a police officer.

So far Massachusetts is the only state to explicitly uphold a conviction for recording on-duty cops, and Illinois and Massachusetts are the only states where it is clearly illegal. The Illinois law has yet to be considered by the state's Supreme Court, while the Massachusetts law has yet to be upheld by a federal appeals court. Maryland Attorney General Douglas Gansler recently issued an opinion concluding that arrests for recording cops are based on a misreading of the state's wiretapping statute, but that opinion isn't binding on local prosecutors.

In the remaining 47 states, the law is clearer: It is generally legal to record the police, as long as you don't physically interfere with them. You may be unfairly harassed, questioned, or even arrested, but it's unlikely you will be charged, much less convicted. (These are general observations and should not be treated as legal advice.)

One reason this issue has heated up recently is that the democratization of technology has made it easier than ever for just about anyone to pull out a camera and quickly document an encounter with police. So what's the best way to record cops? Here is a quick rundown of the technology that's out there.

Cameras without wireless networking capabilities are the least attractive option. If they are destroyed or confiscated, you have probably lost the damning video you just recorded, including the video documenting how your camera was confiscated or destroyed. But provided you can hold on to your camera, digital video recorders today are inexpensive, small, and wonderfully practical. The best-known everyday, easy-to-use brand right now is probably the Flip Video line, which start at $149. Even the cheapest Flips fit in your pocket, power up in about three seconds, and feature one-button recording. They are also easy to use. They include a built-in USB port and instant formatting for sites such as LiveLeak and YouTube.

Kodak has a pocket video camera for $100, and Amazon list a couple dozen different flash-memory cameras for under $50. Still too expensive? For $20, this camera sold at USBGeek is shorter than a stick of gum and shoots 640×480 video at 30 frames per second. It has a memory slot to hold up to 32GB of memory and a two-hour battery life. Or try this keychain camera. It's tiny, has the advantage of not looking much like a camera, shoots 720x480 video at 30 frames per second, and sells for all of $12 (with free shipping) at Meritline.com.

Last year's demonstrations in Iran and the 2009 police shooting of Oscar Grant on a subway platfom in Oakland, California were very public incidents, with dozens of cell phones taking photos and video as they happened. Authorities could not possibly have confiscated every phone camera (although in both cases they tried). But in other cases, police confiscate cameras, and when they are returned the potentially incriminating video or photos are gone. But technology is helping there too.

If you find your files or videos have been deleted once your camera has been returned, your best option is to look into recovery software, which in many cases can bring the deleted files back. Don't use the phone or camera until you've tried the software.

The better option, though, is to use a camera with networking capabilities. We're increasingly seeing spy movies-come-to-life cameras like this Bluetooth device from Looxcie, which you wear over your ear and lets you instantly email video, but the same technology is also standard now in most smart phones. The ability to store audio or video off site—to email it to friends (or yourself), or to upload it to social networking sites—is becoming more and more accessible. And it's a pretty powerful check on government, as shown by the Iran demonstrations, the Grant shooting, and the alleged police abuses shown in hundreds of videos uploaded to video sharing sites.

Qik and UStream, two services available for both the iPhone and Android phones, allow instant online video streaming and archiving. Once you stop recording, the video is instantly saved online. Both services also allow you to send out a mass email or notice to your Twitter followers when you have posted a new video from your phone. Not only will your video of police misconduct be preserved, but so will the video of the police officer illegally confiscating your phone (assuming you continue recording until that point).

Neither Qik nor UStream market themselves for this purpose, and it probably would not make good business sense for them to do so, given the risk of angering law enforcement agencies and attracting attention from regulators. But it's hard to overstate the power of streaming and off-site archiving. Prior to this technology, prosecutors and the courts nearly always deferred to the police narrative; now that narrative has to be consistent with independently recorded evidence. And as examples of police reports contradicted by video become increasingly common, a couple of things are likely to happen: Prosecutors and courts will be less inclined to uncritically accept police testimony, even in cases where there is no video, and bad cops will be deterred by the knowledge that their misconduct is apt to be recorded.

But there is still room for improvement. With both Qik and UStream, you can delete your uploaded videos from your phone, which means that if your phone is confiscated before you can turn it off (or if you keep your phone unlocked), whoever took it can get into your account and erase your evidence. One not terribly reliable way around this problem would be to encourage any of your friends or Twitter followers who happen to be online at the time to download your video the moment they get notice of it. But it would be far better if you had the option to make your videos deletable only once you've logged in from a computer. Another improvement would be the ability to "black out" the phone while it's taking video, so it isn't so obvious that you're recording.

UStream and Qik are not likely to add either function, since both are beneficial only for people who want to make surreptitious recordings. But how about an ACLU or NAACP app designed specifically for recording police? The NAACP's "All Alert" project encourages people to report incidents of police abuse through a toll-free phone number, text messages, or Twitter. But the process for registering a complaint is pretty cumbersome, and the program doesn't allow instant streaming and archiving.

Scott Morgan of Flex Your Rights, which educates people about their rights during police encounters, says his organization has been exploring the possibility of offering such a service. "I think it's a great idea," Morgan says. "We've talked to a couple developers about it. I think the problem for a small group like us is getting server space for videos and working out the networking issues." Globally, it would make great sense for an organization like Amnesty International or Human Rights Watch to develop a similar easy-to-use application, allowing people all over the world to emulate the instant documentation we saw during the protests in Iran.

The dizzying advancements in personal technology during the last decade have slipped a powerful government accountability tool into our pockets. But it happened mostly by accident. The technology was intended for other uses, and it still needs some fine tuning to work better as a protection against abuses of state power. It's hard to think of a more worthy project for a civil liberties group.

Radley Balko is a senior editor at Reason magazine.