metadata and wires

Dear Lazyweb, here are two unrelated questions:

  1. What's a command-line MacOS way to extract iTunes metadata from a MOV file (e.g., "Title", "Artist", "Year")? The Perl modules MP4::Info and Audio::M4P::QuickTime and AtomicParsley will extract such metadata from MP4 files, but none of them work on the QuickTime container.

      Update: 'mdls' seems to be the simplest answer to this for MOV files (but not MP4 files, for which MP4::Info works ok.)
  2. I put an extension on the cable of my cellphone booster, because a better spot for the antenna was a bit farther away than the 100' piece of coax that it came with. However, this seems to have made matters worse instead of better. In my experience in the past, all coax is more-or-less created equal, but maybe that's not the case when it comes to the frequencies involved here. What kind of cable should I be using for this?

      Update: I replaced it with a single run of RG-6/U quad shield ("Belden 7916A"), and it works a lot better. So either I had a crappy cable in there, or connecting two cables together was a bad idea.
Tags: , , , ,

26 Responses:

  1. solarbird says:

    From the Thinkgeek spec:
    Signal antenna cable: Outdoor rated 75 ohm DBS satellite coaxial cable, Type-F male

    That's usually RG-6. If you bought RG-59, that could be your problem. Also, you'd want to make sure the ends are crimped very well; improper (inadequate) crimping has caused me endless hell when dealing with RF.

    Also, and this presumably goes without saying but I say it anyway, don't buy cable from Radio Shack.

    • pvck says:

      I was about to say approximately that, but as I already loaded the page, I'll just second it. RF is a bitch when you are not absolutely sure of the quality of the crimps.

      Is there a possibility that the length of the cable could be changing the resonant frequency of the antenna and thus affecting signal clarity? My antenna-fu is weak, but I remember having a similar issue with non-cell antennas in the past.

      • 7ghent says:

        Theoretically, the length of the cable shouldn't effect the resonant frequency of the antenna, that's the whole point of the cable being shielded.

    • latemodel says:

      Yes, exactly. All coax is created equal, except when you're dealing with RF, where impedance matching becomes an issue. I believe the issue is that you get signal reflections at the joint between one impedance and the other, which obviously tends to fuck up your SNR.

      • valacosa says:

        Impedance matching is an issue for all high-frequency electronics (and not just RF), but basically you're exactly right.

  2. tkil says:

    When you said an extension on the cable of my cellphone booster, do you mean that you used another piece of cable in addition to the one that shipped with the unit? Or did you replace the cable entirely? The latter will likely get you much better results than the former...

    • jwz says:

      Yeah, I just tacked another cable (of unknown vintage) onto the end, because that was easier.

      • satanlvsu2 says:

        Tell your cable internet provider that you need a nice long piece so you can move your modem. It's high end cable since it needs to carry the interwebs on it. Dunno what type it is but that's the easy/lazy way I'd do it.

  3. iota says:

    QT Tools will do what you are looking for:

    From the man page of qt_info:


    (outputs a bunch of un-needed shit)
    + Album : From The Crab
    + Author : the pipe and the crab

  4. bschoate says:

    This is a built-in utility, part of the Spotlight indexing tools in OS X...

    mdls (filename)

    Works with all kinds of files, including audio/video.

    • jwz says:

      Awesome, thanks.

      This works great on MOV files, but unfortunately not on MP4 files. I guess the MP4 indexer isn't as complete, as MP4 files omit the fields that I actually care about: kMDItemAlbum, kMDItemAuthors, kMDItemComment, and kMDItemTitle. All the other fields are common between the two except those.

      Do you know if 'mdls' is parsing the file to get this info, or getting it out of the Spotlight database?

      • ckd says:

        Spotlight database, I suspect. I've been doing a little poking about and it looks like the Spotlight Audio.mdimporter doesn't see .m4a files (it doesn't assign them kMDItemContentType at all)...and I don't have a copy of Leopard around to see if that's been fixed in 10.5.

      • ckd says:

        Aha, it looks like Quicktime.mdimporter is smarter, though.

        Try 'mdimport -f ~/Music/iTunes/iTunes\ Music' to force a rescan?

        • jwz says:

          After I do that, the .mp4 files under "iTunes Music" have the same metadata as before (no kMDItemAlbum, etc.)

          • ckd says:

            Does 'mdimport -d1 somefile.m4a' say it's using the QuickTime.mdimporter? Does -d2 give you the kMDItemAlbum et al?

            • jwz says:

              On an .mp4 file, it is using QuickTime.mdimporter, but -d2 does not show "Album", etc.

              • ckd says:

                Is it showing the file as "public.mpeg-4" or "public.mpeg-4-audio"? I'm guessing it's the former.

                Change the filename to .m4a, or the HFS+ type to 'M4A ', and it should pick up the right type identifier. (Yes, it's stupid. At least it's less stupid than before, when there wasn't any type identifier system at all except for the file extension.)

                • jwz says:

                  On .mp4 files, it shows as "public.mp4". If I rename the file to .m4a, it shows as "public.mpeg-4-audio".

                  However, I can't just go and rename all these files -- they're already imported into iTunes. So I'd have to delete them from iTunes, rename them, and re-import them, which would trash the "Date Added", ratings, etc.

  5. ch says:

    I do some microwave work.

    Coax, connectors (incl. adapters here) and assembly matter a lot at GHz frequencies.

    LMR Times makes some of the best cable in the world, but any high-quality coax (e.g. Belden) will be fine for your application. You need to do the math to figure out what kind of coax you will need. Generally speaking, the thicker it is, the less loss per foot. The kind of connectors you need on the ends may limit your choice.

    Avoid like the plague no-name import crap. You can pretty much judge that on price, if you are dealing with a reputable seller: good cables and assembled cables are not cheap.

    I buy most of my RF cables and accessories at these places:

    P.S. Unless you have the right tools, buy an assembled cable.

    • mackys says:

      LMR Times makes some of the best cable in the world

      I second that. I use LMR-400 for all my outdoor cabling. It's usually not too hard to find premade cables with the correct connectors in several lengths between 10 and 100 feet. I buy from Electro-Comm here in Denver, but there's gotta be 20 places in Silly Valley that sell it.

      That's probably not right for you, though. Your amp is a bit unusual; the specs over at the ThinkGeek page say that the outside cable is supposed to be "Outdoor rated 75 ohm DBS satellite coaxial cable, Type-F male". (Usually these things use N type connectors and 50 Ohm cable.) So if you want to go buy quad-shielded 75 Ohm RG-6 coax from Radio Smack, that will work.

      (Yes I'm contradicting the above person who said not to buy Rat Shack cable. In my defense: I only recommend the quad-shielded RG6 with the soldered-on connectors. The crimped stuff is crap. If you want to order a custom made length of LMR-400 with F connectors, feel free. It will cost.)

      If you haven't moved the outside antenna above the metal roof, this would be a good time. It's almost certain to help. (Metal deadens RF and so it'll limit bad feedback between inside and outside antennas.) However, in my experience these things are quite position sensitive. Sometimes you find the magic sweet spot, and sometimes you don't.

  6. ladyjalana says:

    You don't say how much more than 100' of coax you're using. Bear in mind that coax has a characteristic signal loss per unit length at any given frequency...if that loss for your new cable exceeds how much stronger the signal is in the new location vs. the old one, you were better off before.

    • jwz says:

      I only extended it by about 20', but for the best possible antenna placement, I guess I'd like to go 200' total.

      • ladyjalana says:

        Well...for example, folks mentioned LMR-400, which has an excellent reputation for low-loss.

        "Our LMR-400 cables are used in cell phone amplifier and cell phone repeater systems due to its low loss characteristics. It is also used in cell phone antenna systems when longer cable runs are required. The loss of our LMR-400 cables is approximately 3.8dB/100' (in the 800/850MHz band) as compared to 12dB for our RG-58 cables."

        A loss of three dB is approximately a 50% reduction in signal power. You can also face significant loss for every coupling or connector in the run; how much depends on how good or bad the connector is.

        I'm not familar with the particular device you're using, but have done some work receiving 2.4 GHz amateur radio satellite signals from AMSAT-Oscar 40. One big win is to have the preamp as close as possible to the receiving antenna so that the long coax run carries the stronger amplifier output rather than the weak antenna input signal. (This can sometimes involve using a "bias-T" to send power to the amp over the coax if the amp ends up in an inaccessible location).

        Margaret Stephanie Leber CCP, SCJP SCWCD
        AOPA 925383 -- Amateur Radio Station K3XS -- ARRL 39280 -- AMSAT 32844

        "The art of progress is to preserve order amid change
        and to preserve change amid order."-A.N.Whitehead

        • mackys says:

          One big win is to have the preamp as close as possible to the receiving antenna so that the long coax run carries the stronger amplifier output rather than the weak antenna input signal.

          This is normally a great idea, but it kinda falls over when you need radio signals to travel both up and down the same cable at the same time. The problem is that radio signal amplifiers normally only boost signals flowing in one direction. They almost completely block signal going the other way.

          Bi-directional radio amplifiers are possible because some smart guy figured out how to build frequency diplexers that allow signals from different radio bands to co-exist on the same cable simultaniously.

          So unless you rig a bypass shunt to allow outgoing signals to jump around the pre-amp at the outside antenna (something I only have only the vaguest notion how to do), you're going to destroy the signal that travels out from the phone and goes to the tower.

          Anyway, the problem is probably not that there's insufficient signal coming in. If you can get four bars standing outside on the roof where the outside antenna is, in my experience, that's plenty. The problem is usually that the cell phone amp itself is limiting the inside broadcast power, to avoid creating a catastrophic feedback loop between inside and outside antennas.

          But, if you really need to pull in more signal from outside, I would recommend putting a yagi or other high-gain directional antenna on the roof. The directionality of the antenna will kill ambient noise, and the extra signal gain is of course always appreciated. Just make sure you know what band (800 MHz or 1900 MHz) your cell phone is using, and get an antenna tuned for that band. The other downsides to this are cost and annoyance. Directional antenna (yagi, panel, dish) are more expensive than a standard whip antenna, and because they're directional you have to stand up on the roof and fiddle with the antenna for 45 minutes to to get it aimed correctly. (And then crank down the mounting bolts so it doesn't drift off-aim due to wind or weather.)

          Andddd I'm starting to get obnoxious, so I think I'll shut up now...