Sunday, September 19, 2010

Changing Default Kernels in Linux

A quick post (partly to keep this information handy in the future for myself):

How to change the default starting kernel in Linux (Ubuntu 10.04 to be specific, but these directions should work for other distros):

If GRUB1 is your bootloader:

sudo nano /boot/grub/menu.lst
Change default 0 to the number of the kernel you want to start automatically (list of available kernels at the bottom of the page, just below END DEFAULT OPTIONS)

If GRUB2 is your bootloader (default in 9.10 and later I believe):

nano /boot/grub/grub.cfg (look at the bottom of this file for the kernel you want and count which one it is (0 is the first, 1 is the second, etc)
sudo nano /etc/default/grub
If you want to have a menu display during bootup, comment out GRUB_HIDDEN_TIMEOUT=0. To change your default kernel, put the number in GRUB_DEFAULT. You can also use the full name which was visible in the /boot/grub/grub.cfg file, such as GRUB_DEFAULT="Ubuntu, with Linux 2.6.31-11-rt"

Well that's it for now. Have fun with custom kernels!

Friday, October 30, 2009

Routing Systems Presentation

Last night at the Bozeman LUG (Linux Users Group) I presented for the second time, this time on a comparison of routing systems. It specifically examined open source router software for use at 50+ person LAN events on campus. I ended up selecting pfSense, and have been happy with it ever since. If you're interested, the slides are linked below. Consider this a mini-review of DD-WRT, pfSense and Untangle from the perspective of some of the most demanding users on the planet: gamers at a LAN party.

Routing Systems: A Real Life Comparison

Tuesday, October 27, 2009

16-bit Assembly Compilation in 64-bit Windows 7

I'm taking Computer Organization and Architecture this semester, and as part of the class I need to write/compile some assembly programs. Unfortunately, due to the age of the class, all of the example code & what we're being taught is with respect to 16-bit DOS programs. So I was in the unusual situation of needing to compile code that won't run in my current OS (Windows 7 Professional-64bit).

After experimenting a while, I got the following setup to work:

1. Installed Visual Studio 2008 & all associated updates
2. Downloaded & extracted a 16-bit compatible linker using a VM running XP (any box running XP will be able to extract it)
3. Created a folder for the assembly programming, made sure the link.exe from (2) was inside the folder.
4. Created a batch file (compile.bat) to automate the compile/linking process:
//start batch file
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\ml.exe" /omf /Bllink16 /Zm %1.asm
LINK.EXE %1.obj,%1.exe,nul.map,.lib,nul.def
//end batch file
5. Begin writing programs. To compile, simply type "compile helloworld" (WITHOUT the .asm)
For example, here's a sample run of a famous program:
//begin console
c:\Assembly>compile hello

c:\Assembly>"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\ml.exe" /
omf /Bllink16 /Zm hello.asm
Microsoft (R) Macro Assembler Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

Assembling: hello.asm

c:\Assembly>LINK.EXE hello.obj,hello.exe,nul.map,.lib,nul.def

Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994
Copyright (C) Microsoft Corp 1984-1993. All rights reserved.
//end console
6. Finally, to test the compiled programs I run them inside a DOSBox instance (as Win7-64 doesn't run 16-bit programs).
//begin console
C:\>hello.exe
Hello, World!
C:\>_
//end console

Hopefully this helps someone running into the same issues I did.

Tuesday, October 20, 2009

Windows Media Player in Windows 7 Dolby Dynamic Range Compression

So based on my Google Analytics numbers, I've gotten a fair number of people visiting this blog looking for Dynamic Range Compression information in VLC. Recently I was watching some OTA HDTV in Windows Media Player in Windows 7, and heard the unmistakable sudden volume shifts of Dynamic Range Compression. After clicking around in the menus, I discovered the location for the DRC Dolby setting in Windows 7. Right click on the playing video, select Enhancements, then Dolby Digital settings. Select Theater, and enjoy the much increased dynamic range.

Thursday, September 3, 2009

3D Point Clouds vs # of Input Images

In the random fun stuff category, earlier this year (Spring semester) I wrote a Data Analysis Report for a statistics class. The data set was the number of points in the 3D point cloud generated by the Photo Tourism algorithm compared to the number of input images. The results I got turned out a LOT better than I expected. If you're interested, feel free to take a look. Please note that this report was oriented towards an Engineering Statistics Class, and as such there is a fair amount of p-values and MiniTab graphs and output, etc. Stuff on Bozeman's new OTA HD outlook coming soon...

Wednesday, August 12, 2009

Good Things Are Brewing

After an extended hiatus, I have returned. Temporarily at least.

While I've been away at my summer internship there have been rumors that the HD situtation in Bozeman has dramatically improved. I will be returning in a couple weeks to the Bozeman area, where I will be sure to report back on the new status of OTA HD in Bozeman. Also, we should have our first useful portable HD Radio in the form of the new Zune HD which will be arriving a bit later this fall. It is on my 'possible purchase' list. First up is a Core i5 to replace my current aging C2D E6600.

Anyways, I'll see you in a week or two, same location.

Tuesday, January 13, 2009

PureVideo HD (VP2) Really Helps

So recently, thanks to the generosity of a friend, I was able to swap my 8800 GTS (640MB) for his spare 9800 GTX (512MB). While there is a noticeable increase in gaming performance, where I REALLY noticed a difference was in HD-DVD and H.264 decoding. My brother recently purchased a Canon Vixia HD camcorder, which records 17Mb/s H.264 AVCHD encoded video. The video is beautiful, but on my Core 2 Duo E6600 (2.4GHz) & nVidia GeForce 8800 GTS combination I was unable to play it at anything near native frame rate. The CPU would sit at 100% CPU and would render a couple frames every couple seconds. Not nearly watchable.

Using the same CPU along with the 9800 GTX, however, it's an entirely different picture (as long as you use a PureVideo HD enabled player). Using Media Player Classic Homecinema (which is DXVA enabled), the video runs smooth as butter on my system, with only a couple percent CPU usage.

It is a similar story with HD-DVD, though quite not so startling. With my 8800 GTS, when playing h.264 encoded discs it would be relatively smooth, but not completely, and every fifteen minutes while playing VC1 encoded discs it would stutter for a moment. No longer. The 9800 GTX does enough of the processing that my CPU now sits around 20% usage, and the video plays stutter free and completely smooth for the h.264 encoded discs.

So, in summary, VP2 really improved HD playback over VP1 (which was in my 8800 GTS 640MB). Make sure that whatever video player you use supports PureVideo HD or DXVA to get the most benefit.Also, try out MPC Homecinema if you want to do some HD video watching with a VP2 equipped system.

Additional Reading: HD Video Decode Quality and Performance Summer '07

Friday, November 14, 2008

VideoLAN Client Dynamic Range Compression

A little note on something related to my earlier post.

By default VLC's Dolby decoder follows Dynamic Range Compression (sometimes called DRC) encoded into AC3 files. While this is great for TV's built in speakers and the tinny PC speakers that came with your Packard Bell, that isn't optimal for THX certified home theater systems.

Thankfully it's easy to fix the issue. The following instructions are with respect to VLC 0.9.6.

1. Start up VLC.
2. Click Tools, then Preferences.
3. At the bottom of the Preferences screen, click All.
4. In the left list, click Input/Codecs, Audio codecs, then A/52.
5. Uncheck A/52 dynamic range compression.
6. While you're there, click DCA (stands for DTS Coherent Acoustics, the DTS codec used in DVDs, not to be confused with the Theatrical DTS codec) in the left list, and uncheck DTS dynamic range compression.
7. Click Save.

Now you can enjoy your HDTV/DVDs with a dynamic range you didn't think was possible!

MythWeb buggering on NBC

So a little while ago I wanted to pull up a Chuck I had recorded OTA from our local NBC affiliate using MythTV. Seeing as how my home theater PC is Windows currently (VLC, and therefore Linux can't handle Dolby TrueHD or DTS-HD Master yet unfortunately), I used MythWeb to download the episode to my hard drive, and tried to play it using VLC for Windows.

I was greeted with no audio, and a video track that went through the entire ~hour episode in a matter of minutes. It would show a couple seconds of a scene, then skip forward a number of minutes, rinse and repeat.

I tried downloading the file again, and then tried opening on Linux VLC on a different computer. No go, same issues. A friend of mine who originally got me into MythTV suggested I try reencoding the video using mythtranscode. A bit of research later, and I entered the following command into the Linux command line:

mythtranscode --infile /var/lib/mythtv/recordings/1061_20081110185800.mpg --mpeg2 --showprogress --outfile /home/pcjjman/videos/chuck.mpg

Most of the options are self-explanatory. The --mpeg2 tells mythtranscode to convert the TS stream to a PS stream, and reencode any frames next to commercials. The end result of the operation was the reencoded file played perfectly and I was able to enjoy Chuck in 1080i and 5.1. It also allowed me to skip through the episode using the Alt-Arrow Keys shortcuts in VLC, which didn't work previously.

So if you download a file straight off MythWeb and it's not playing correctly, try reencoding it. It might just do the trick.

Friday, September 26, 2008

HD Radio in Bozeman

Since I've written a fair amount about HDTV in Bozeman, I figured I should put down my thoughts on HD Radio in the local area.

Prior to a trip home to Seattle earlier this year, I upgraded my vehicle's stereo to a JVC KD-HDR30 HD Radio equipped deck. I've been very happy with it, having used it extensively for CD-MP3 playback, connection to a portable MP3 player and of course HD Radio.

Out in Seattle the number of HD choices is almost overwhelming. I particularly found KNDD-HD2 (1077 the end) rather enjoyable, seeing as it played just 'local' music (which apparently includes Portland) without commercials.

In Bozeman, as you would expect, choices are not so numerous. In fact they number just two.

The first, and the one that I almost always have my radio tuned to is our local NPR affiliate, part of Yellowstone Public Radio (YPR), KBMC-HD (though it shows as KBMC-FM on my stereo). Interestingly, it is the only HD station listed by iBiquity (HD radio's creator) for Bozeman.

In terms of HD quality/features, the HD feed is noticeably clearer than their analog feed. They seem to have periodic bouts of downtime with the HD transmitter, where my deck is able to pick up that there is a digital signal (along with the call-letters), but is never able to lock onto the feed. In those cases I am forced to listen to their analog feed. Sigh.

They also have struggled with synchronizing the HD and analog transmitters, and as of late they are almost but not quite there. They have no program information transmitted with their HD feed, simply a static "YPR | Yellowstone Public Radio | Bozeman, MT" scroll. They also have no HD2 stations, which I certainly hope they will rectify soon (BBC News or NPR Talk please!).

In Googling around I also found a link talking a bit about how the system KBMC transmitter was set up.

The second HD station in town is our local Christian music station, 99.1 KCMM. Their HD feed is even less featured than KBMC's. It has no text sent with the station except for it's call-letters. Interestingly, the HD feed sounds drastically different than the analog feed. While the analog feed is very compressed (low dynamic range) and has some of the most over-emphasized bass I've heard on radio, the HD feed sounds as if it is coming straight out of the sound engineer's mixing board and skipping the compressor and EQ for the analog feed. One side effect of that, is that it appears to be almost half the volume of the standard station. So when it goes from analog to HD, you have to turn it up 10db to get the same volume, and when you lose the analog signal (or switch stations) you rush to turn it down before your eardrums implode.

Well, that's an overview of the HD Radio options in Bozeman, which are even sparser than the HDTV options. Until next time!

Wednesday, September 3, 2008

Photosynth of MSU Engineering Complex

So I've been eagerly following the happenings of Photosynth. They recently released it publicly for the first time, and as a test I took a ton of pictures of the Engineering Complex at Montana State University. It consists of three interconnected buildings, Roberts Hall (where I commonly take EE classes), Cobleigh Hall (EE classes & Labs), and EPS (Engineering & Physical Sciences, where I take my CS classes/labs). It didn't turn out as well as I hoped, but I posted it none the less. Be sure to click on the Next 3d Group (or hit the m key) to view all the 3d viewpoints. It wasn't able to merge all the images into one 3d group, but I have high hopes for my next attempt.

Do note that currently it is Windows only, unfortunately.

Thursday, July 31, 2008

Audio Path for ABC, CBS, NBC, PBS

So I was looking for a price list on Dolby multichannel encoders, and came across this page. Dolby has PDFs available for ABC, CBS, NBC & PBS detailing the pathway the original feed takes from satellites through your local affiliate and finally into your HDTV. It is interesting to note that only NBC gives the local station the full uncompressed audio stream to all it's affiliates. ABC does give a nice 640Kb/s AC3 stream however, and CBS gives a Dolby E stream (a Dolby technology which encodes up to an 8 channel digital stream into 2 uncompressed audio channels). Now if only all the local stations could give Bozeman the surround sound goodness available in the source (KTVM excepted, of course).

Friday, July 18, 2008

Snapshots of Each Channel

So here are some snapshots from each channel I can receive, along with the program I recorded it during for the HD channels. For the SD channels I'm not actually sure what each program is, as I never really watch them :-). All of these images were taken from the original transport stream using VLC with the Linear deinterlace filter on. Without further adieu, here they are (be sure to click on each image to see it at full resolution)!

KBZK-DT CBS (Numb3rs)


KBZK-CW CW (Unknown, feel free to leave a comment with what the show is)
KUSM-HD PBS (Nova)

KUSM-DT PBS

KTVM-HD NBC (Monk)

Thursday, July 17, 2008

OTA HDTV in Bozeman

In case you didn't know, I am a bit of a home theater aficionado. While I am also a college student with no money, I have assembled a reasonable quality system using my computer as it's foundation. One way I introduce new new media into the system is through Over-The-Air (OTA) HDTV signals. The standard via which you recieve these signals is called ATSC.

As I am going to school at Montana State University in Bozeman, Montana, I unfortunately do not have the same sort of selection of HD channels that I would have back in Seattle. Fortunately though there is still some high-definition material on the airwaves. Below is a chart comparing each channel.

Bozeman HDTV Summary
NameTypeChannelProgramRes.ProgressiveDolby 5.1?Bitrate (Mb/s)
KUSM-HDPBS89.31080NoNo14.27
KUSM-DTPBS89.4480NoNo3.03
KBZK-DTCBS137.31080NoNo14.47
KBZK-CWCW137.4480NoNo2.73
KTVM-HDNBC346.11080NoYes15.37


The bitrate readings were taken using TSReader Lite over a 5 minute period.

Important to me is the fact that only KTVM, our NBC affiliate, has audio in 5.1 Dolby. The rest have Dolby Surround compatible 2 channel downmixes. From what I have heard from the broadcast engineers, this is because of EBS regulations, and a lack of funds to purchase the required 5.1 Dolby encoder.

In terms of HD material, the KUSM-HD has beautiful HD material on the air 99% of the time. If I ever need to show someone how good HD can look, usually I'll pull them up.

None of the channels have local news in high definition, though anything that is on primetime usually is broadcast in HD.

You may be wondering where ABC & Fox are. The reason for their absense is the fact that they are not broadcasting digital signals yet, and are not expected to until the cutoff date. More worrying is the fact that even in Billings, where they are being broadcast digitally, neither one is in high definition. I intend to contact each of them and find out what their plans are for broadcasting digitally after the cutoff date.

Well there is a quick rundown of the different Over-The-Air digital options for Bozeman, Montana.

Edit: when I get a chance, I'll upload images of each channel during primetime.
Edit2: Woohoo! I got past Blogger's attempts to screw up my table.

HDHomeRun

So late last year I needed a way to view OTA HD broadcasts. I searched around, and while I originally was thinking about purchasing a PCI or USB based capture device, a friend mentioned that he had been looking at the SiliconDust HDHomeRun device.

Essentially the HDHomeRun is an ATSC/QAM tuner with an Ethernet output. The device connects to an over the air antenna or unencrypted cable coax jack and then sends beautiful MPEG2 signals across your home network. They have a rather primitive Config tool for windows to allow you to look up and view channels, but to really use the device you should connect it to MythTV, BeyondTV, or some other computer based DVR program (I personally use MythTV and highly recommend it).

Next post: a review of the Over-The-Air Digital signals in my area!

Tuesday, March 13, 2007

No Component or HD signals in your ATSC STB if you use a Government Voucher

Like many TV/RF nerds, I have been closely following the FTC's decision to disable all analog television broadcasts on February 17th, 2009. This is good news not only for cellular companies (who eagerly snatch up the newly available licensed frequencies), but home theater aficionados who can expect any lazy OTA analog TV stations to get on the bandwagon and begin broadcasting ATSC signals.
Of course along with the switchover comes the question of what will happen to the 15% of US television watching households who get some portion of their tube-entertainment from the airwaves, and likely using an analog television set no less.
To ease the 'pain' of the switchover, the US government earlier this year decided to take a portion of the money recieved from the frequency auctions and place it into the Digital
Television Transition and Public Safety Fund. This fund is devoted to helping Americans switch from watching analog broadcasts to digital ones. The majority of that money will be spent in giving every American household two vouchers for $40 off the price of a digital analog set-top box.
The NTIA (National Telecommunications & Information Administration) today released their recommendations and requirements for qualifying set-top boxes (which will be following referred to as STBs).
I was skimming through it, and it all seemed reasonable until I reached the section of the document concerning video outputs.
In addition to requiring RF and composite output, the specification allows for S-video output to be included. It does restrict the following items from being included as outputs for the STB:

"Digital Video Interface (DVI);
Component video (YPbPr);
High-Definition Multimedia Interface (HDMI);
Computer video (VGA);
USB IEEE-1394 (iLink or Firewire)
Ethernet (IEEE-802.3)
Wireless (IEEE0802.11)"

The reasoning behind these restrictions are that the device is only supposed to replicate the current functioning of analog televisions using ATSC digital signals.
While I understand that reasoning, I disagree with their restriction. If that were true, shouldn't S-Video be restricted as well? I completely agree with not allowing US consumers to use their $40 voucher for a $500 HD Tivo-DVR, I was under the assumption that after January 1st, 2008 (which is when the program starts) I could immediately purchase a decent HD-tuner STB, with component, VGA, and optical audio output. This unneccessary restriction of the quality of the signal is disappointing. Why not put all of the above connections into the "Optional" column?


DVT Coupon Final Rules; NTIA