Articles

28 April 2018

Fixing videos without sound on 2nd generation Apple TV

I was trying to watch some TV episodes recently that wouldn’t play sound through my second generation Apple TV due to their audio encoding. Fixing them turned out not to be too hard, but working it out took a while, so here it is documented for posterity.

The MP4 video files had AC3 5.1 surround sound audio, shown as “AC3 (6 ch)” in Subler. However, the 2nd gen Apple TV only supports playing stereo audio over HDMI, and 5.1 audio only works via “pass through” on the optical output to an AV receiver (when enabled via Dolby Audio in the Apple TV settings). I don’t have an AV receiver or anything else hooked up to the optical port on my Apple TV. So playing these files on the Apple TV results in no sound being sent via HDMI, and no sound for me while watching these videos.

The fix is to reencode the audio as AAC stereo, while passing through the video and subtitle streams without modification. Install ffmpeg via Homebrew, then run the following command:

ffmpeg -y -i file.mp4 -map 0 -c:v copy -c:a aac -ac 2 -c:s copy file-fixed.mp4

The arguments are as follows:

  • -y — overwrites any existing output file
  • -i file.mp4 — input file
  • -map 0 — sends all streams from the first (and only) input file to the output file
  • -c:v copy — uses the “copy codec” for the video stream, which means pass it through unchanged
  • -c:a aac -ac 2 — uses the AAC codec for the audio stream, with just 2 audio channels
  • -c:s copy — copies the subtitle tracks (if any)
  • file-fixed.mp4 — the output filename.

Looping this over all my files fixed the soundtrack, which appeared afterwards as “AAC (2 ch)” in Subler. It also shaved about 100 MB off the file size of each. I was happily watching the TV episodes (with glorious stereo sound) on my old Apple TV soon after.

Credit to this Stack Overflow post for leading me down the right track.

1 October 2012

Six small improvements in iOS 6

Continuous improvement is a big part of why I continue to buy and advocate Apple products. So after upgrading to iOS 6 on my iPhone 4S, I was curious to see what small things had been tweaked and changed across the OS.

More aggressive auto-dim

One of the first things I noticed after the upgrade was that the lock screen was noticeably dimmer when I first pressed a button to wake the phone up. I’m usually using my phone outdoors, so I typically have my phone configured with maximum brightness. After the upgrade, however, the lock screen definitely wasn’t at maximum brightness.

It appears that iOS 6 is more aggressive with the iPhone auto-dim setting, particularly when waking from sleep. For me, this is a small but noticeable improvement, because the screen is no longer so extremely bright when I wake my phone at nighttime to check the time.

This should also make for a slight improvement in battery life. If your phone is in your bag or pocket and jostling makes it wake up from time to time, the dimmer lock screen should result in less wasted battery.

Improved battery life

My iPhone also seems to be getting much better battery life now that it is running iOS 6. I used to finish a day of work with intermittent use of my phone at around 20-30% battery remaining. After upgrading to iOS 6, I’m seeing it more often at 50-60% at the end of the day.

This is great news for people like me, who occasionally forget to charge their phone overnight, and are left struggling through a second day trying to minimise phone use so the device doesn’t die.

New emoji

For what initially seemed just a gimmick to me — the introduction of emoji in iOS 5 — these little characters have started popping up everywhere. In text messages to my friends and family. In emails. Even in nicknames on the intranet at my work.

With iOS 6, Apple has added even more emoji to the system, including many new faces, foods, and other objects. Adding a bit of colour to your text messages just became even more fun.

Songs for alarms

I was starting to get tired of waking up to the same duck quacking, guitar strumming and blues piano chords. So it was really past time for Apple to support using songs from your music library as an alarm tone — a feature that other phones have had for years.

My advice? Just make sure you and your partner choose different songs for each day so you don’t feel like Bill Murray in Groundhog Day when “I Got You Babe” starts playing at 6:00 every morning.

Spelling correction for keyboard shortcuts

One of the nicest and least publicised features of iOS 5 was the addition of text expansions, known as “keyboard shortcuts” in Apple parlance. Found in Settings > General > Keyboard, you can configure as many shortcuts as you want. I have just one, a tweak to the one which is shipped by default: “omw” converts to “On my way” (without an exclamation mark).

In iOS 6, these shortcuts are now registered with the automatic spelling correction. So if I type “onw” by mistake, in my rush to wherever I’m going, iOS now corrects it and expands it to “On my way” correctly. Such a small change, but one which makes a big difference to me.

Panorama photos

While the last item on my list isn’t a small feature, it’s something I’ve found incredibly useful in the past week: panorama photos. There are plenty of sites that go into detail about how they work and provide stunning examples, but I’m just pleased to be able to capture a great photo of a vista while bushwalking or my surroundings in the city.

Expect to see panorama photos popping up everywhere now that Apple has put this tool into the hands of every amateur iPhone photographer.

Summary

Overall, I’m really happy with the upgrade to iOS 6. The controversial Maps update has not proved a problem to me in my usage so far, and all the little things above make using my phone a better experience.

Also: Three things about iOS 6