Hallo hilfbereite openSUSE Community,
ich verwende youtube-dl über das terminal.
Unter youtube-dl --hilfe bekommt man eine lange LIste von Verwendungsmöglickeiten.
Da bei youtube Videos oft ein Vorspann oder eine Einleitung ist, den man nicht braucht, wenn man nur die Tonspur rippen möchte, wäre es eine tolle Sache das in den Befehl beim rippen einzubauen.
Ich habe dazu einen Beitrag dazu gefunden. Doch leider funktioniert das bei mir nicht.
Vielleicht mache ich eine Kleinigkeit falsch obwohl ich nach Anleitung vorgehe.
Hier der original Beitrag:
How to download portion of video with youtube-dl command?
First acquire the actual URL using youtube-dl:
youtube-dl -g “https://www.youtube.com/watch?v=V_f2QkBdbRI”
Copy the output of the command and paste it as part of the -i parameter of the next command:
ffmpeg -ss 00:00:15.00 -i “OUTPUT-OF-FIRST URL” -t 00:00:10.00 -c copy out.mp4
The -ss parameter in this position states to discard all input up until 15 seconds into the video. The -t option states to capture for 10 seconds. The rest of the command tells it to store as an mp4.
ffmpeg is a popular tool and should be in any of the popular OS repositories/package managers.
Mein Test:
youtube-dl -g https://www.youtube.com/watch?v=BOZEj8wyj-I
https://r2---sn-j5caxn0g4-umal.googlevideo.com/videoplayback?expire=1615483511&ei=F_5JYLn3Lprb7gOI9bHQCw&ip=2a02%3A2455%3Ae1f%3A3400%3Ae8cb%3A6d33%3A20eb%3A4aa5&id=o-AKYzG8HhqUTNpsKraRa0s3STlRXI9yRCLafk4EdEOU8d&itag=135&aitags=133%2C134%2C135%2C160%2C242%2C243%2C244%2C278&source=youtube&requiressl=yes&mh=QT&mm=31%2C29&mn=sn-j5caxn0g4-umal%2Csn-h0jeln7e&ms=au%2Crdu&mv=m&mvi=2&pl=39&initcwndbps=1555000&vprv=1&mime=video%2Fmp4&ns=UAQqCN_LJ1H5IHmfdYHg8ZYF&gir=yes&clen=113307695&dur=1173.639&lmt=1540303491848991&mt=1615461650&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5432432&n=O49DvdqpSRWsuGylY&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAKx6PmHkLwJgPd7qiDmSbPIve4VvZj5mmzOeCPrdI9KuAiAXrHBTwqzoVxEiMAa3_5QfaKKdlsDP1_qgaFokXnGRAg%3D%3D&sig=AOq0QJ8wRQIhAMZIDar10rTI-vv-9aRwLHD-iGbsxoRRdJ5UEjJT2TscAiAd4EZcsTm_FM9XxUYwBpFLAfKlLL22JLX-gMHGU0LUkQ==&ratebypass=yes
https://r2---sn-j5caxn0g4-umal.googlevideo.com/videoplayback?expire=1615483511&ei=F_5JYLn3Lprb7gOI9bHQCw&ip=2a02%3A2455%3Ae1f%3A3400%3Ae8cb%3A6d33%3A20eb%3A4aa5&id=o-AKYzG8HhqUTNpsKraRa0s3STlRXI9yRCLafk4EdEOU8d&itag=251&source=youtube&requiressl=yes&mh=QT&mm=31%2C29&mn=sn-j5caxn0g4-umal%2Csn-h0jeln7e&ms=au%2Crdu&mv=m&mvi=2&pl=39&initcwndbps=1555000&vprv=1&mime=audio%2Fwebm&ns=UAQqCN_LJ1H5IHmfdYHg8ZYF&gir=yes&clen=21098316&dur=1173.661&lmt=1540306402588572&mt=1615461650&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5411222&n=O49DvdqpSRWsuGylY&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhALSoTeET6H_NL6ELAVqNtfxEk510hiT5c7SLZApfKSO1AiA1oJuykuLD6_KB-caGQBkHrYjBOZxgsuChIkcW7eFmtA%3D%3D&sig=AOq0QJ8wRQIhAOP75cyC6SNX6oHGfgMHzjuA2KUXP0p603gPGvfVC4vuAiB6tSDVlJOsaZCsuEAyFx2rYOA9Hd8248C2_RI_Rd5-4Q==&ratebypass=yes
Jetzt das Ergebnis in den nächsten Befehl eingestzt:
ffmpeg -ss 00:00:15.00 -i “OUTPUT-OF-FIRST URL” -t 00:00:10.00 -c copy out.mp4
ffmpeg -ss 00:00:39.00 -i https://r2---sn-j5caxn0g4-umal.googlevideo.com/videoplayback?expire=1615341433&ei=GdNHYK_nJIyrx_AP6KuosAY&ip=2a02%3A2455%3Ae1f%3A3400%3Ae8cb%3A6d33%3A20eb%3A4aa5&id=o-APx5EqJGGuchqkD742WWU1kq8TCsiXwmuaPxYp2WqDpM&itag=251&source=youtube&requiressl=yes&mh=QT&mm=31%2C29&mn=sn-j5caxn0g4-umal%2Csn-h0jeln7e&ms=au%2Crdu&mv=m&mvi=2&pl=39&initcwndbps=1451250&vprv=1&mime=audio%2Fwebm&ns=qOgn4dPi_hDXDDYDqUGCWCoF&gir=yes&clen=21098316&dur=1173.661&lmt=1540306402588572&mt=1615319553&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5411222&n=nKMeRiweXbjIDjy9&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgFtALoujoEr_RlWR3LlSuLRmd9LdJrlp4nwGzC2a4VeACIHBsnIbx40BPnvLOewwygt6nDU3Y1SOPmM7uWEXIW5za&sig=AOq0QJ8wRgIhAKAa7WN3DX7dZ2fos_4GHTZiwwezusGPgtwd3HQ-UZytAiEAqMAO1_9QYIr2BzHB-TX6EWt-DJ8G5lAirEUglTIns_0=&ratebypass=yes -t 00:19:33.00 -c copy out.mp4
linux:/home/suse_user1/Dokumente/Audio_Video_Seminare/Medien_Bearbeitung/Rippen/Youtube # ffmpeg -ss 00:00:39.00 -i https://r2---sn-j5caxn0g4-umal.googlevideo.com/videoplayback?expire=1615341433&ei=GdNHYK_nJIyrx_AP6KuosAY&ip=2a02%3A2455%3Ae1f%3A3400%3Ae8cb%3A6d33%3A20eb%3A4aa5&id=o-APx5EqJGGuchqkD742WWU1kq8TCsiXwmuaPxYp2WqDpM&itag=251&source=youtube&requiressl=yes&mh=QT&mm=31%2C29&mn=sn-j5caxn0g4-umal%2Csn-h0jeln7e&ms=au%2Crdu&mv=m&mvi=2&pl=39&initcwndbps=1451250&vprv=1&mime=audio%2Fwebm&ns=qOgn4dPi_hDXDDYDqUGCWCoF&gir=yes&clen=21098316&dur=1173.661&lmt=1540306402588572&mt=1615319553&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=5411222&n=nKMeRiweXbjIDjy9&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgFtALoujoEr_RlWR3LlSuLRmd9LdJrlp4nwGzC2a4VeACIHBsnIbx40BPnvLOewwygt6nDU3Y1SOPmM7uWEXIW5za&sig=AOq0QJ8wRgIhAKAa7WN3DX7dZ2fos_4GHTZiwwezusGPgtwd3HQ-UZytAiEAqMAO1_9QYIr2BzHB-TX6EWt-DJ8G5lAirEUglTIns_0=&ratebypass=yes -t 00:19:33.00 -c copy out.mp4
[1] 6210
[2] 6211
[3] 6212
[4] 6213
[5] 6214
[6] 6215
[7] 6216
[8] 6217
[9] 6218
[10] 6219
[11] 6220
[12] 6221
[13] 6222
[14] 6223
[15] 6224
[16] 6225
[17] 6226
[18] 6227
[19] 6228
[20] 6229
[21] 6230
[22] 6231
[23] 6232
[24] 6233
[25] 6234
[26] 6235
[27] 6236
[28] 6237
[29] 6238
[30] 6239
[31] 6240
[32] 6241
[33] 6242
Wenn '-t' kein Tippfehler ist, können Sie command-not-found benutzen, um das Paket zu finden, das den Befehl enthält, z. B.:
cnf -t
[2] Fertig ei=GdNHYK_nJIyrx_AP6KuosAY
[3] Fertig ip=2a02%3A2455%3Ae1f%3A3400%3Ae8cb%3A6d33%3A20eb%3A4aa5
[4] Fertig id=o-APx5EqJGGuchqkD742WWU1kq8TCsiXwmuaPxYp2WqDpM
[5] Fertig itag=251
[6] Fertig source=youtube
[7] Fertig requiressl=yes
[8] Fertig mh=QT
[9] Fertig mm=31%2C29
[10] Fertig mn=sn-j5caxn0g4-umal%2Csn-h0jeln7e
[11] Fertig ms=au%2Crdu
[12] Fertig mv=m
[13] Fertig mvi=2
[14] Fertig pl=39
[15] Fertig initcwndbps=1451250
[16] Fertig vprv=1
[17] Fertig mime=audio%2Fwebm
[18] Fertig ns=qOgn4dPi_hDXDDYDqUGCWCoF
[19] Fertig gir=yes
[20] Fertig clen=21098316
[21] Fertig dur=1173.661
[22] Fertig lmt=1540306402588572
[23] Fertig mt=1615319553
[24] Fertig fvip=2
[25] Fertig keepalive=yes
[26] Fertig fexp=24001373%2C24007246
[27] Fertig c=WEB
[28] Fertig txp=5411222
[29] Fertig n=nKMeRiweXbjIDjy9
[30] Fertig sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt
[31] Fertig lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps
[32]- Fertig lsig=AG3C_xAwRAIgFtALoujoEr_RlWR3LlSuLRmd9LdJrlp4nwGzC2a4VeACIHBsnIbx40BPnvLOewwygt6nDU3Y1SOPmM7uWEXIW5za
[33]+ Fertig sig=AOq0QJ8wRgIhAKAa7WN3DX7dZ2fos_4GHTZiwwezusGPgtwd3HQ-UZytAiEAqMAO1_9QYIr2BzHB-TX6EWt-DJ8G5lAirEUglTIns_0=
linux:/home/suse_user1/Dokumente/Audio_Video_Seminare/Medien_Bearbeitung/Rippen/Youtube # ffmpeg version 3.4.8 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libx264 --enable-libx265 --enable-libxvid
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Irgendwas stimmt hier nicht. Der Prozess bleibt einfach stehen. Die Ausgabe out.mp4 fehlt
Kann hierzu jemand hilfreiche Ratschläge geben?
Vielen Dank.