Showing posts with label gadgets. Show all posts
Showing posts with label gadgets. Show all posts

Tuesday, October 20, 2009

Windows 7 Media Center WTV to iPhone / iPod Video Transcode

Below is my first pass at building a Powershell utility to monitor my Recorded TV folder from Windows 7 Media Center and automatically trim commercials and transcode them into iPhone format.

Some notes:

  • The version of ffmpeg.exe comes from iPodifier. I want it to use a more recent stock build.
  • Requires comskip and and drvcut. Built with Comskip 80_25.
  • Next version will also output Podcast XML, which will greatly clean up the experience on the iPhone.
  • Keep an eye on the transcode tag here for future updates.

$sourceFilesUnfiltered = "C:\Users\Public\Recorded TV\*.wtv"; $binDir = "C:\Users\Media\Downloads\comskip80_025"; $outputDir = "C:\iPodVideos2"; $keepWindowDays = 14; $sleepInterval = 600; while(1) { # Filter the input files $sourceFiles = Get-ChildItem $sourceFilesUnfiltered | Where-Object { $_.CreationTime -gt (Get-Date).AddDays(0 - $keepWindowDays) } | Sort-Object CreationTime; Write-Output ("Setting process priority to Idle."); [System.Diagnostics.Process]::GetCurrentProcess().PriorityClass = [System.Diagnostics.ProcessPriorityClass]::Idle; # Convert WTV to DVR-MS, Analyze afor commercials, trim commercials, and transcode to iPhone format. foreach($file in $sourceFiles) { #echo "Beginning $file"; # We don't want to process a currently recording show, so check last write time $file.Refresh(); #if(((Get-Date) - ($file.LastWriteTime)).TotalSeconds -lt 120) #{ # Write-Output ("Skipping $file because it is in use."); # continue; #} try { $handle = $file.OpenWrite(); } catch { Write-Output ("Skipping $file because it is in use."); continue; } finally { #TODO if handle isn't null $handle.Close(); } $baseName = $file.BaseName; $dvrmsFile = "$outputDir\$baseName.dvr-ms"; $cleanName = "$outputDir\$baseName" + "_clean.dvr-ms"; $m4vName = "$outputDir\$baseName" + ".m4v"; $trimFile = "$outputDir\$baseName" + "_dvrcut.bat"; #if ipod version does not exist if(!(Test-Path $m4vName)) { Write-Output "Beginning $file"; Write-Output ("Converting to DVR-MS."); & "C:\Windows\ehome\WTVConverter.exe" $file $dvrmsFile | Wait-Process; Write-Output ("Running ComSkip."); & "$binDir\comskip.exe" -q --ini="$binDir\comskip.ini" $dvrmsFile $outputDir | Wait-Process; Write-Output ("Trimming Commercials."); & Start-Process -Wait $trimFile;# | Wait-Process; Write-Output ("Compressing video."); & "$binDir\ffmpeg.exe" -y -i $cleanName -f mp4 -s 480x320 -acodec libfaac -async 4800 -dts_delta_threshold 1 -threads auto -vcodec libx264 -b 512k -level 21 -r 30000/1001 -bufsize 2000k -maxrate 768k -g 250 -coder 0 $m4vName | Wait-Process; del "$outputDir\$baseName.log", "$outputDir\$baseName.logo.txt", "$outputDir\$baseName.txt", $trimFile, $dvrmsFile, $cleanName; } else { Write-Output "Nothing to do for $file"; } #break; } # Delete extra (outside of the keep window) files foreach($m4vfile in Get-ChildItem "$outputDir\*.m4v") { $matchFound = [bool]0; foreach($wtvFile in $sourceFiles) { if($wtvFile.BaseName -eq $m4vFile.BaseName) { $matchFound = [bool]1; } } if(!$matchFound) { Write-Output ("Extra file found: $m4vFile"); } } Start-Sleep $sleepInterval; }

Sunday, January 25, 2009

Bootable USB Flash Drive

Reposting these instructions on making a bootable flash drive.

  • On a command prompt, run diskpart.
  • list disk
  • select disk 2 (Replacing 2 with the correct number!)
  • clean
  • create partition primary
  • select partition 1
  • active
  • format fs=fat32 quick (Note that fs=ntfs will NOT be bootable!)
  • assign
  • exit
  • robocopy /MIR [source drive] [destination flash drive]

In short, you create an active, primary partition on the drive (and you have to do this in diskpart, because the Windows UI doesn't support it) and then you copy the files from your Windows installation media to the drive. And here I always thought that this was something difficult!

Saturday, January 17, 2009

ShowMeCables.com

I have to post a rave about the customer service at ShowMeCables.com.

A while back, I decided to make a Y-adapter so that I could use an iPhone headset with my computer, which has the traditional separate mic and headphone jacks.

A few weeks ago, I got an email through my web contact form from John at ShowMeCables.com. He asked me if I knew why he was seeing so much web traffic from my domain. I told him about the adapter I had put together and shared links, and said that a post I had made on a forum had really led to it being noticed.

He replied and said he understood what I was trying to accomplish. He said that he would have one of the guys in his custom cable division whip me up a prototype and he'd send it to me. All he asked in return was that I let him know if it met my expectations.

A few days later I got a fedex with the connector. It was well made with durable-feeling construction. The best part was the handwritten-in-sharpie "mic" and "headphone" labels on the connectors. They sent me the very first prototype! I love it!

So to anyone looking for any custom cable connectors, do me a favor and check out ShowMeCables.com. If you have interest in the specific adapter, you can order it directly here. In fact, the adapter pictured there (at least as of now) is the actual unit they sent to me.

Is that customer service worth raving about, or what??

Wednesday, December 24, 2008

New CFL Light Bulbs

It's more popular than ever to be green. GE today unveiled a new compact fluorescent light bulb that is the size and shape of a traditional incandescent light bulb. Click through for a picture.

Tuesday, November 11, 2008

Windows Mobile 6.1 SMTP Patch

If you ever have trouble sending messages on your IMAP or POP3 account on your Windows Mobile 6.1 device, check out this patch from Microsoft.

Wednesday, October 08, 2008

HTC Diamond

I just picked up an HTC Diamond from Sprint. It's by far the best mobile phone I've owned. The display is just jaw-dropping. It's pretty speedy, and the TouchFlo 3D interface is a nice step forward. It's not as good as the iPhone, and every now and then Windows Mobile 6.1 rears its ugly stylus-head, but most things tick along with just my thumb.

A few tweaks I've made:

  • Remove the Sprint Music link from the music player. Frees up more screen space for album art. Also while you're editing that XML file, delete the Sprint TV. There's no need for that in the quick-launch.
  • A few registry tweaks. Turn on a geo-tagging camera (though I've only had it report 0,0 in flickr...wonder if they turned it off for a reason?).
  • Of course I installed S2U2 to lock the screen. Also remapped (#31) the "Manila" (internal name for TouchFlo 3D) home key to have a "Lock" softkey.

Sunday, August 03, 2008

Touch Diamond

Rumor has it that the HTC Touch Diamond is coming to Sprint this month. I've had my eye on this phone for a while now...fingers crossed!

Sunday, July 27, 2008

Windows Mobile 6.1 Upgrade

I just upgraded my HTC Sprint Mogul/PPC6800 to Windows Mobile 6.1. Before I upgraded, I took down a list of the key software that I needed to reinstall. In no particular order, I present my key Windows Mobile utilities:

  • S2U2 - an iPhone screen locker clone. Search to find the latest version in the XDA developers forums.
  • gpsVP - Open source/Garmin Research project for GPS. Works with most (all?) Garmin GPS maps, and best of all, it can be used offline (no active cell/data connection required). Save trails, import & export waypoints, etc. Very cool.
  • Live Search - Good for turn-by-turn driving directions and location-based services (like, show me bars near where I am right now).
  • OneNote Mobile - Take your favorite notebook on the road. You do use OneNote, don't you? Install from OneNote on the desktop: Tools / Options / OneNote Mobile.
  • SKTools - Utility for cleaning up the Notifications Queue on Windows Mobile. If you have ever experienced the "phantom alarm," this utility can clean that up.
  • Google Maps - Good for driving directions and "where am I right now." Not as feature-rich as Live Search, but more user-friendly. Depends on what I'm after.
  • VisualGPSce - Another GPS utility. Just gives raw data from the satellites.
  • TouchPal - The best on-screen keyboard I've found. I have stopped using the hardware keyboard on the Mogul in deference to this.
  • Streaming Media - For playing streaming media, especially from m.youtube.com.
  • Remote Desktop - Sprint removes Remote Desktop from their firmware. Why? I add it back in.
  • Total Commander - Replacement for Explorer, and also a registry editor.

Sunday, June 08, 2008

Use an iPhone Headset for VoIP

Edit: ShowMeCables.com has started making this adapter commercially available. This came about as a result of a conversation between them and me.

The minimalist design of the iPhone headset appeals to me, and I wanted to try using it for VoIP applications on my PC. The iPhone uses a 4-connector 3.5mm headphone jack, but my laptop has two separate female jacks: one for the microphone and one for the headphones. So, I ordered a connector and busted out my soldering iron. The finished product is below—click through to see the pinout diagrams for reference. I cannibalized the male connectors from a previous headset (which was clunky and bulky, by comparison to the iPhone headset) and exercised quite a bit of trial-and-error to get it right (tested by holding the wires, soldered, realized my mistake, unsoldered, retested, soldered, tested). The jack in the pictures was purchased online, part 30-705.

iPhone to Standard adapter

Sideshow for Windows Mobile

I'm a few days late with this one, but Microsoft has released a Sideshow application for Windows Mobile. Download link for the Developer Preview.

Thursday, June 05, 2008

Thoughts on Bluetooth Headsets

Bluetooth headsets are tools, not fashion accessories. Wear it when you are actually using it, and take it off when you are done.

That is all.

Tuesday, May 27, 2008

Cardo S-800

Last week I picked up a Cardo S-800 bluetooth headset. There are plenty of reviews on it floating around on the Internet, so I won't get into detail. I will say that it does one thing particularly well: it supports pairing and easily switching between two devices. Double-click the wheel and it's switched. I have it paired with my cell phone and my laptop, making it blindingly easy to use one headset for cell and VoIP calls. It also charges off of USB (Micro-USB, unfortunately, not Mini-USB, but at least all I have to carry is a cable and not a power brick). Highly recommended if you find yourself with a similar need.

Monday, March 10, 2008

Sprint HTC Mogul ROM Update

This is the one we've been waiting for: an upgrade to the radio for EVDO Rev A and GPS. Downloading now! http://www.america.htc.com/mogulupdate. (Edit: Fixed the link.)

Tuesday, January 15, 2008

TouchPal

I just discovered TouchPal, an on-screen keyboard for Windows Mobile optimized for fat-fingering. I'm pretty happy with my Mogul, but one of my biggest gripes is the delay when I slide out the hardware keyboard (and it switches from portrait to landscape mode), and the on-screen keyboard requires a stylus (or the corner of a fingernail). This little freeware utility has nice finger-sized buttons, predictive input and an easy way to be precise (tap on the big QW key and then slide right to pick W, or left to pick Q). If you share my gripes, check out this utility.

Sunday, October 07, 2007

Goodbye T-Mobile, hello Sprint

As you may have guessed from my earlier post, I have been dissatisfied with T-Mobile's data offering. So I switched to Sprint and got an HTC Mogul. It's a pretty sweet phone...a little bigger than I really want (the Dash was pretty sexy), but you get a touch screen and a slider keyboard. The EV-DO is awesome, although I'm having an issue where when I connect the Internet Sharing application it drops. Oh, and Sprint's DNS was taking 30-45 seconds to resolve names. I fixed it with this OpenDNS hack. So there are a few quirks that I'm sure I'll get ironed out, but all in all, I'm confident that the move was a good one.

I got a new phone number, too. If you have my old 217 number, it won't work anymore; drop me a line for my new 773 number.

Thursday, September 20, 2007

Streaming Media Center Content

A friend sent me this link: Microsoft adds Slingbox-like capability to its Media Center PCs. I spent the better part of this evening playing with it and I have to say: this is hot. I can log into my media center box and stream any recorded TV program or music in real time. The content is transcoded into a lower bitrate/resolution on the fly. I can almost stream recorded TV over T-Mobile's EDGE network (but not quite...too much stuttering while buffering). It's not as nice as watching the actual program on my actual TV, but if I'm, say, staffed out of town and I want to catch a show I recorded, it will get the job done.

Edit: Here's a photo of M*A*S*H streaming to my phone over Wifi. 15 frames/sec, 160x120, 100kbps.

Sunday, August 26, 2007

In a car...

I'm on I-90/39 in Wisconsin in between corn fields, using my carpool friend Mark's Sprint phone to connect to the Internet. I'm getting over 1.1 MBit/sec down and 90 KBit/sec up. In a car. In the middle of nowhere. I can't believe how good this is, especially compared to my T-Mobile Dash with dial-up quality EDGE. And his data plan is $15/month, compared to my $30/month. Weak, T-Mobile, weak.

Speed test

Wednesday, July 25, 2007

Home VoIP Phone Setup

I recently discovered how to get a "free" home phone line.

  • Sign up for GrandCentral. This will get you a free real phone number in the area code of your choice that you can forward wherever you want. Right now my GrandCentral phone number forwards to my cell phone, my office line and my Gizmo account (see the next bullet); when someone calls it, all the phones ring, and I can answer at whichever line makes the most sense. (GrandCentral has a bunch of other cool features, like per-incoming-caller routing, call screening, unified voicemail...check it out.)
  • Sign up for Gizmo, a SIP-based IP telephony service. Gizmo lets you make PC-to-PC calls for free, like so many other instant messaging clients (Messenger, Google Talk, etc). You can also make PC-to-phone calls for $0.019/minute, and you can also buy an incoming phone number from Gizmo...but GrandCentral gave us that for free!
  • Configure your GrandCentral number to forward to your Gizmo account. At this point, incoming phone calls to your GrandCentral number will ring the Gizmo softphone on your PC.
  • Since Gizmo is based on SIP, an open standard, the options for where to go next are wide open. I don't want to be tied to a computer (I want a "home phone"), so I ordered a SIP-based IP phone, the GrandStream BudgeTone 200. If you have an existing analog phone investment (I gave/threw all mine away over the past few years), you could configure an Analong Telephone Adapter (ATA) and plug in your phone or fax. Other devices: Zoom 5801, Linksys PAP2, and many, many more. You could install Asterisk, a free PBX system, or Exchange Unified Messaging. Relying on an open standard makes me feel better than being tied to a proprietary provider, like Skype.

The IP phone I ordered should arrive on Monday. I've been using this setup with a headset plugged into my PC, and I've been happy with the call quality, as have the people I've talked to (especially compared to the crappy cell phone reception I get at home). What I'm not happy about is being dependent on a PC; I'd much rather have a standalone device...you know, a telephone!

Nothing's really "free," either. If you want to make outgoing calls, you have to pay. Well, maybe not...during the GrandCentral beta period, "click2call" is free. You initiate a call on the web site and it rings your phone; when you pick up, it rings the other party's phone. So—for now—you can even make outgoing calls for free if you're willing to jump through a few hoops!

I called AT&T recently to get a quote on a land line. The cheapest I could find was around $8 or $9/month, plus taxes and fees (like 911 service), bringing the bottom line to around $15/month. Compare that to 500 minutes of usage on Gizmo for $10 with no maintenance fees.

I'll have more to report when I get the phone up and running on Monday. For now, I'm excited about a workaround for the crappy cell phone coverage at home for a bare minimum cost (oh, right, the hardware investment...but that's a "gadget," so it's fun and justifiable).

Sunday, July 15, 2007

T-Mobile Dash Home Screen

After upgrading to WM6 on my Dash, I noticed that every time I rebooted, the home screen reset to the T-Mobile Home screen (I prefer the Windows Mobile Default). To fix it, open File Explorer, navigate to \Windows\StartUp, cut MyMsgCenter.lnk, and paste it into \Temp. (You can't delete it directly.) Reboot. Source.

Saturday, June 23, 2007

Solved! Syncing OneNote Mobile

I repaired my Office 2007 installation, rebooted, deleted the partnership on the PC, plugged in my device and it was an option from the get-go. Yay! I can type a shopping list on my PC and take it to the store with me again :)

OneNote Mobile

See the original problem post.