Why bother transcoding... youtube will gladly serve you various audio and video formats seperately. Just download the opus stream and save to a file. Let te user transcode to mp3 if they need it.
afaik they only serve AAC and opus audio, which should be fine on modern players, but people with embedded players and/or old ipods might need a mp3.
>Let te user transcode to mp3 if they need it.
convenience factor
You need to put the video and audio streams together, though. Which requires a transcode pass.
I think that's called muxing, since you aren't really changing codecs, just bundling streams together.
Not a transcode just a mux of the different audio and video files into a container such as MP4 or MKV. Pop ffmpeg in the same directory as youtube-dl and it will do the work for you. A simple 'youtube-dl [video url] -f bestvideo+bestaudio' will get you a nice single file with the best audio and video :)