In a page that has an embedded flash audio (or video) player in it, is there a way to know the source (IP address or URL) of the embedded audio (or video) file?
is there a way to know to what URL or IP Address a given application is connected to?
Sometimes. As one example, you can click View > View Source to look at elements of a web page. You can also use Safari's Develop menu to Show Web Inspector. You can also use sites like file2hd.com to see if it finds audio or video content on pages.
For downloading YouTube videos, if you're using Safari and have
ClickToFlash installed, right-click on the video and select "Download Video".
You can also use
ClipGrab or
KeepVid or similar apps or sites.
To download via Safari 5:
While viewing the video just click "Window > Activity" then identify the video in the list of elements (it will likely show something like "258K of 1.8MB" and will be the largest file on the list.
Hold the option key down and double-click the file to download.
There have been mixed reports about the availability of this functionality in Safari 6, using the Develop menu.