Skip to content

Commit b5c64fb

Browse files
committed
Initial v3 setup
1 parent b092615 commit b5c64fb

File tree

136 files changed

+2339
-40077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2339
-40077
lines changed

.github/CONTRIBUTING.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,29 @@
22

33
## Reporting issues
44

5-
Please start by [reading the FAQ][faq] first. If your question is not answered, here are some guidelines on how to effectively report issues.
5+
Please start by [reading the FAQ][faq] first. If your question is not answered, here are some guidelines on how to effectively report issues.
66

77
### Required information
88

99
When reporting issues be sure to include at least:
1010

11-
* Some code that may be used to reproduce the problem
12-
* Which version of fluent-ffmpeg, of ffmpeg and which OS you're using
13-
* If the problem only happens with some input sources, please include a link to a source that may be used to reproduce the problem
14-
* Be sure to include the full error message when there is one
15-
* When an ffmpeg error happens (eg. 'ffmpeg exited with code 1'), you should also include the full output from ffmpeg (stdout and stderr), as it may contain useful information about what whent wrong. You can do that by looking at the 2nd and 3rd parameters of the `error` event handler on an FfmpegCommand, for example:
11+
- Some code that may be used to reproduce the problem
12+
- Which version of fluent-ffmpeg, of ffmpeg and which OS you're using
13+
- If the problem only happens with some input sources, please include a link to a source that may be used to reproduce the problem
14+
- Be sure to include the full error message when there is one
15+
- When an ffmpeg error happens (eg. 'ffmpeg exited with code 1'), you should also include the full output from ffmpeg (stdout and stderr), as it may contain useful information about what whent wrong. You can do that by looking at the 2nd and 3rd parameters of the `error` event handler on an FfmpegCommand, for example:
1616

1717
```js
18-
ffmpeg('some/input.mp4')
19-
.on('error', function(err, stdout, stderr) {
20-
console.log('An error happened: ' + err.message);
21-
console.log('ffmpeg standard output:\n' + stdout);
22-
console.log('ffmpeg standard error:\n' + stderr);
23-
});
18+
ffmpeg('some/input.mp4').on('error', function (err, stdout, stderr) {
19+
console.log('An error happened: ' + err.message)
20+
console.log('ffmpeg standard output:\n' + stdout)
21+
console.log('ffmpeg standard error:\n' + stderr)
22+
})
2423
```
2524

2625
### Ffmpeg usage
2726

28-
If your command ends up with an ffmpeg error (eg. 'ffmpeg exited with code X : ...'), be sure to try the command manually from command line. You can get the ffmpeg command line that is executed for a specific Fluent-ffmpeg command by using the `start` event:
27+
If your command ends up with an ffmpeg error (eg. 'ffmpeg exited with code X : ...'), be sure to try the command manually from command line. You can get the ffmpeg command line that is executed for a specific Fluent-ffmpeg command by using the `start` event:
2928

3029
```js
3130
ffmpeg('some/input.mp4')
@@ -37,7 +36,7 @@ ffmpeg('some/input.mp4')
3736

3837
If it does not work, you most likely have a ffmpeg-related problem that does not fit as a fluent-ffmpeg issue; in that case head to the [ffmpeg documentation](ffmpeg.org/documentation.html) to find out what you did wrong.
3938

40-
If it _does_ work, please double-check how you escaped arguments and options when passing them to fluent-ffmpeg. For example, when running from command line, you may have to quote arguments to tell your shell that a space is indeed part of a filename or option. When using fluent-ffmpeg, you don't have to do that, as you're already passing options and arguments separately. Here's a (dumb) example:
39+
If it _does_ work, please double-check how you escaped arguments and options when passing them to fluent-ffmpeg. For example, when running from command line, you may have to quote arguments to tell your shell that a space is indeed part of a filename or option. When using fluent-ffmpeg, you don't have to do that, as you're already passing options and arguments separately. Here's a (dumb) example:
4140

4241
```sh
4342
$ ffmpeg -i video with spaces.avi

.github/ISSUE_TEMPLATE.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,26 @@
22

33
### Version information
44

5-
* fluent-ffmpeg version:
6-
* ffmpeg version:
7-
* OS:
5+
- fluent-ffmpeg version:
6+
- ffmpeg version:
7+
- OS:
88

