2016-09-09 2 views
1

Ich versuche, das Audio von einem Video zu extrahieren und es auf stdout auszugeben. Der nächste, den ich bekommen kann, ist das Video auf stdout herunterzuladen.Audio in stdout extrahieren [youtube-dl]

youtube-dl -o - <link to video>

Wer weiß, wie dies zu tun?

Grüße, Austin

Antwort

2

mit Option Versuchen -f Zunächst sind die verfügbaren Formate mit -F

youtube-dl -F https://www.youtube.com/watch?v=CSKewNVWD0Y 

"nur Audio" für die aussehen Dann Formate:

249   webm  audio only DASH audio 62k , opus @ 50k, 20.17MiB 
250   webm  audio only DASH audio 91k , opus @ 70k, 26.26MiB 
171   webm  audio only DASH audio 128k , [email protected], 44.89MiB 
140   m4a  audio only DASH audio 132k , m4a_dash container, [email protected], 51.17MiB 
251   webm  audio only DASH audio 198k , opus @160k, 65.09MiB 
278   webm  256x144 144p 46k , webm container, vp9, 6fps, video only, 11.36MiB 
242   webm  426x240 240p 90k , vp9, 6fps, video only, 19.39MiB 
160   mp4  256x144 144p 125k , avc1.4d400c, 6fps, video only, 15.18MiB 
243   webm  640x360 360p 173k , vp9, 6fps, video only, 39.52MiB 
134   mp4  640x360 360p 214k , avc1.4d4016, 6fps, video only, 47.51MiB 
133   mp4  426x240 240p 255k , avc1.4d4015, 6fps, video only, 37.37MiB 
17   3gp  176x144 small , mp4v.20.3, [email protected] 24k 
36   3gp  320x180 small , mp4v.20.3, mp4a.40.2 
43   webm  640x360 medium , vp8.0, [email protected] 
18   mp4  640x360 medium , avc1.42001E, [email protected] 96k (best) 

Formatcode 251 für opus @ 160 kbps. Und schließlich können Sie verwenden (optional recode mit ffmpeg):

youtube-dl -f 251 https://www.youtube.com/watch?v=CSKewNVWD0Y -o - | ffmpeg -i - -b:a 160k my_fav_novel.mp3