Skip to content

Commit b01d2ae

Browse files
committed
增加目录,格式微调
1 parent eb5dcd5 commit b01d2ae

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
[简体中文 | Simplified Chinese](README_CN.md)
44

5+
------
6+
7+
[TOC]
8+
9+
------
10+
11+
12+
513
## Feature
614

715
Solve the problem of recording file [missing frame](#Problem description), eliminates the process of [manual operation](#Solution optimization)
@@ -25,15 +33,15 @@ Since I did not go to a large number of live broadcasts of other anchors to veri
2533

2634
### Initial Solution
2735

28-
To solve this problem, the more brainless solution is to recode and suppress (Format Factory/Maruko's Toolbox), but this solution takes a long time and consumes a lot of resources, which is not suitable for my thin and light notebook. Non-destructive cutting is the solution that suits me. Using the `-ss` and `-c copy` parameters of FFmpeg, the missing frame can be quickly cut off (just cut the missing frame at the beginning, if there is a missing frame at the end, it will not cause the video, audio and picture of station B to be out of sync, and generally there is no), then the value of the `-ss` parameter is the time when the screen just started moving.
36+
To solve this problem, the more brainless solution is to recode and suppress (Format Factory/Maruko's Toolbox), but this solution takes a long time and consumes a lot of resources, which is not suitable for my thin and light notebook. Non-destructive cutting is the solution that suits me. Using the `-ss` and `-c copy` parameters of FFmpeg, the missing frame can be **quickly** cut off (just cut the missing frame at the beginning, if there is a missing frame at the end, it will not cause the video, audio and picture of station B to be out of sync, and generally there is no), then the value of the `-ss` parameter is the time when the screen just started moving.
2937

3038
### Principle Explanation
3139

3240
The above sentence is easy to understand. Start wherever there is no problem, but this will involve another problem, that is, why the video will start to move at this value position, which needs to explain the principle of key frames. The video frame is offset according to the data of the previous frame, and the source is traced forward one by one, and the previous key frame will be found. If the key frame is not found, the player will not know how to deal with the frame data before the next key frame, which causes frame loss. The key frame here refers to the key frame of the original video, not the key frame (file header) automatically marked after the video is cut (the player will not recognize the key frame without the key frame at the beginning of the video). Then a cut on the non-key frames will inevitably cause the missing frames of the video, which refers to [cv4373238](https://www.bilibili.com/read/cv4373238).
3341

3442
### Advanced Solutions
3543

36-
In the beginning, I saw it with the naked eye, adding and subtracting in units of `1s` (a few tenths of a second is difficult to estimate with the naked eye). Sometimes it will be corrected by FFmpeg (The `-ss` parameter is to let FFmpeg find (seeking) keyframes **around here**, which refers to [FFmpeg official documentation](http://trac.ffmpeg.org/wiki/Seeking)), most of the time it will cause new missing frames, that is, FFmpeg did not find the key frame in a limited range. If it is earlier than the actual key frame, the duration of the missing frame will be a little shorter; if it is cut after the key frame, then the generated video will miss the frame to the next key frame. If you fine-tune it at this time, it will undoubtedly be a waste of time. So, how to get the accurate key frame position? With Genteure's fib (see [Project Dependence](#Project Dependency)), you can find the location of the **second** key frame in the parsed XML file, and then use FFmpeg to cut this location ( Assign the second key frame time to the `-ss` parameter).
44+
In the beginning, I saw it with the naked eye, adding and subtracting in units of `1s` (a few tenths of a second is difficult to estimate with the naked eye). Sometimes it will be corrected by FFmpeg (The `-ss` parameter is to let FFmpeg find (seeking) keyframes **around here**, which refers to [FFmpeg official documentation](http://trac.ffmpeg.org/wiki/Seeking)), most of the time it will cause new missing frames, that is, FFmpeg did not find the key frame in a limited range. If it is earlier than the actual key frame, the duration of the missing frame will be a little shorter; if it is cut after the key frame, then the generated video will miss the frame to the next key frame. If you fine-tune it at this time, it will undoubtedly be a waste of time. So, how to get the accurate key frame position? With Genteure's fib (see [Project Dependence](#Project Dependency)), you can find the location of the **second** key frame in the parsed XML file, and then use FFmpeg to cut this location (Assign the second key frame time to the `-ss` parameter).
3745

3846
### Solution Optimization
3947

@@ -54,8 +62,8 @@ So, how to combine these two tools through programming, avoid the tedious operat
5462

5563
Most (almost all) operating environments of this project have been packaged into compressed packages and Setup, just pay attention to the operating system.
5664

57-
- WindowsCurrently
58-
- JDKOptional `1.8`(`jar`) / `1.6+`(`exe`) ,See [Assets description](#Assets description) here for details
65+
- Windows (Currently)
66+
- JDK (Optional) `1.8`(`jar`) / `1.6+`(`exe`) ,See [Assets description](#Assets description) here for details
5967

6068
## installation
6169
### Assets
@@ -99,7 +107,7 @@ The program must be placed in the following structure to ensure the relative pos
99107
FirstKeyFrameFilter
100108
│ FirstKeyFrameFilter.exe
101109
102-
├─jre1.8.0_161Optional
110+
├─jre1.8.0_161 (Optional)
103111
104112
└─lib-apps
105113
ffmpeg.exe
@@ -118,7 +126,7 @@ FirstKeyFrameFilter
118126

119127
## Project Dependency
120128

121-
+ FlvInteractiveRebasefib,FLV File editing tool
129+
+ FlvInteractiveRebase (fib,FLV File editing tool)
122130

123131
+ [BililiveRecorder QQ Group](https://jq.qq.com/?_wv=1027&k=pJMpD57V) internal beta 1
124132
+ By genteure ( fib-beta@danmuji.org )
@@ -127,8 +135,8 @@ FirstKeyFrameFilter
127135
- Use a simple text file as the command format for manual editing...
128136
- ...At the same time, it is convenient to write scripts and realize automatic processing
129137
- The command file is relatively small and easy to transfer, which is convenient for people who do not understand the details of FLV to repair the file
130-
+ Main software usageAssuming the software file name is fib
131-
1. **Read FLV files and generate command files**This project depends on
138+
+ Main software usage (Assuming the software file name is fib)
139+
1. **Read FLV files and generate command files** (This project depends on)
132140
`./fib parse problem.flv command.xml`
133141
2. Read other FLV files for reference or copy data
134142
`./fib parse other.flv Other-commands.xml`
@@ -174,19 +182,19 @@ If you want to study the source code of this project or modify the functions, yo
174182

175183
## Changelog
176184

177-
### [v1.1.02020.10.8](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.1.0)
185+
### [v1.1.0 (2020.10.8) ](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.1.0)
178186

179187
- repair: Because of `indexOf`, the file name with multiple English periods cannot be handled correctly. See [issue#2](https://github.com/Aric-Sun/FirstKeyFrameFilter/issues/2)
180188
- optimization: Extract the method of obtaining the file name without extension into `Utils` for easy calling
181-
- repair: Calling FFmpeg to cut the video is recognized by PotPlayer as an audio problem, which is **relatively compatible**, so the version number is increased to 1.1.0. See [issue#3](https://github.com/Aric-Sun/FirstKeyFrameFilter/issues/3)
189+
- repair: Calling FFmpeg to cut the video is recognized by PotPlayer as an audio problem, which is **relatively** compatible, so the version number is increased to 1.1.0. See [issue#3](https://github.com/Aric-Sun/FirstKeyFrameFilter/issues/3)
182190
- optimization: The method of converting timestamp to seconds is transferred to `Utils`, which is convenient to call and conforms to the specification
183191
- optimization. Remove useless `import`
184192

185-
### [v1.0.12020.10.4](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.0.1)
193+
### [v1.0.1 (2020.10.4) ](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.0.1)
186194

187195
- repair: It cannot handle the case where the missing frame duration is within 1s, such as 0.15s.
188196

189-
### [v1.0.02020.9.5](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.0.0)
197+
### [v1.0.0 (2020.9.5) ](https://github.com/Aric-Sun/FirstKeyFrameFilter/releases/tag/v1.0.0)
190198

191199
The beginning of everything
192200

@@ -203,7 +211,7 @@ The beginning of everything
203211

204212
1. `TypicalFLV` is the recorded video file in question. It is unprocessed and will be exported directly from [BililiveRecorder](https://rec.danmuji.org/) and will be **continuously updated**. A small number of files that do not have missing frames but have other problems are also included and have been specially marked.
205213
2. `TypicalXML` are files generated by fib (see [Project Dependency](#Project Dependency)) analysis, which is a sample left over from the development of XML parsing and is no longer updated. The files with the word `TypicalCase` in them come from the missing frame video (i.e. `TypicalFLV`).
206-
3. `DanmakuXML` are newly added danmaku files in BililiveRecorder 1.1.20. The danmaku files that have not been suppressed and submitted are archived here, which has nothing to do with this project...
214+
3. `DanmakuXML` are newly added danmaku files in [BililiveRecorder](https://rec.danmuji.org/) 1.1.20. The danmaku files that have not been suppressed and submitted are archived here, which has nothing to do with this project...
207215

208216
## Open Source Agreement
209217

README_CN.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# FirstKeyFrameFilter
22

3+
------
4+
5+
[TOC]
6+
7+
------
8+
9+
10+
311
## 主要功能
412

513
解决录播文件[缺帧](#问题描述)的问题,免去[手动操作](#方案优化)的过程

0 commit comments

Comments
 (0)