ERROR: [youtube] BVSF-vSvL6Y: Sign in to confirm you’re not a bot. Use --cookies-from-browser or --cookies for the authentication. See https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp for how to manually pass cookies. Also see https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies for tips on effectively exporting YouTube cookies
[youtube] wSBXfzgqHtE: Downloading android player API JSON [info] wSBXfzgqHtE: Downloading 1 format(s): 248+251 [dashsegments] Total fragments: 6 [download] Destination: test3.f248.webm [download] 100% of 55.29MiB in 00:00:25 at 2.14MiB/s [dashsegments] Total fragments: 1 [download] Destination: test3.f251.webm [download] 100% of 4.83MiB in 00:00:02 at 2.20MiB/s [Merger] Merging formats into "test3.mp4" ERROR: Postprocessing: Stream #1:0 -> #0:1 (copy)
Input #0, matroska,webm, from 'file:test3.f248.webm': Metadata: encoder : google/video-file Duration: 00:04:48.66, start: 0.000000, bitrate: 1606 kb/s Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default) Input #1, matroska,webm, from 'file:test3.f251.webm': Metadata: encoder : google/video-file Duration: 00:04:48.68, start: -0.007000, bitrate: 140 kb/s Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default) [mp4 @ 0000000000146400] track 1: codec frame size is not set [mp4 @ 0000000000146400] opus in MP4 support is experimental, add '-strict -2' i f you want to use it. Could not write header for output file #0 (incorrect codec parameters ?): Experi mental feature
如果照上面紅色訊息中的指示,將「-strict -2」加在 ffmpeg 的參數中,的確就可以解決問題了。再去搜尋一下「opus in MP4 support is experimental, add '-strict -2' i f you want to use it.」,原來問題在 ffmpeg 的版本,我電腦中的 ffmpeg 和 Google Colab 環境中使用的 ffmpeg,都不是最新版,不加「「-strict -2」」,它就無法將「.webm」的聲音檔合併到 .mp4 中。如果將 ffmpeg 更新為最新的版本,ffmpeg 會自動幫忙處理好,yt-dlp 就不會因無法合併 .webm 產生錯誤而中斷了。
mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000460440] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible! [mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000460440] moov atom not found subfile:XXX.mp4: Invalid data found when processing input ERROR: Command returned error code 1