Have you tested the headphones in something else? Like a laptop?
I had a similar problem with my iPod touch. The headphones worked fine in everything except the iPod.
It got increasingly worse....started with only hearing out of one side, then the skipping, volume would go up and down on its own.
The headphone jack was definitely the culprit. I was way past warranty for any kind of replacement or hardware assistance from Apple.
I suppose you could try reaching out to Apple if you are still under warranty.
Or check Google/YouTube for advice on how to fix it. I knew my iPod was a lost cause. I synced up my music to iTunes and got a new iPod, transferred everything back.
Good luck!