A common request: 'I found a piano performance on YouTube — can I get it as MIDI?' Technically it's two steps: extract the audio track, then transcribe it. The interesting questions are legal, not technical.
Getting the audio
Use tools that operate within the platform's terms — YouTube Premium's downloads, or content the creator explicitly offers. If a video is licensed under Creative Commons, the license page states what reuse is allowed. Screen-recording a playback violates the platform's terms even when the music itself is old.
Mind the rights
The recording and the composition usually have different owners. A transcription of a performance creates a derivative of the composition — fine for private study and practice, which is what most people actually want, but publishing an arrangement needs the composition's license checked.
Then it's easy
Once you hold a clean audio file, any in-browser converter finishes the job locally: drop the file in, wait for the piano roll, fix the two or three notes the reverb smudged, export the .mid. Two minutes, no upload.