Hello there, kianoosh_en.
It sounds like you're Apple TV is visible to your Mac, but you are not successfully able to connect and stream to the device. There are a few great recommendations in the following Knowledge Base article for troubleshooting performance issues:
iTunes: Troubleshooting AirPlay and AirPlay Mirroring - Apple Support
If you are experiencing intermittent playback or significant network lag with AirPlay, it could be due to a weak Wi-Fi connection, interference, or the distance between the Wi-Fi router and your AirPlay-enabled device.
- Ensure that other devices aren't trying to stream to the same Apple TV at the same time.
- Ensure that your Wi-Fi router is set up with the recommended settings for the best performance.
- Certain external devices, such as microwave ovens and baby monitors, may interfere with a Wi-Fi network. Try moving or disabling these devices.
- If your wireless and wired networks are the same, try connecting your Apple TV to the router via Ethernet instead of Wi-Fi.
- Use the Wi-Fi network troubleshooting guide to resolve interference and other issues.
Temporarily disable firewalls (both network and local) and security software. Security software and firewalls may block ports that AirPlay uses to stream content. You can often resolve issues with security software by updating, correctly configuring, or uninstalling security software.
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro.