Today I listened to a performance by Stephen Lynch in which he said "A public service anouncement from Stephen Lynch" which confused me, a non-native English speaker. Is the usage of "from" correct here? When can I use "from" instead of "by"?
Either is possible, with slightly different meaning: the origin (from) or the immediate channel announcing it (by).
Because he himself is speaking it, you might expect by. But here it is a joke based on the common pattern A public service announcement from ... where from is used I think because the announcement may have been transmitted through various channels, but its origin is what matters, rather than the particular agency announcing it.
I think the use of "from" here has come about through the use of phrases like "now an announcement from our sponsor". And "take it (some advice) from me". In a sense the speaker is declaring himself the benefactor in bringing the public the information.
An announcement is arguably not commonly considered a 'creative artifact', so saying if he said 'by' it wouldn't necessarily portray authorship. More than point of origin (which isn't necessarily true of 'from' in my opinion' (_an announcement came from a loud-speaker), I think the speaker's intent is to say 'brought to you', in the sense of a sponsor or benefactor.
As to when 'from and by' are interchangeable. Where they can be used alternately from does tend to emphasise (metaphorical) movement or physical origination, where I think by emphasises a process or a creative agent.
The lava was formed from melting rock
The lava came about as a metaphorical path of transition, originating with rock and passing through or arriving at the phase of melted rock.
The lava was formed by melting rock
An agent or external cause (perhaps, as implied, the melting rock) was responsible for creating lava.
Perhaps slightly different in meaning though often interchanged in similar circumstances.