Skip to content

Commit

Permalink
* 优化 #25 ,以FlvChecker的Main方法运行时,接受debug布尔开关
Browse files Browse the repository at this point in the history
* 修复一个bug #22 ,以FlvChecker的Main方法运行时,解析传入的文件保存路径;
  • Loading branch information
nICEnnnnnnnLee committed Jan 26, 2020
1 parent a2a3e6c commit 82b42ed
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Go go go, Bilibili Pikachu!
| ------------- | ------------- | ------------- |
| bili | 2019/09/19 | `flv`清晰度可多选,可不需要cookie |
| zhanqi | 2019/06/30 | `flv`清晰度可多选,可不需要cookie |
| douyu | 2020/01/12 | `flv`清晰度可多选,但部分高清需要cookie |
| douyu | 2020/01/26 | `flv`清晰度可多选,但部分高清需要cookie |
| kuaishou | 2020/01/12 | `flv`清晰度可多选,可能需要cookie(与登录无关,首次进入直播页面有反爬措施,会需要拖拽验证) |
| huya | 2019/08/30 | `flv`清晰度可多选,可不需要cookie |
| yy | 2019/06/15 | `flv`只支持默认清晰度 |
Expand All @@ -67,8 +67,9 @@ Go go go, Bilibili Pikachu!
+ 校正某FLV文件的时间戳
+ `java -Dfile.encoding=utf-8 -cp BiliLiveRecorder.jar nicelee.bilibili.live.FlvChecker "源文件路径"`
+ `java -Dfile.encoding=utf-8 -cp BiliLiveRecorder.jar nicelee.bilibili.live.FlvChecker "源文件路径" true`
+ `java -Dfile.encoding=utf-8 -cp BiliLiveRecorder.jar nicelee.bilibili.live.FlvChecker "源文件路径" true "保存的文件夹路径" `
+ 第二个布尔参数的意义是**当遇到某种特定情况时,是否分割文件**
+ `java -Dfile.encoding=utf-8 -cp BiliLiveRecorder.jar nicelee.bilibili.live.FlvChecker "源文件路径" true false "保存的文件夹路径"`
+ 第二个参数-布尔参数的意义是**当遇到某种特定情况时,是否分割文件**
+ 第三个参数-布尔参数的意义是**是否输出debug信息**
+ 注意:这些操作**没法还原**,所以理论上原始文件最保真。 `不校验时间戳` ≈ `校验文件不分割` > `校验文件分割scripts tag`
+ 如果仍旧没办法满足需求的话,建议拿着各种版本都去ffmpeg处理一下
Expand Down
3 changes: 3 additions & 0 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## 更新
+ V2.6.2
* 优化 #25 ,以FlvChecker的Main方法运行时,接受debug布尔开关
* 修复一个bug #22 ,以FlvChecker的Main方法运行时,解析传入的文件保存路径;
+ V2.6.1
* 修复一个bug #20 ,该bug导致主播正常下播时无法自动重命名{endTime}参数;
* 优化 #22 ,如果FLV自动校准,且传入了自定义参数saveFolderAfterCheck,校准后的文件将保存在参数对应目录中
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nicelee/bilibili/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class Main {

final static String version = "v2.6.1";
final static String version = "v2.6.2";
static boolean autoCheck;
static boolean splitScriptTagsIfCheck;
static boolean deleteOnchecked;
Expand Down
30 changes: 21 additions & 9 deletions src/main/java/nicelee/bilibili/live/FlvChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,28 @@ public static void main(String[] args) throws IOException {

FlvChecker fChecker = new FlvChecker();
boolean splitScripts = false;
if(args != null && args.length >= 2) {
splitScripts = "true".equals(args[1]);
}
if (args != null && args.length >= 1) {
System.out.println("校对时间戳开始...");
fChecker.check(args[0], false, splitScripts);
String saveFolder = null;
if(args != null) {
if(args.length >= 4) {
saveFolder = args[3];
File f = new File(saveFolder);
if(!f.exists())
f.mkdirs();
}
if(args.length >= 3 && "false".equals(args[2]))
Logger.debug = false;

if(args.length >= 2)
splitScripts = "true".equals(args[1]);

if (args.length >= 1) {
System.out.println("校对时间戳开始...");
fChecker.check(args[0], false, splitScripts, saveFolder);
// fChecker.checkFromEnd(args[0]);
System.out.println("校对时间戳完毕。");
} else {
System.out.println("请输入正确的文件路径");
System.out.println("校对时间戳完毕。");
} else {
System.out.println("请输入正确的文件路径");
}
}
}

Expand Down

0 comments on commit 82b42ed

Please sign in to comment.