Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS下ffmpeg路径无法生效 #70

Closed
nICEnnnnnnnLee opened this issue Aug 6, 2021 · 4 comments
Closed

macOS下ffmpeg路径无法生效 #70

nICEnnnnnnnLee opened this issue Aug 6, 2021 · 4 comments
Labels
缺少信息 Further information is requested

Comments

@nICEnnnnnnnLee
Copy link
Owner

我已经确认

  • 使用的当前版本为最新版本
  • issue区没有类似的情况(有的话请直接去该问题讨论)

问题描述

  • 在app.config修改了ffmpeg路径后,打开软件时提示没有找到ffmpeg,但路径是正确的。
  • 在app.config修改的设置也无法显示在软件的设置页面,直接在软件中设置提示“无法保存“。

Originally posted by @caperner in #32 (comment)
Originally posted by @Sakuradreancat in #32 (comment)

相关信息

  • 当前系统(windows/linux等)
    Macbook air M1 macOS 11.2

  • java版本
    待补充

  • 相关log

    • windows下,运行run-UI-debug.bat,复现以后,复制一下控制台的输出
    • 其它平台,控制台cd到目录后java -Dfile.encoding=utf-8 -jar INeedBiliAV.jar,复现以后,复制一下控制台的输出
      待补充
@nICEnnnnnnnLee
Copy link
Owner Author

在app.config修改了ffmpeg路径后,打开软件时提示没有找到ffmpeg,但路径是正确的。

程序运行后会打印相关配置,请贴出对应的log,确认ffmpegPath是否在程序内生效。@caperner
Q1

@nICEnnnnnnnLee nICEnnnnnnnLee added the 缺少信息 Further information is requested label Aug 6, 2021
@imniynaiy
Copy link

