linux - youtube-dl 有时会挂起并显示 "[ffmpeg] Correcting container"

标签 linux ffmpeg containers youtube-dl

Ubuntu 16.04

/usr/local/bin/youtube-dl --version
2018.05.09

我有一个 bash 脚本,尝试下载 YouTube 视频。输出如下。问题是有时它工作得很好(很快完成)。 但大多数时候它会卡在“正在纠正容器......”上。有谁知道为什么吗?

+ /usr/local/bin/youtube-dl --verbose -x 'https://www.youtube.com/watch?v=8HVWitAW-Qg'

[debug] System config: []

[debug] User config: []

[debug] Custom config: []

[debug] Command-line args: [u'--verbose', u'-x', u'https://www.youtube.com/watch?v=8HVWitAW-Qg']

[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8

[debug] youtube-dl version 2018.05.09

[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-124-generic-x86_64-with-Ubuntu-16.04-xenial

[debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1, rtmpdump 2.4

[debug] Proxy map: {}

[youtube] 8HVWitAW-Qg: Downloading webpage

[youtube] 8HVWitAW-Qg: Downloading video info webpage

[youtube] 8HVWitAW-Qg: Extracting video information

[debug] Invoking downloader on u'https://r5---sn-5uaeznkl.googlevideo.com/videoplayback?expire=1526159728&source=youtube&key=yt6&mime=audio%2Fmp4&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&keepalive=yes&lmt=1518142590597815&dur=231.131&mv=m&mt=1526137933&ms=au%2Conr&signature=18BB34F3716B412AC5757872DD2AF402B6EE20D2.43D2E68B5A5ED2E2D3076DF9264B9BB723484821&ip=71.81.217.251&c=WEB&initcwndbps=1583750&mn=sn-5uaeznkl%2Csn-p5qs7n7l&clen=3671757&gir=yes&id=o-AOxj8Rg2IuZek8KwvgPy-N7_FSGzxQ0Zl2HX1T4gepLf&ipbits=0&fvip=5&ei=EAX3WqbOH8fg4QSlkrGoAg&pl=20&mm=31%2C26&itag=140&usequic=no&requiressl=yes&ratebypass=yes'

[download] Destination: Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a

[download] 100% of 3.50MiB in 00:00

[ffmpeg] Correcting container in "Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a"

[debug] ffmpeg command line: avconv -y -i 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a' -c copy -f mp4 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.temp.m4a'

^C
ERROR: Interrupted by user

最佳答案

我安装了最新的 ffmpeg 并使用以下内容:

/usr/local/bin/youtube-dl -q --no-warnings --fixup --prefer-ffmpeg -- ffmpeg-位置/usr/local/bin -x "$1"

我现在可以一致地获取音频文件(ogg、opus、m4a 等)。但错误仍然打印在屏幕上。现在已经足够了。

关于linux - youtube-dl 有时会挂起并显示 "[ffmpeg] Correcting container",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50307884/

相关文章:

linux - 使用 bash、awk 或 sed 将 CSV 文件模板化为 SQL 文件

linux - 在 Xorg 下获取插入符号(输入文本光标)的 X/Y 位置?

linux - Docker 无效标签值

bash - 如何将两个单独的脚本组合在一起以制作一个脚本而不是两个?

python-2.7 - python脚本的Docker容器/卷中的相对路径

linux - 根据 key 所在的设备映射 key ? (Linux)

video - SVT-AV1 : After encoding the video seeking is very bad in any video player (even HTML5)

ffmpeg - 用于在 C 项目中解码 x265 (HEVC) 流的免费和开源库?

docker - 使用 gRPC Docker 容器构建 Go 时出错

c++ - A* 算法的 openSet 中使用哪个 std 容器?