I think you are saying that you get the Url for the YouTube mp4 file and you want to stream that but only play the audio, rather than extract the audio track on the server side and just stream the audio.
You don't mention the platform you are using, but for web or for mobile devices the easiest approach may be to simply play it with a regular video player and just hide the video display.
This is most likely inefficient, depending on how clever the media player is - i.e. if it is clever enough not to bother decoding and preparing the video for display when it knows it is not actually visible then it would be fine, but I think this is not a likely feature for most media players.
If it is just for occasional use then the efficiency may not matter to you.
If you do have the option to process the mp4 on a server someplace first, then you can use ffmpeg to extract an mp3 audio file from the mp4 - see this answer for example: https://stackoverflow.com/a/36324719/334402
Its worth noting that YouTube generally wants its own player to be used to play its video so any approach which extracts the 'raw' mp4 url may stop working without notice. Look at the 'You Can't' and the 'Yes you Can' answers here to see some more background: Is there a Youtube API that gives only audio?
(In case that question gets deleted or the link breaks the 'TL;DR' version is: Its against YouTube's terms and conditions to do things like this but there are nevertheless examples of solutions which do it).