How to transfer everything (non purchased) from my iPhone to iTunes?

I recently got a new computer (MacBook Air) because my old computer crashed. I need to get all of my songs (600 of them) from my iPhone to my new iTunes. Almost all of my songs that I have are songs that I got from converting YouTube videos and such, so iTunes won't let me transfer it all. I've tried all of the downloadable software out there but they are all only free trials, only letting me transfer like 10 or 20 songs. I need a 100% free way to transfer them all. I've tried nearly everything, so any help would be appreciated.

Added (1). I've tried software like
SharePod and TouchTunes

Em, I have one tool named Bigasoft iPod Transfer for Mac which can meet your need. But it is not free.