Skip to content

Commit 547c668

Browse files
authored
Merge pull request #199 from a-schild/develop
- Upgraded slf4j libraries - Added options to get/set options by index, thanks to HANXU2018 - Upgraded binaries to 4.4.1 release OS-X releases from https://www.osxexperts.net/ Linux binaries from https://johnvansickle.com/ffmpeg/ -> Windows and arm32 bit builds still on 4.4.0 release - **3.2.1** - Moved development to it's own branch - Implemented first support for apple m1 chip on OS-X (Needs to be tested) - Added win 32 ffmpeg 4.4 static release https://www.notion.so/34dc4ddf501a4b98b46ea9fb4f3470af?v=878345c5d88f4d21a6520db752b5c29f
2 parents eb127bb + 3457bfa commit 547c668

File tree

32 files changed

+678
-59
lines changed

32 files changed

+678
-59
lines changed

Changelog.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# JAVE2
22

33
## Changelog
4+
- **3.3.0**
5+
- Upgraded slf4j libraries
6+
- Added options to get/set options by index, thanks to HANXU2018
7+
- Upgraded binaries to 4.4.1 release
8+
OS-X releases from https://www.osxexperts.net/
9+
Linux binaries from https://johnvansickle.com/ffmpeg/
10+
-> Windows and arm32 bit builds still on 4.4.0 release
11+
- **3.2.1**
12+
- Moved development to it's own branch
13+
- Implemented first support for apple m1 chip on OS-X (Needs to be tested)
14+
- Added win 32 ffmpeg 4.4 static release https://www.notion.so/34dc4ddf501a4b98b46ea9fb4f3470af?v=878345c5d88f4d21a6520db752b5c29f
415
- **3.2.0**
516
- Modified quoting for command line arguments
617
- Implemented subtitle ass video filter

README.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# JAVE2
2+
![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/ws.schild/jave-core?label=release&nexusVersion=2&server=https%3A%2F%2Foss.sonatype.org%2F)
3+
![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/ws.schild/jave-core?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)
24

35
The JAVE2 (Java Audio Video Encoder) library is Java wrapper on the ffmpeg
46
project. Developers can take take advantage of JAVE2 to transcode audio
@@ -17,9 +19,11 @@ Many other formats, containers and operations are supported by JAVE2.
1719
> JAVE can also be easily ported to other OS and hardware configurations,
1820
see the JAVE manual for details.
1921

20-
| Operating System | Windows x32,x64 | MacOS x32,x64 | Linux x32,x64 | Linux arm64 |
22+
| Operating System | Windows x32,x64 | MacOS x64 | MacOS m1 | Linux x32,x64 | Linux arm32,arm64 |
2123
| ------- | :---: | :---: | :---: | :---: |
22-
| Supported? | YES | YES | YES |
24+
| Supported? | YES | YES | YES | YES | YES |
25+
26+
Please note that the arm+win 32 bit versions are still on 4.4.0
2327

