iawia002 / lux

👾 Fast and simple video download library and CLI tool written in Go
MIT License
27.32k stars 2.95k forks source link

下载视频后合并视频出错 #937

Open wxxxcxx opened 3 years ago

wxxxcxx commented 3 years ago

下载b站视频后分别有一个 mp4 文件和一个 m4a 文件,mp4 文件只有画面,m4a 文件有声音。但是没有合并。

下面是输出:

annie https://www.bilibili.com/video/BV1ib411t7YR\?spm_id_from\=333.999.0.0

 Site:      哔哩哔哩 bilibili.com
 Title:     -UP主汉语配音-【线性代数的本质】合集-转载于3Blue1Brown官方双语】 P1 00-序言
 Type:      video
 Stream:
     [16]  -------------------
     Quality:         流畅 360P
     Size:            19.06 MiB (19980973 Bytes)
     # download with: annie -f 16 ...

 19.06 MiB / 19.06 MiB [===============================================================] 100.00% 7.38 MiB/s 2s
Merging video parts into -UP主汉语配音-【线性代数的本质】合集-转载于3Blue1Brown官方双语】 P1 00-序言.mp4
Downloading https://www.bilibili.com/video/BV1ib411t7YR?spm_id_from=333.999.0.0 error:
exit status 1
ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Unrecognized option 'UP主汉语配音-【线性代数的本质】合集-转载于3Blue1Brown官方双语】 P1 00-序言.mp4'.
Error splitting the argument list: Option not found

操作系统:Archlinux Annie 版本:

annie -v

annie: version 0.10.3, A fast, simple and clean video downloader.

FFmpeg 版本:

ffmpeg -version
ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100

使用以下命令测试了下手动合并是可以的

 ffmpeg -i -UP主汉语配音-【线性代数的本质】合集-转载于3Blue1Brown官方双语】\ P1\ 00-序言\[0\].mp4 -i -UP主汉 语配音-【线性代数的本质】合集-转载于3Blue1Brown官方双语】\ P1\ 00-序言\[1\].m4a 1.mp4

看报错似乎是把视频标题识别成了 Option ?

Declarcall commented 2 years ago

我也遇到这种情况,手动合并失败。只有在把视频和音频文件名前面的'-'都去掉的情况下才能合并成功。我的系统是Ubuntu.

$ ffmpeg -i '-白噪音美食-热乎乎暖胃又下饭的白菜豆腐煲[0].mp4' -i '-白噪音美食-热乎乎暖胃又下饭的白菜豆腐煲[1].m4a' '-白噪音美食-热乎乎暖胃又下饭的白菜豆腐煲.mp4'
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
...
...
Unrecognized option '白噪音美食-热乎乎暖胃又下饭的白菜豆腐煲.mp4'.
Error splitting the argument list: Option not found