There were, in fact, two Captain Marvels. The original was created by Fawcett Comics in 1939, a year after Superman was first introduced. DC, pissed, sued, and Fawcett ceased publication in 1953. DC acquired the Captain Marvel family from Fawcett, but did not publish any Captain Marvel comics until the 70s. By then, Marvel had created it's own Captain Marvel, and DC couldn't publish the comic under the name Captain Marvel. So they published under the name Shazam! So many people thought that Shazam was the character's name that DC just let Marvel have that one and renamed their Captain Marvel to Shazam!
Incidentally, DC's Captain Marvel appeared on tv first, as a live action hero, in the 70s, then as an animation in the 80's.
Marvel's Captain Marvel, to my knowledge, has never been on tv, animated or otherwise. And the movie made him a woman from the start, which originally, he was not.