I don't know how to do it with IDM, but I know that in Safari you should first open the video you want to download, make sure it's buffering, then open Window-Activity, find the Youtube part, now check the right side of the Activity Window, find a XX MB, once you found it, 2x click the link that have the XX MB, a Download Prompt Window appears, click "save", and when it finished, rename the file and add .flv (or .mp4 if you buffer higher than 360p) to it, enjoy the Video!!!