Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8655841

Browse files
committed
3.1.0
1. Support `str()` type for all string arguments. 2. Support `http`, `ftp`, `sftp` streams for `MpegServer`. 3. Support `nthread` option for `MpegDecoder`, `MpegEncoder`, `MpegClient` and `MpegServer`. 4. Fix typos in docstrings.
1 parent 3f8e0f2 commit 8655841

File tree

8 files changed

+695
-331
lines changed

8 files changed

+695
-331
lines changed

‎CHANGLOG.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# FFmpeg-Encoder-Decoder-for-Python
2+
3+
## Update Report
4+
5+
### V3.1.0 update report:
6+
7+
1. Support `str()` type for all string arguments.
8+
9+
2. Support `http`, `ftp`, `sftp` streams for `MpegServer`.
10+
11+
3. Support `nthread` option for `MpegDecoder`, `MpegEncoder`, `MpegClient` and `MpegServer`.
12+
13+
4. Fix typos in docstrings.
14+
15+
### V3.0.0 update report:
16+
17+
1. Fix a severe memory leaking bugs when using `AVPacket`.
18+
19+
2. Fix a bug caused by using `MpegClient.terminate()` when a video is closed by the server.
20+
21+
3. Support the `MpegServer`. This class is used for serving the online video streams.
22+
23+
4. Refactor the implementation of the loggings.
24+
25+
5. Add `getParameter()` and `setParameter(configDict)` APIs to `MpegEncoder` and `MpegServer`.
26+
27+
6. Move `FFMpeg` depedencies and the `OutputStream` class to the `cmpc` space.
28+
29+
7. Fix dependency issues and cpp standard issues.
30+
31+
8. Upgrade to `FFMpeg 4.4` Version.
32+
33+
9. Add a quick script for fetching the `FFMpeg` dependencies.
34+
35+
### V2.05 update report:
36+
37+
1. Fix a severe bug that causes the memory leak when using `MpegClient`.This bug also exists in `MpegDecoder`, but it seems that the bug would not cause memory leak in that case. (Although we have also fixed it now.)
38+
39+
2. Upgrade to `FFMpeg 4.0` Version.
40+
41+
### V2.01 update report:
42+
43+
1. Fix a bug that occurs when the first received frame may has a PTS larger than zero.
44+
45+
2. Enable the project produce the newest `FFMpeg 3.4.2` version and use `Python 3.6.4`, `numpy 1.14`.
46+
47+
### V2.0 update report:
48+
49+
1. Revise the bug of the encoder which may cause the stream duration is shorter than the real duration of the video in some not advanced media players.
50+
51+
2. Improve the structure of the code and remove some unnecessary codes.
52+
53+
3. Provide a complete version of client, which could demux the video stream from a server in any network protocol.
54+
55+
### V1.8 update report:
56+
57+
1. Provide options `(widthDst, heightDst)` to let `MpegDecoder` could control the output size manually. To ensure the option is valid, we must use the method `setParameter` before `FFmpegSetup`. Now you could use this options to get a rescaled output directly:
58+
59+
```python
60+
d = mpegCoder.MpegDecoder() # initialize
61+
d.setParameter(widthDst=400, heightDst=300) # noted that these options must be set before 'FFmpegSetup'!
62+
d.FFmpegSetup(b'i.avi') # the original video size would not influence the output
63+
print(d) # examine the parameters. You could also get the original video size by 'getParameter'
64+
d.ExtractFrame(0, 100) # get 100 frames with 400x300
65+
```
66+
67+
In another example, the set optional parameters could be inherited by encoder, too:
68+
69+
```python
70+
d.setParameter(widthDst=400, heightDst=300) # set optional parameters
71+
...
72+
e.setParameter(decoder=d) # the width/height would inherit from widthDst/heightDst rather than original width/height of the decoder.
73+
```
74+
75+
Noted that we do not provide `widthDst`/`heightDst` in `getParameter`, because these 2 options are all set by users. There is no need to get them from the video metadata.
76+
77+
2. Optimize some realization of Decoder so that its efficiency could be improved.
78+
79+
### V1.7-linux update report:
80+
81+
Thanks to God, we succeed in this work!
82+
83+
A new version is avaliable for Linux. To implement this tool, you need to install some libraries firstly:
84+
85+
* python3.5
86+
87+
* numpy 1.13
88+
89+
If you want, you could install `ffmpeg` on Linux: Here are some instructions
90+
91+
1. Check every pack which ffmpeg needs here: [Dependency of FFmpeg](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu "Dependency of FFmpeg")
92+
93+
2. Use these steps to install ffmpeg instead of provided commands on the above site.
94+
95+
```Bash
96+
$ git clone https://git.ffmpeg.org/ffmpeg.git
97+
$ cd ffmpeg
98+
$ ./configure --prefix=host --enable-gpl --enable-libx264 --enable-libx265 --enable-shared --disable-static --disable-doc
99+
$ make
100+
$ make install
101+
```
102+
103+
### V1.7 update report:
104+
105+
1. Realize the encoder totally.
106+
107+
2. Provide a global option `dumpLevel` to control the log shown in the screen.
108+
109+
3. Fix bugs in initialize functions.
110+
111+
### V1.5 update report:
112+
113+
1. Provide an incomplete version of encoder, which could encode frames as a video stream that could not be played by player.
114+
115+
### V1.4 update report:
116+
117+
1. Fix a severe bug of the decoder, which causes the memory collapsed if decoding a lot of frames.
118+
119+
### V1.2 update report:
120+
121+
1. Use numpy array to replace the native pyList, which improves the speed significantly.
122+
123+
### V1.0 update report:
124+
125+
1. Provide the decoder which could decode videos in arbitrary formats and arbitrary coding.

‎MpegCoder/MpegBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define FFMPG4_0
1313
#define FFMPG4_4
1414

15-
#define MPEGCODER_CURRENT_VERSION "3.0.0"
15+
#define MPEGCODER_CURRENT_VERSION "3.1.0"
1616

1717
#define STREAM_PIX_FMT AVPixelFormat::AV_PIX_FMT_YUV420P /* default pix_fmt */
1818

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /