So ein Thema ist, meiner bescheidenen Meinung nach, nicht schon nach der ersten angebotenen Lösung durch.
Gibt ja außer dem ThreadOpener auch noch andere User, die sich durchaus für das Thema interessieren könnten und jeder hat da wohl andere Ansprüche, vom Streaming bis zum Abspeichern der Audiodatei.
Was MPV betrifft: Es ist ja so die eierlegende Wollmilchsau. Schon das Manual verspricht mit seinen über 12000 Zeilen einiges an Optionen und Schalterchen; nur die ffmpeg Manuals sind da noch etwas länger ...
foo@Devil:~$ man mpv|wc -l
grotty:<standard input> (<standard input>):5812: character above first line discarded
grotty:<standard input> (<standard input>):5816: character above first line discarded
grotty:<standard input> (<standard input>):5820: character above first line discarded
grotty:<standard input> (<standard input>):217617: character above first line discarded
grotty:<standard input> (<standard input>):217621: character above first line discarded
grotty:<standard input> (<standard input>):217625: character above first line discarded
12393
Für die gelegentliche Anwendung ist das nicht jedermanns Sache.
Um den Audiokanal eines Videos zu speichern reicht es schon bis zu etwa Zeile 6000 des manuals zu lesen.
Einfach nach record suchen (ich hab natürlich erst nach output, save etc. gesucht

).
Wer es ausprobieren will, kann es mit Youtube testen:
foo@Devil:/tmp$ mpv --no-video https://www.youtube.com/watch?v=A7UjE8gkqhQ --stream-record=ThisIsDeutsch.mp4
(+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[ffmpeg] mp4: track 0: codec frame size is not set
[recorder] This is an experimental feature. Output files might be broken or not play correctly with various players (including mpv itself).
[recorder] Source stream misses DTS on at least some packets!
[recorder] If the target file format requires DTS, the written file will be invalid.
[ffmpeg] mp4: Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
AO: [pulse] 48000Hz stereo 2ch float
A: 00:04:36 / 00:04:37 (100%) Cache: 0.0s/1KB
Exiting... (End of file)
Oder auch:
foo@Devil:/tmp$ mpv --no-video https://www.youtube.com/watch?v=A7UjE8gkqhQ --stream-record=ThisIsDeutsch.mkv
(+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[recorder] This is an experimental feature. Output files might be broken or not play correctly with various players (including mpv itself).
[recorder] Source stream misses DTS on at least some packets!
[recorder] If the target file format requires DTS, the written file will be invalid.
[ffmpeg] matroska: Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
AO: [pulse] 48000Hz stereo 2ch float
A: 00:04:36 / 00:04:37 (100%) Cache: 0.1s/1KB
Exiting... (End of file)
Will man das Audio in ein mp3-File speichern, wird man allerdings eines Besseren belehrt:
@Devil:/tmp$ mpv --no-video https://www.youtube.com/watch?v=A7UjE8gkqhQ --stream-record=ThisIsDeutsch.mp3
(+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[ffmpeg] mp3: Invalid audio stream. Exactly one MP3 audio stream is required.
[recorder] Writing header failed.
[mkv] Disabling recording.
AO: [pulse] 48000Hz stereo 2ch float
A: 00:00:04 / 00:04:37 (2%) Cache: 272s/10MB
Exiting... (Quit)
Die Beispiele bedingen aber auch, dass man die Datei mit der Dauer von 00:04:37 auch in dieser Zeit anhört und speichert. Die Option, nur mal schnell den Audiokanal in ein paar Sekunden herunter zu laden suche ich noch.
Für den Quicky zwischendurch ist mir da Media Downloader doch lieber. Link eingeben, Mit Get List die möglichen Formate anzeigen lassen und unter Options einfach Best-audio anklicken - fertig. Und Batch-/Playlistverarbeitung schafft der auch.
Für die Verarbeitung in eigenen Skripten, mit einer Feinabstimmung inkl. div. Filter, ist natürlich MPV ideal. Es kommt also, wie so immer, auf die Aufgabe an.
edlin