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:

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 Jun. 19th, 2025 02:17 pm
Powered by Dreamwidth Studios