@amazon/vinyl-transmux 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @amazon/vinyl-transmux
|
|
2
|
+
|
|
3
|
+
[](https://amazonmusic.github.io/vinyl)
|
|
4
|
+
[](https://www.npmjs.com/package/@amazon/vinyl-transmux)
|
|
5
|
+
[](https://bundlejs.com/?q=@amazon/vinyl-transmux)
|
|
2
6
|
|
|
3
7
|
Converts MPEG-TS and raw ADTS segments into fragmented MP4 (fMP4) for playback
|
|
4
8
|
via Media Source Extensions. Zero external dependencies.
|
|
5
9
|
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```shell
|
|
13
|
+
npm install @amazon/vinyl-transmux
|
|
14
|
+
```
|
|
15
|
+
|
|
6
16
|
## Architecture
|
|
7
17
|
|
|
8
18
|
The package is split into three layers:
|
|
@@ -59,10 +69,10 @@ calls.
|
|
|
59
69
|
|
|
60
70
|
| Input | Output | Status |
|
|
61
71
|
| ------------------ | ------------------------------- | ------ |
|
|
62
|
-
| ADTS AAC | fMP4 audio (`mp4a`) |
|
|
63
|
-
| MPEG-TS with AAC | fMP4 audio (`mp4a`) |
|
|
64
|
-
| MPEG-TS with H.264 | fMP4 video (`avc1`) |
|
|
65
|
-
| MPEG-TS muxed | fMP4 video + audio (multi-trak) |
|
|
72
|
+
| ADTS AAC | fMP4 audio (`mp4a`) | yes |
|
|
73
|
+
| MPEG-TS with AAC | fMP4 audio (`mp4a`) | yes |
|
|
74
|
+
| MPEG-TS with H.264 | fMP4 video (`avc1`) | yes |
|
|
75
|
+
| MPEG-TS muxed | fMP4 video + audio (multi-trak) | yes |
|
|
66
76
|
|
|
67
77
|
## MP4 Box Writer
|
|
68
78
|
|
|
@@ -82,13 +92,11 @@ import {
|
|
|
82
92
|
patchDataOffset,
|
|
83
93
|
} from '@amazon/vinyl-transmux'
|
|
84
94
|
|
|
85
|
-
// Custom ftyp
|
|
86
95
|
const ftypBox = ftyp({
|
|
87
96
|
majorBrand: 'dash',
|
|
88
97
|
compatibleBrands: ['iso6', 'mp41'],
|
|
89
98
|
})
|
|
90
99
|
|
|
91
|
-
// Build a moov with custom tracks
|
|
92
100
|
const moovBox = moov(
|
|
93
101
|
audioTrak({
|
|
94
102
|
trackId: 1,
|
|
@@ -104,7 +112,6 @@ const moovBox = moov(
|
|
|
104
112
|
})
|
|
105
113
|
)
|
|
106
114
|
|
|
107
|
-
// Build a media fragment
|
|
108
115
|
const moofBox = moof({
|
|
109
116
|
sequenceNumber: 1,
|
|
110
117
|
trackId: 1,
|
|
@@ -129,3 +136,7 @@ The transmuxer includes a minimal H.264 SPS parser that extracts resolution and
|
|
|
129
136
|
profile information from Sequence Parameter Set NAL units. It supports Baseline,
|
|
130
137
|
Main, and High profiles including the chroma format and scaling matrix
|
|
131
138
|
extensions.
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amazon/vinyl-transmux",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "MPEG-TS to fMP4 transmuxer for browser and Node.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"watch:release": "tsx buildSrc/build.ts --watch --release"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@amazon/vinyl-build-utils": "^1.1.
|
|
74
|
-
"@amazon/vinyl-jasmine-wrapper": "^1.1.
|
|
73
|
+
"@amazon/vinyl-build-utils": "^1.1.1",
|
|
74
|
+
"@amazon/vinyl-jasmine-wrapper": "^1.1.1"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@amazon/vinyl-util": "^1.1.
|
|
77
|
+
"@amazon/vinyl-util": "^1.1.1"
|
|
78
78
|
},
|
|
79
79
|
"browserslist": [
|
|
80
80
|
"defaults, chrome 52, firefox 54, edge 15, safari 8"
|
|
81
81
|
],
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "e5a3429d802564132b16808a5b8a8e15a023a548"
|
|
83
83
|
}
|