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.

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

Let's say you want to embed some videos on your website, and you want to put them in a list so people can click through and watch them.

Aset of three YouTube thumbnails. 1: "Summer CampIsland". 2: "Connecting a Bluetooth tape adapter to aBluetooth adapter for tape players". 3: "Are QuantumLeap and Gilmore Girls CONNECTED?"

The title, description, and thumbnail you give to the video are largely subjective decisions, but the duration - in minutes and seconds - is an objective property of the media itself, which means you should be able to extract it if you know the video's URL. But how exactly do you do that?

Well, the first thing you'll need to do is figure out what exactly you're dealing with: a raw video file (or stream) that plays in the browser's <video> tag, or a link to a page on a site like YouTube or Vimeo that hosts embeddable content. Technologically speaking, it's an entirely different beast. A YouTube page gives you the code for a player, and wraps all of it up with copy protection and a variety of other features specific to the platform. In other words, it's not handing the end user something to play; it's playing it for them. It's kind of like the difference between having a record of a song, and having a band come over with their own instruments to play it on.

SoI've got "Forever Your Girl" on CD, and also PaulaAbdul is in my kitchen. Not sure why.

That doesn't mean they can't serve the same purpose for the end user of your site, though, and in both cases it should be possible to programmatically determine the duration of the media. I've written a .NET library (ISchemm.DurationFinder) that handles this for you for a variety of common video types with just a URL; I'll walk through how it works overall, and how it finds the duration for each type of media that it supports.

Read more... )

Snail#

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

Syndicate

RSS Atom

Expand Cut Tags

No cut tags

Style Credit

Page generated Jul. 10th, 2025 11:58 pm
Powered by Dreamwidth Studios