99
### Code to reproduce
1010

1111
```js
1212

13-
1413
```
1514

1615
(note: if the problem only happens with some inputs, include a link to such an input file)
1716

1817
### Expected results
1918

20-
21-
2219
### Observed results
2320

24-
25-
2621
### Checklist
2722

2823
<!-- you may delete that checklist when you have checked everything -->
2924

30-
* [ ] I have read the [FAQ](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/wiki/FAQ)
31-
* [ ] I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
32-
* [ ] I have included full stderr/stdout output from ffmpeg
25+
- [ ] I have read the [FAQ](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/wiki/FAQ)
26+
- [ ] I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
27+
- [ ] I have included full stderr/stdout output from ffmpeg

.github/workflows/ci.yml

+74-27
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,95 @@
1-
name: CI Testing
1+
name: Continuous integration
22
on:
3-
pull_request:
43
push:
54
branches:
65
- master
6+
pull_request:
77
jobs:
8-
test:
9-
name: Run tests
8+
lint:
9+
name: Lint source files
1010
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup node
16+
uses: actions/setup-node@v3
17+
with:
18+
cache: yarn
19+
20+
- name: Install dependencies
21+
run: yarn
22+
23+
- name: Lint source files
24+
run: yarn lint
25+
26+
unit-tests:
27+
name: Unit tests
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup node
34+
uses: actions/setup-node@v3
35+
with:
36+
cache: yarn
37+
38+
- name: Install dependencies
39+
run: yarn
40+
41+
- name: Build
42+
run: yarn build
43+
44+
- name: Run unit tests
45+
run: yarn test tests/unit
46+
47+
- name: Upload coverage
48+
uses: codecov/codecov-action@v3
49+
with:
50+
files: coverage/lcov.info
51+
name: unit
52+
53+
test:
1154
strategy:
1255
matrix:
13-
node: [18, 20, 21]
56+
os:
57+
- ubuntu-latest
58+
- macos-latest
59+
- windows-latest
60+
node:
61+
- 18
62+
- 20
63+
name: Test Node ${{ matrix.node }} on ${{ matrix.os }}
64+
runs-on: ${{ matrix.os }}
1465
steps:
1566
- name: Checkout
1667
uses: actions/checkout@v4
17-
- name: Install flvtool2
18-
run: sudo gem install flvtool2
19-
- name: Install ffmpeg
20-
run: sudo apt install -y ffmpeg
68+
2169
- name: Setup node
2270
uses: actions/setup-node@v3
2371
with:
2472
node-version: ${{ matrix.node }}
2573
cache: yarn
74+
75+
- name: Install ffmpeg
76+
uses: ConorMacBride/install-package@v1
77+
with:
78+
apt: ffmpeg
79+
brew: ffmpeg
80+
choco: ffmpeg
81+
2682
- name: Install dependencies
2783
run: yarn
84+
85+
- name: Build
86+
run: yarn build
87+
2888
- name: Run tests
29-
run: yarn test
30-
- name: Generate coverage report
31-
run: yarn coverage
32-
- name: Store coverage
33-
uses: coverallsapp/github-action@v2
34-
with:
35-
flag-name: linux-node-${{ matrix.node }}
36-
parallel: true
89+
run: yarn test tests/integration
3790

38-
upload-coverage:
39-
name: Upload coverage
40-
needs: test
41-
if: ${{ always() }}
42-
runs-on: ubuntu-latest
43-
steps:
44-
- name: Coveralls Finished
45-
uses: coverallsapp/github-action@v2
91+
- name: Upload coverage
92+
uses: codecov/codecov-action@v3
4693
with:
47-
parallel-finished: true
48-
carryforward: "linux-node-18,linux-node-20,linux-node-21"
94+
files: coverage/lcov.info
95+
name: integration/${{ matrix.os }}/node-${{ matrix.node }}

.gitignore

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
*.project
1+
build
2+
coverage
23
node_modules
34
.nyc_output
4-
*.swp
5-
.idea
6-
*.iml
7-
coverage
5+
types

.npmignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
*.md
21
.git*
32
test/
4-
examples/
3+
src/

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
coverage

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
semi: false
2+
singleQuote: true
3+
trailingComma: none

Makefile

-20
This file was deleted.

0 commit comments

Comments
 (0)