`theoriz@theorizs-MacBook-Air BilibiliDown.v6.3.release % java -Dfile.encoding=utf-8 -jar INeedBiliAV.jar

Mac OS X
50
/Users/theoriz/Downloads/BilibiliDown.v6.3.release
----Config init begin...----
key-->value: bilibili.name.format --> (:listName 0_listName)UpName\avTitle-pDisplay-pAv-clipTitle-qn
key-->value: bilibili.name.doAfterComplete --> true
key-->value: bilibili.download.thumbUp --> false
key-->value: bilibili.download.playSound --> false
key-->value: bilibili.download.maxFailRetry --> 3
key-->value: bilibili.format --> 0
key-->value: bilibili.cc.lang --> zh-CN
key-->value: bilibili.ffmpegPath --> /opt/ffmpeg/bin/ffmpeg
key-->value: bilibili.flv.ffmpeg --> false
key-->value: bilibili.menu.download.plan --> 1
key-->value: bilibili.menu.download.qn --> 1080P
key-->value: bilibili.tab.download.qn --> 1080P
key-->value: bilibili.pageSize --> 5
key-->value: bilibili.pageDisplay --> listAll
key-->value: bilibili.savePath --> download/
key-->value: bilibili.download.poolSize --> 3
key-->value: bilibili.download.multiThread.count --> 0
key-->value: bilibili.download.multiThread.minFileSize --> 0
key-->value: bilibili.download.multiThread.singlePattern --> github|ffmpeg|.m4s|.jpg|.png|.webp|.xml
key-->value: bilibili.theme --> default
key-->value: bilibili.button.style --> design
key-->value: bilibili.restrictTempMode --> on
key-->value: bilibili.repo --> on
key-->value: bilibili.repo.save --> on
key-->value: bilibili.repo.definitionStrictMode --> off
key-->value: bilibili.alert.isAlertIfDownloded --> true
key-->value: bilibili.alert.maxAlertPrompt --> 5
key-->value: bilibili.lockCheck --> false
key-->value: bilibili.user.login --> pwd
key-->value: bilibili.user.login.pwd --> manual
key-->value: bilibili.user.login.pwd.autoCaptcha --> false
key-->value: bilibili.user.delete --> true
config/user.config 路径不存在, 尝试以程序目录为基址进行查找
50
----Config ini end...----
savePath: download/
config/user.config 路径不存在, 尝试以程序目录为基址进行查找
50
config/background.png 路径不存在, 尝试以程序目录为基址进行查找
50
config/background.jpg 路径不存在, 尝试以程序目录为基址进行查找
50
---Hosts start---
github.com --> 140.82.114.3
gist.github.com --> 140.82.112.3
assets-cdn.github.com --> 185.199.111.153
raw.githubusercontent.com --> 151.101.184.133
gist.githubusercontent.com --> 151.101.184.133
cloud.githubusercontent.com --> 151.101.184.133
camo.githubusercontent.com --> 151.101.184.133
avatars0.githubusercontent.com --> 151.101.184.133
avatars1.githubusercontent.com --> 151.101.184.133
avatars2.githubusercontent.com --> 151.101.184.133
avatars3.githubusercontent.com --> 151.101.184.133
avatars4.githubusercontent.com --> 151.101.184.133
avatars5.githubusercontent.com --> 151.101.184.133
avatars6.githubusercontent.com --> 151.101.184.133
avatars7.githubusercontent.com --> 151.101.184.133
avatars8.githubusercontent.com --> 151.101.184.133
api.github.com --> 140.82.112.5
---Hosts end---
java.lang.NoSuchFieldException: addressCache
at java.base/java.lang.Class.getDeclaredField(Class.java:2549)
at nicelee.bilibili.util.net.HostSetUtil.injectHosts(HostSetUtil.java:35)
at nicelee.ui.FrameMain.main(FrameMain.java:68)
MJTitleBar-init/62 : -3
MJTitleBar-initTitle/84 : 不为null
登录线程被调用...
已经登录,或没有发起登录请求
ffmpeg version N-99816-g3da35b7 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.27)
configuration: --prefix=/Volumes/tempdisk/sw --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang --enable-gpl --enable-libopus --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libsnappy --enable-libvidstab --enable-version3 --pkg-config-flags=--static --disable-ffplay --enable-postproc --enable-nonfree --enable-neon --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 56. 60.100 / 56. 60.100
libavcodec 58.112.100 / 58.112.100
libavformat 58. 64.100 / 58. 64.100
libavdevice 58. 11.102 / 58. 11.102
libavfilter 7. 88.100 / 7. 88.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
process 执行完毕
java.io.IOException: Stream Closed
at java.base/java.io.FileInputStream.readBytes(Native Method)
at java.base/java.io.FileInputStream.read(FileInputStream.java:271)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:282)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:343)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:178)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:329)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:396)
at nicelee.ui.thread.StreamManager.run(StreamManager.java:21)
java.io.FileNotFoundException: config/repo.config (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
at java.base/java.io.FileInputStream.(FileInputStream.java:153)
at java.base/java.io.FileReader.(FileReader.java:75)
at nicelee.bilibili.util.RepoUtil.init(RepoUtil.java:43)
at nicelee.ui.FrameMain.main(FrameMain.java:117)`

@github-actions
Copy link

由于长期没有状态更新,该问题自动关闭。如有需要可重新打开。

@yongdono
Copy link

最新发行版自带的配置文件 app.config中, bilibili.ffmpegPath这个键值出现两次,整个文件最后多了一行
bilibili.ffmpegPath=ffmpeg
把那一行删掉就能生效了。

另外,文档中没提到的一点,mac/Linux下文件名的格式也需要修改,即:
bilibili.name.format = (:listName 0_listName)UpName\avTitle-(:favTime favTime-)pAv2-clipTitle-qn
要改成
bilibili.name.format = (:listName 0_listName/)UpName/avTitle-(:favTime favTime-)pAv2-clipTitle-qn
否则最后保存的文件不会按up主名称等自动创建子目录。
这个bug也可以通过修改代码来修复,即把CmdUtil.java中
private static String genFormatedName(HashMap<String, String> paramMap, String formatStr)
这个方法最后一行从
return sb.toString().replaceAll("[\t\b\r\n|:?<>"$]", "_");
改成
return sb.toString().replaceAll("[\t\b\r\n|:
?<>"$]", "_")
.replaceAll("[/\\]", File.separator);

nICEnnnnnnnLee added a commit that referenced this issue Aug 20, 2022
#32 #70  #71 #110 Mac下请不要直接双击运行jar,请以命令行方式运行,确保jar包所在目录为工作目录
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
缺少信息 Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants