That music track [for example] [which makes $1000 a year] wouldn't be quite worth $20,000, since it's not very liquid, right?
It's really hard to price assets like that. It tends to come down to a judgement of how stable the income will be over time. This varies wildly by category and paradigm of the thing in question. Furthermore, in certain particular industries or fields, there is something of an "established" multiplier for a given asset†; then again in other fields there is no such established norm. Furthermore, in certain fields there are very specific (say) laws that come in to play, such as copyright, or, things like long-term leases and laws regarding mineral extraction etc.
However, you absolutely, definitely, cannot say "well it's 20x - same as a theoretical stock" for some business or product entity you wish to sell. (Unfortunately!)
So in perhaps answer to your question,
- There is absolutely no relationship between "multiples seen on the stock market" and "multiples when selling assets or businesses"
To try to literally address the title:
If I have two assets that both have the same returns, but one is liquid and the other is not, how do I calculate the difference in value between them?
Superficially, one might think "sure, 'less liquid' assets are worth less". But that's just not true. Minecraft was both incredibly not liquid and incredibly valuable. If Paul McCartney sold his music publishing empire (MPL), it would be astoundingly not liquid but astoundingly expensive. And the same happens on lower price properties. (A cute example is domains, they are not liquid at all (often there's like "2 buyers") but the price can range from trivial to hilariously high. Same applies to patents, and even things like "investment gems", and art.)
On the other side, it's true that stocks (well, the popular stocks, not thin stocks) basically "define" the concept of liquidity. So, when you say "a restaurant is not very liquid" you are saying "compared to trading Apple and Ford public shares". But there's really nothing else like that, it's not a "comparison that can be made". So, if we asked to compare the "electricalness" of various cars, it would be pointless to observe that the tesla and volt are electric cars, and all the other models simply are not electric cars, it's just a different category. So, you and I could sit around and compare the liquidity of your song library, my programming practice, and our mate's restaurant. But it's meaningless to compare that to stock liquidity, it's just a different type of thing.
† Just a random example, if you have an app on the google/apple stores, and it is making $D per year, it's extremely lucky if you can sell it for 0.5x$D. Or, here's an article about the multiples when selling a restaurant https://sellingrestaurants.com/how-do-i-value-my-restaurant.html As I understand it with patents, it can vary greatly from really high multiples to low. Indeed, for any given field you name, you can indeed immediately find any number of articles on the typical multiple in that field - since obviously it's the whole raison d'etre of any business.