Doing it on the source machine is technically easier, but much more heavy weight on machine. Doing it on the network means that the transcode is happening multiple times, which can result in playback issues if you get a source segment from two different transcodes.
I have thought about doing something like this because I work for a streaming company, but have always come to some roadblock like the one above for a "real" application of this technique. I wonder how they have solved this.