isaacschemm: A cartoon of myself as a snail (snail8)
[personal profile] isaacschemm

I recently expanded my triple-boot PC to boot four operating systems off the same drive: DOS, Windows XP, Windows 7, and Debian.

Generally, in the old BIOS world, you'd handle this by having GRUB (controlled and configured by the Linux installation) as the main bootloader, and let it boot Windows and DOS from there. But I like to take a more unconventional method (detailed here) where I have the newest installed version of Windows control the main bootloader, and let Linux boot from DOS.

There were three big changes I made this time.

First, I kept Windows XP and Windows 7 both installed to separate extended partitions. I believe they both install their bootloaders to the DOS partition - I know Windows 7, by default, won't map it to a drive letter because it assumes it's just a system partition (you can change this from Disk Management).

To limit the number of consecutive menus, after installing Windows 7, I removed FreeDOS from the boot.ini used by Windows XP's bootloader (ntldr) and added it to Windows 7's (bootmgr). The bootsect.dos (extracted and created by Windows XP's installer) can be loaded through bootmgr by adding a new entry:

bcdedit /create /d "FreeDOS 1.3" /application bootsector
bcdedit /set {new-guid} device partition=e:
bcdedit /set {new-guid} path \bootsect.dos
bcdedit /displayorder {new-guid} /addlast

Options like /displayorder or /default can be used to customize its spot in the menu.

But most importantly, I still wanted Debian to boot from DOS so it wouldn't touch the MBR (making it easy to delete or replace from within DOS/Windows without breaking anything). But instead of installing grub-legacy in Debian to generate the menu.lst and using GRUB4DOS to boot it (which I'm sure would have worked fine), I wanted to use a method of booting Debian that would rely only on the partition GUID, and not on the drive number.

A snail character between IDE and SATA cables with a thought bubble reading "(hd0,5)" ExpandRead more... )
isaacschemm: A cartoon of myself as a snail (snail8)
[personal profile] isaacschemm

When converting recorded ATSC 1.0 (over-the-air) broadcasts to video DVD format using devede, I've noticed the audio/video sync ends up a little off.

Re-encoding the audio seems to fix this:

ffmpeg -i input.mts -c:v copy -c:a aac -ac 2 output.mkv

This keeps the video data intact, and just re-encodes the audio (as stereo, not the original surround sound).

These sorts of broadcasts usually have an alternate audio track as well - you could use some -map arguments to pick the track(s) you want, but I didn't bother with that this time around.

After doing this, I can put the resulting file into devede :)

If that doesn't work, here's a script that will convert the closed captions to subtitles and re-encode the video. Sometimes this can be necessary - an over-the-air data stream is sometimes missing some data that automated scripts can run into problems with.

#!/bin/sh
set -e
for i in $*; do
	o="$(basename $i)"
	m="$o.mp4"
	if ! [ -f "$m" ];then
		chmod +r "$i"
		ffmpeg -i "$i" -c:a copy -c:v copy "$o"
		ccextractor "$o" -in=ts -out=srt
		ffmpeg -i "$o" -c:a aac -ac 2 -c:v libx264 -preset veryfast "$m"
		rm "$o"
	fi
done
Tags:
isaacschemm: A cartoon of myself as a snail (snail8)
[personal profile] isaacschemm

I stopped by Free Geek Twin Cities recently and picked up (among other things) a Blu-ray player. It's the first time I've had one, and I was pleasantly surprised that it was perfectly happy to play standard audio and video files right off whatever media you put in. It's incredibly useful with the USB port on the front, but it can also read files off a CD or DVD if you happen to have one (not that uncommon; I've certainly put podcasts on a CD-RW before - a lot of car radios will play them!)

I also have a DVR that records shows from U.S. over-the-air digital TV (ATSC 1.0) to a USB device, and the Blu-ray player will play these raw transport stream files perfectly as well.

This gave me an idea: what if you wanted to permanently save something you recorded off the antenna, in its original quality, onto permanent physical media?

Of course, this is a very specific use case, one that I don't even have a need for - it's definitely another case of me putting the cart before the snail, if you will. But the fun part is solving for a specific situation, and making something really unique and cool in the process. Here were my requirements:

  • The content must be a half-hour TV show from U.S. broadcast television, with commercials removed.
  • It must be placed onto write-once / read-only DVD media.
  • The media must contain a copy of the content, in its original quality, that can be played on a PC (or another device with a USB slot and the appropriate codecs).
  • The media must also contain a copy of the content that can be played on a DVD player, with good quality audio, but the video quality of this copy is not important. We're talking about sitcom reruns here - you might as well be watching them on a potato.
  • Finally, the DVD used must be one of those 8-centimeter ones.
    • Because they're cute.

Obviously, it's pretty unusual to dedicate most of the space of a video DVD to data that isn't actually part of the DVD video content.

Could I get, like, a one-twelfth pounder with five tomatoslices and a whole raw onion?

But the important thing here is: your hard copy has the original media (not re-encoded in any way), in case you want to transfer it to another format; and it can be played on a standard consumer device still found in many households, as long as you're only half paying attention. Because although video data takes up most of the bandwidth of any recording, it's almost always the audio that's conveying the most important information, so that's what you want to focus on.

ExpandRead more... )
Tags:
isaacschemm: Drawing of myself as a snail (snail)
[personal profile] isaacschemm

I've got a Dell Dimension 4700. It's a 32-bit PC from the mid-2000s, and it's just barely new enough to have a PCI Express slot, which I used to add USB 3 ports, including a type-C, on a front panel (mostly because I thought it was funny).

The only actual work I do on this computer is writing, and the only way I can concentrate on writing is if my computer doesn't let me do anything else, and doesn't show anything else on the screen. That's why I do all my writing in Word 5.5 for DOS. For editing, I usually like to use Word 97 (with doswrd32.cnv), then export to HTML and copy to a thumbdrive.

I'd also like a Debian installation on there, just in case it comes in handy for some random project, but I don't want to commit to not touching it. There's a good chance I'm going to want to overwrite the installation at some point in the not-too-distant future - either by installing over it (maybe with a newer version), or removing it to make more space in my Windows partition for storing some big ol' files - and I don't want that to break my bootloader.

So what Ireally want my Linux PC to feel like is a PC without Linux...

So I need to be able to:

  • Boot into FreeDOS
  • Boot into Windows (this computer's got a Windows 7 license, so that's what I'm using)
  • Boot into Debian on the rare occasion I need it
  • Delete the Debian partition without breaking the ability to boot into the other environments

In a normal triple-boot, you'd probably do something like this:

  • Install Windows 7
  • Install FreeDOS
  • Install Debian using the rest of the available space

In this situation, Debian installs GRUB 2, which allows you to boot Windows 7 or FreeDOS instead.

But I don't want to commit to my Debian installation - I'd like to be able to overwrite or remove it, and still boot the other two operating systems on the drive. So what I want is a system that asks if I want Windows 7 or FreeDOS, then gives me a sneaky way to boot to Debian instead if I'd like. Turns out there's a setup that works really well in this very specific situation, and doesn't need any external boot disks. I'll walk through it below.

ExpandRead more... )
Tags:

Snail#

A programming blog where the gimmick is that I pretend to be a snail.

Syndicate

RSS Atom

Expand Cut Tags

Expand All Cut TagsCollapse All Cut Tags

Style Credit

Page generated Jul. 20th, 2025 04:13 am
Powered by Dreamwidth Studios