合併時出現「沒有這樣的檔案或目錄」錯誤

合併時出現「沒有這樣的檔案或目錄」錯誤

我使用bestvideo+bestaudio命令從 YouTube 下載高於 720p 的視頻,因為音頻和視頻流是分開的。在我的輔助機器上No such file or directory,下載後總是出現錯誤:

ERROR: file:video.mp4: No such file or directory

這很奇怪,因為這兩個文件都存在並且功能齊全。預設情況下,程式下載到C:\Windows\SysWOW64Windows 上。我以管理員身份執行 PowerShell,影片的完整命令:

youtube-dl -f bestvideo+bestaudio https://www.youtube.com/watch?v=6aLjwVVNq4s

輸出:

youtube-dl -f bestvideo+bestaudio https://www.youtube.com/watch?v=6aLjwVVNq4s
[youtube] 6aLjwVVNq4s: Downloading webpage
[youtube] 6aLjwVVNq4s: Downloading video info webpage
[youtube] 6aLjwVVNq4s: Extracting video information
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: End of the Line [SFM]-6aLjwVVNq4s.f137.mp4
[download] 100% of 133.01MiB in 04:03
[download] Destination: End of the Line [SFM]-6aLjwVVNq4s.f251.webm
[download] 100% of 13.10MiB in 00:19
[ffmpeg] Merging formats into "End of the Line [SFM]-6aLjwVVNq4s.mkv"
ERROR: file:End of the Line [SFM]-6aLjwVVNq4s.f137.mp4: No such file or directory

youtube-dl 2018.03.26.1(最新版本當時)已安裝。

答案1

預設情況下,程式下載到C:\Windows\SysWOW64Windows 上。

作為一個小問題,youtuble-dl 將檔案下載到呼叫它的相對目錄。

在管理員 Powershell 或 cmd 提示字元的情況下,檔案將從C:\Windows\System32(管理員提示字元的預設資料夾)重定向到C:\Windows\SysWOW64.這對於非管理員 Powershell 或 cmd 提示字元(資料夾或重定向)來說並不常見。

關於您的問題,我可能會嘗試使用其他路徑(即使用非管理員提示符號)。我自己沒有遇到任何問題,C:\Windows\SysWOW64但在你的情況下,FFMpeg 可能因某種原因而窒息。

相關內容