2428
## Projects using Jave2
2529
* [XR3Player](https://github.com/goxr3plus/XR3Player)
@@ -46,7 +50,7 @@ It includes all binaries for the supported platforms
4650
<dependency>
4751
<groupId>ws.schild</groupId>
4852
<artifactId>jave-all-deps</artifactId>
49-
<version>3.2.0</version>
53+
<version>3.3.0</version>
5054
</dependency>
5155
```
5256

@@ -60,7 +64,7 @@ Include the following in your pom files.
6064
<dependency>
6165
<groupId>ws.schild</groupId>
6266
<artifactId>jave-core</artifactId>
63-
<version>3.2.0</version>
67+
<version>3.3.0</version>
6468
</dependency>
6569
```
6670

@@ -71,7 +75,7 @@ and then the specific jar(s) for your platform(s) :
7175
<dependency>
7276
<groupId>ws.schild</groupId>
7377
<artifactId>jave-nativebin-linux64</artifactId>
74-
<version>3.2.0</version>
78+
<version>3.3.0</version>
7579
</dependency>
7680
```
7781

@@ -80,7 +84,7 @@ and then the specific jar(s) for your platform(s) :
8084
<dependency>
8185
<groupId>ws.schild</groupId>
8286
<artifactId>jave-nativebin-linux-arm64</artifactId>
83-
<version>3.2.0</version>
87+
<version>3.3.0</version>
8488
</dependency>
8589
```
8690

@@ -89,7 +93,7 @@ and then the specific jar(s) for your platform(s) :
8993
<dependency>
9094
<groupId>ws.schild</groupId>
9195
<artifactId>jave-nativebin-linux-arm32</artifactId>
92-
<version>3.2.0</version>
96+
<version>3.3.0</version>
9397
</dependency>
9498
```
9599

@@ -98,7 +102,7 @@ and then the specific jar(s) for your platform(s) :
98102
<dependency>
99103
<groupId>ws.schild</groupId>
100104
<artifactId>jave-nativebin-win64</artifactId>
101-
<version>3.2.0</version>
105+
<version>3.3.0</version>
102106
</dependency>
103107
```
104108

@@ -107,7 +111,7 @@ and then the specific jar(s) for your platform(s) :
107111
<dependency>
108112
<groupId>ws.schild</groupId>
109113
<artifactId>jave-nativebin-osx64</artifactId>
110-
<version>3.2.0</version>
114+
<version>3.3.0</version>
111115
</dependency>
112116
```
113117

@@ -116,13 +120,13 @@ and then the specific jar(s) for your platform(s) :
116120
It includes all binaries for the supported platforms
117121

118122
``` XML
119-
compile group: 'ws.schild', name: 'jave-all-deps', version: '3.2.0'
123+
compile group: 'ws.schild', name: 'jave-all-deps', version: '3.3.0'
120124
```
121125

122126
### For one platform only (Linux 64Bit in this case)
123127
``` XML
124-
compile group: 'ws.schild', name: 'jave-core', version: '3.2.0'
125-
compile group: 'ws.schild', name: 'jave-nativebin-linux64', version: '3.2.0'
128+
compile group: 'ws.schild', name: 'jave-core', version: '3.3.0'
129+
compile group: 'ws.schild', name: 'jave-nativebin-linux64', version: '3.3.0'
126130
```
127131

128132
### Main Components of Jave2

jave-all-deps/pom.xml

+14-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>ws.schild</groupId>
77
<packaging>jar</packaging>
8-
<version>3.2.0</version>
8+
<version>3.3.0</version>
99
<artifactId>jave-all-deps</artifactId>
1010
<name>Jave all native dependencies package</name>
1111
<description>The JAVE (Java Audio Video Encoder) library is Java wrapper on the
@@ -154,42 +154,47 @@
154154
<dependency>
155155
<groupId>ws.schild</groupId>
156156
<artifactId>jave-core</artifactId>
157-
<version>3.2.0</version>
157+
<version>3.3.0</version>
158158
</dependency>
159159
<dependency>
160160
<groupId>ws.schild</groupId>
161161
<artifactId>jave-nativebin-win32</artifactId>
162-
<version>3.2.0</version>
162+
<version>3.3.0</version>
163163
</dependency>
164164
<dependency>
165165
<groupId>ws.schild</groupId>
166166
<artifactId>jave-nativebin-win64</artifactId>
167-
<version>3.2.0</version>
167+
<version>3.3.0</version>
168168
</dependency>
169169
<dependency>
170170
<groupId>ws.schild</groupId>
171171
<artifactId>jave-nativebin-linux32</artifactId>
172-
<version>3.2.0</version>
172+
<version>3.3.0</version>
173173
</dependency>
174174
<dependency>
175175
<groupId>ws.schild</groupId>
176176
<artifactId>jave-nativebin-linux64</artifactId>
177-
<version>3.2.0</version>
177+
<version>3.3.0</version>
178178
</dependency>
179179
<dependency>
180180
<groupId>ws.schild</groupId>
181181
<artifactId>jave-nativebin-osx64</artifactId>
182-
<version>3.2.0</version>
182+
<version>3.3.0</version>
183+
</dependency>
184+
<dependency>
185+
<groupId>ws.schild</groupId>
186+
<artifactId>jave-nativebin-osxm1</artifactId>
187+
<version>3.3.0</version>
183188
</dependency>
184189
<dependency>
185190
<groupId>ws.schild</groupId>
186191
<artifactId>jave-nativebin-linux-arm32</artifactId>
187-
<version>3.2.0</version>
192+
<version>3.3.0</version>
188193
</dependency>
189194
<dependency>
190195
<groupId>ws.schild</groupId>
191196
<artifactId>jave-nativebin-linux-arm64</artifactId>
192-
<version>3.2.0</version>
197+
<version>3.3.0</version>
193198
</dependency>
194199
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
195200
<dependency>

jave-core-test-java11/pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>ws.schild</groupId>
55
<packaging>jar</packaging>
6-
<version>3.2.0</version>
6+
<version>3.3.0</version>
77
<artifactId>jave-core-test-java11</artifactId>
88
<properties>
99
<maven.compiler.source>11</maven.compiler.source>
@@ -38,32 +38,32 @@
3838
<dependency>
3939
<groupId>ws.schild</groupId>
4040
<artifactId>jave-core</artifactId>
41-
<version>3.2.0</version>
41+
<version>3.3.0</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>ws.schild</groupId>
4545
<artifactId>jave-nativebin-win32</artifactId>
46-
<version>3.2.0</version>
46+
<version>3.3.0</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>ws.schild</groupId>
5050
<artifactId>jave-nativebin-win64</artifactId>
51-
<version>3.2.0</version>
51+
<version>3.3.0</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>ws.schild</groupId>
5555
<artifactId>jave-nativebin-linux32</artifactId>
56-
<version>3.2.0</version>
56+
<version>3.3.0</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>ws.schild</groupId>
6060
<artifactId>jave-nativebin-linux64</artifactId>
61-
<version>3.2.0</version>
61+
<version>3.3.0</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>ws.schild</groupId>
6565
<artifactId>jave-nativebin-osx64</artifactId>
66-
<version>3.2.0</version>
66+
<version>3.3.0</version>
6767
</dependency>
6868
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
6969
<dependency>

jave-core-test/pom.xml

+14-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>ws.schild</groupId>
77
<packaging>jar</packaging>
8-
<version>3.2.0</version>
8+
<version>3.3.0</version>
99
<artifactId>jave-core-test</artifactId>
1010
<properties>
1111
<maven.compiler.source>1.8</maven.compiler.source>
@@ -40,32 +40,32 @@
4040
<dependency>
4141
<groupId>ws.schild</groupId>
4242
<artifactId>jave-core</artifactId>
43-
<version>3.2.0</version>
43+
<version>3.3.0</version>
4444
</dependency>
4545
<dependency>
4646
<groupId>ws.schild</groupId>
4747
<artifactId>jave-nativebin-win32</artifactId>
48-
<version>3.2.0</version>
48+
<version>3.3.0</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>ws.schild</groupId>
5252
<artifactId>jave-nativebin-win64</artifactId>
53-
<version>3.2.0</version>
53+
<version>3.3.0</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>ws.schild</groupId>
5757
<artifactId>jave-nativebin-linux32</artifactId>
58-
<version>3.2.0</version>
58+
<version>3.3.0</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>ws.schild</groupId>
6262
<artifactId>jave-nativebin-linux64</artifactId>
63-
<version>3.2.0</version>
63+
<version>3.3.0</version>
6464
</dependency>
6565
<dependency>
6666
<groupId>ws.schild</groupId>
6767
<artifactId>jave-nativebin-osx64</artifactId>
68-
<version>3.2.0</version>
68+
<version>3.3.0</version>
6969
</dependency>
7070
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
7171
<dependency>
@@ -75,13 +75,13 @@
7575
<scope>test</scope>
7676
</dependency>
7777
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
78-
<dependency>
79-
<groupId>org.slf4j</groupId>
80-
<artifactId>slf4j-simple</artifactId>
81-
<version>${slf4j-simple.version}</version>
82-
<scope>test</scope>
83-
</dependency>
84-
<dependency>
78+
<dependency>
79+
<groupId>ch.qos.logback</groupId>
80+
<artifactId>logback-classic</artifactId>
81+
<version>1.2.3</version>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
8585
<groupId>org.seleniumhq.selenium</groupId>
8686
<artifactId>selenium-java</artifactId>
8787
<scope>test</scope>

jave-core-test/src/test/java/ws/schild/jave/ConcatEncoderTest.java

+65
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
import ws.schild.jave.encode.AudioAttributes;
2828
import ws.schild.jave.encode.EncodingAttributes;
2929
import ws.schild.jave.encode.VideoAttributes;
30+
import ws.schild.jave.filters.FilterChain;
31+
import ws.schild.jave.filters.FilterGraph;
32+
import ws.schild.jave.filters.MediaConcatFilter;
3033
import ws.schild.jave.info.VideoSize;
3134

3235
/** @author a.schild */
@@ -69,10 +72,63 @@ public void testConcatVideo1() throws Exception {
6972
List<MultimediaObject> src = new ArrayList<>();
7073
src.add(new MultimediaObject(source1));
7174
src.add(new MultimediaObject(source2));
75+
FilterGraph complexFiltergraph= new FilterGraph();
76+
FilterChain fc= new FilterChain();
77+
fc.addFilter(new MediaConcatFilter(src.size(), true, false));
78+
complexFiltergraph.addChain(fc);
79+
video.setComplexFiltergraph(complexFiltergraph);
7280
encoder.encode(src, target, attrs);
7381
assertTrue(target.exists(), "Output file missing");
82+
assertTrue(target.length() == 107384, "Output file incorrect size");
7483
}
7584

85+
/**
86+
* Test of encode method, of class Encoder.
87+
*
88+
* @throws java.lang.Exception
89+
*/
90+
@Test
91+
public void testConcatVideo2() throws Exception {
92+
System.out.println("concat two identical videos");
93+
94+
File source1 = new File(getResourceSourcePath(), "small.mp4");
95+
File source2 = new File(getResourceSourcePath(), "small.mp4");
96+
File target = new File(getResourceTargetPath(), "testConcatVideo2.mp4");
97+
if (target.exists()) {
98+
target.delete();
99+
}
100+
AudioAttributes audio = new AudioAttributes();
101+
audio.setCodec("eac3");
102+
audio.setBitRate(97000);
103+
audio.setSamplingRate(48000);
104+
audio.setChannels(2);
105+
VideoAttributes video = new VideoAttributes();
106+
video.setCodec("mpeg4");
107+
video.setBitRate(1500000);
108+
video.setFrameRate(30);
109+
video.setSize(new VideoSize(320, 240));
110+
EncodingAttributes attrs = new EncodingAttributes();
111+
attrs.setOutputFormat("mp4");
112+
attrs.setVideoAttributes(video);
113+
attrs.setAudioAttributes(audio);
114+
115+
Encoder encoder = new Encoder();
116+
117+
List<MultimediaObject> src = new ArrayList<>();
118+
src.add(new MultimediaObject(source1));
119+
src.add(new MultimediaObject(source2));
120+
121+
FilterGraph complexFiltergraph= new FilterGraph();
122+
FilterChain fc= new FilterChain();
123+
fc.addFilter(new MediaConcatFilter(src.size()));
124+
complexFiltergraph.addChain(fc);
125+
video.setComplexFiltergraph(complexFiltergraph);
126+
127+
encoder.encode(src, target, attrs);
128+
assertTrue(target.exists(), "Output file missing");
129+
assertTrue(target.length() == 1368738, "Output file incorrect size");
130+
}
131+
76132
@Test
77133
public void testContactAudio01() throws Exception {
78134
System.out.println("concat two wmv files and build wav from it");
@@ -97,7 +153,16 @@ public void testContactAudio01() throws Exception {
97153
List<MultimediaObject> src = new ArrayList<>();
98154
src.add(new MultimediaObject(source1));
99155
src.add(new MultimediaObject(source2));
156+
FilterGraph complexFiltergraph= new FilterGraph();
157+
FilterChain fc= new FilterChain();
158+
fc.addFilter(new MediaConcatFilter(src.size(), false, true));
159+
complexFiltergraph.addChain(fc);
160+
VideoAttributes video = new VideoAttributes();
161+
video.setComplexFiltergraph(complexFiltergraph);
162+
attributes.setVideoAttributes(video);
100163
encoder.encode(src, target, attributes);
101164
assertTrue(target.exists(), "Output file missing");
165+
assertTrue(target.length() == 20477182, "Output file incorrect size");
102166
}
167+
103168
}

0 commit comments

Comments
 (0)