Skip to content

Commit ebbbfab

Browse files
Merge branch 'master' into feature/error-handle
2 parents 5e80428 + 623bddf commit ebbbfab

25 files changed

Lines changed: 771 additions & 119 deletions

.vscode/launch.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@
2929
{
3030
"type": "node",
3131
"request": "launch",
32-
"name": "Wowza Example",
33-
"program": "${workspaceFolder}/examples/wowza.js",
32+
"name": "Demo Example",
33+
"program": "${workspaceFolder}/examples/demo.js",
3434
"preLaunchTask": "tsc: build - tsconfig.json",
35+
"args": [
36+
"-u","myusername",
37+
"-p","mypassword",
38+
"rtsp://8.8.8.8/stream1"
39+
],
3540
"outFiles": [
3641
"${workspaceFolder}/dist/**/*.js"
3742
]

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Next Release
2+
3+
**New features**:
4+
Output AV1 streams to a .obu file that 'ffplay' can replay. Tested with MediaMTX with ffmpeg sending AV1 via RTSP to MediaMTX
5+
Remove wowza demo. They no longer host an online RTSP server we can use
6+
Add new examples/demo where the URL, username and password can be passed on the Command Line
7+
Show Wall Clock Time for RTP packets after the RTCP Sender Report is received
8+
Initial RTSPS support, tested with Bosch CCTV Cameras. (did not work with Axis CCTV Cameras that want to use SRTP)
9+
Add support for SHA256 hash (in addition to existing MD5)
10+
11+
**Bug fixes**:
12+
Fix parsing of H265 with no 'fmtp' in the SDP
13+
114
# v3.0.4
215

316
**New features**:

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ Yellowstone was co-developed by Michael Bullington and Roger Hardiman.
3030

3131
## Examples
3232

33-
An example of most API features can be found at [examples/wowza.js](examples/wowza.js), which will create
34-
a file named bigbuckbunny.264 in the project's root directory. To test this file with a
35-
video player, you either need a video player that supports raw H264 frames, or wrap it
36-
in a container like MP4.
37-
You can play the video with
38-
```ffplay bigbuckbunny.264```
33+
An example of most API features can be found at [examples/demo.js](examples/demo.js), which will
34+
connect to a RTSP Stream and dump H264, H265 and AAC contents to a file.
35+
For example
36+
```node examples\demo.js rtsp://myhostname/stream1```
37+
```node examples\demo.js -u username -p password rtsp://myhostname/stream1```
38+
39+
To testthe output file with a video player you can use FFMPEG's ffplay command
40+
```ffplay outfile.264```
3941

4042
While yellowstone is /**not**/ dependent on ffmpeg, converting the file to an .mp4 can be easily
4143
accomplished with the following command.
4244

4345
```sh
44-
ffmpeg -f h264 -i bigbuckbunny.264 -vcodec copy bigbuckbunny.mp4
46+
ffmpeg -f h264 -i outfile.264 -vcodec copy outfile.mp4
4547
```
4648

4749

dist/RTSPClient.d.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/// <reference types="node" />
22
/// <reference types="node" />
33
/// <reference types="node" />
4+
/// <reference types="node" />
45
import * as net from "net";
6+
import * as tls from "tls";
7+
type SocketUnion = net.Socket | tls.TLSSocket;
58
import { EventEmitter } from "events";
9+
import * as util from "./util";
610
import { Transport } from "./util";
711
import * as transform from "sdp-transform";
812
declare enum ReadStates {
@@ -34,6 +38,9 @@ type Detail = {
3438
isH264: boolean;
3539
rtpChannel: number;
3640
rtcpChannel: number;
41+
sr_ntpMSW?: number;
42+
sr_ntpLSW?: number;
43+
sr_rtptimestamp?: number;
3744
};
3845
export default class RTSPClient extends EventEmitter {
3946
username: string;
@@ -44,7 +51,7 @@ export default class RTSPClient extends EventEmitter {
4451
isConnected: boolean;
4552
closed: boolean;
4653
_url?: string;
47-
_client?: net.Socket;
54+
_client?: SocketUnion;
4855
_cSeq: number;
4956
_unsupportedExtensions?: string[];
5057
_session?: string;
@@ -60,15 +67,16 @@ export default class RTSPClient extends EventEmitter {
6067
rtspPacket: Buffer;
6168
rtspPacketPointer: number;
6269
clientSSRC: number;
63-
tcpSocket: net.Socket;
70+
tcpSocket: SocketUnion;
6471
setupResult: Array<Detail>;
6572
constructor(username: string, password: string, headers?: {
6673
[key: string]: string;
6774
});
68-
_netConnect(hostname: string, port: number): Promise<this>;
69-
connect(url: string, { keepAlive, connection, }?: {
75+
_netConnect(hostname: string, port: number, secure?: boolean): Promise<this>;
76+
connect(url: string, { keepAlive, connection, secure, }?: {
7077
keepAlive: boolean;
7178
connection?: Connection;
79+
secure: boolean;
7280
}): Promise<Detail[]>;
7381
request(requestName: string, headersParam?: Headers, url?: string): Promise<{
7482
headers: Headers;
@@ -83,6 +91,8 @@ export default class RTSPClient extends EventEmitter {
8391
_sendInterleavedData(channel: number, buffer: Buffer): void;
8492
_sendUDPData(host: string, port: number, buffer: Buffer): void;
8593
_emptyReceiverReport(): Buffer;
86-
_socketWrite(socket: net.Socket, data: Buffer): Promise<any>;
94+
_socketWrite(socket: SocketUnion, data: Buffer): Promise<any>;
95+
ntpBaseDate_ms: number;
96+
GetWallClockTime(packet: util.RTPPacket, detail: Detail): Date | undefined;
8797
}
8898
export { RTPPacket, RTCPPacket } from "./util";

dist/RTSPClient.js

Lines changed: 96 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/RTSPClient.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/transports/H264Transport.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)