I’m not sure if there’s a name for the feeling, but often, the reason we feel that way about certain pieces of music is because they feature minor keys instead of major keys.
Major keys = happy Minor keys = sad
That said, I don’t think either of your examples are in minor keys.