Skip to content

Commit

Permalink
readme - Testing section before Using section
Browse files Browse the repository at this point in the history
- more logical flow
  • Loading branch information
bmegli committed Jan 11, 2020
1 parent beca6f1 commit 0b80e18
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,42 @@ cmake ..
make
```

## Testing

Assuming:
- you are using VAAPI device "/dev/dri/renderD128"
- port is 9766
- codec is h264

### Receiving side

```bash
./nhvd-receive-example 9766 vaapi h264 /dev/dri/renderD128
```

### Sending side

For a quick test you may use [NHVE](https://github.com/bmegli/network-hardware-video-encoder) procedurally generated H.264 video (recommended).

```bash
# assuming you build NHVE, in build directory
./nhve-stream-h264 127.0.0.1 9766 10 /dev/dri/renderD128
```

If you have Realsense camera you may use [realsense-network-hardware-video-encoder](https://github.com/bmegli/realsense-network-hardware-video-encoder).

```bash
# assuming you build RNHVE, in build directory
./realsense-nhve-h264 127.0.0.1 9766 color 640 360 30 10 /dev/dri/renderD128
```

If everything went well you will:
- see hardware initialized
- collected frames info
- decoded frames size

If you have multiple vaapi devices you may have to specify correct one e.g. "/dev/dri/renderD129"

## Using

See [HVD](https://github.com/bmegli/hardware-video-decoder) docs for details about hardware configuration.
Expand Down Expand Up @@ -113,42 +149,6 @@ See examples directory for a more complete example.
nhvd_close(network_decoder);
```
## Testing
Assuming:
- you are using VAAPI device "/dev/dri/renderD128"
- port is 9766
- codec is h264
### Receiving side
```bash
./nhvd-receive-example 9766 vaapi h264 /dev/dri/renderD128
```

### Sending side

For a quick test you may use [NHVE](https://github.com/bmegli/network-hardware-video-encoder) procedurally generated H.264 video (recommended).

```bash
# assuming you build NHVE, in build directory
./nhve-stream-h264 127.0.0.1 9766 10 /dev/dri/renderD128
```

If you have Realsense camera you may use [realsense-network-hardware-video-encoder](https://github.com/bmegli/realsense-network-hardware-video-encoder).

```bash
# assuming you build RNHVE, in build directory
./realsense-nhve-h264 127.0.0.1 9766 color 640 360 30 10 /dev/dri/renderD128
```

If everything went well you will:
- see hardware initialized
- collected frames info
- decoded frames size

If you have multiple vaapi devices you may have to specify correct one e.g. "/dev/dri/renderD129"

## License
Library and my dependencies are licensed under Mozilla Public License, v. 2.0
Expand Down

0 comments on commit 0b80e18

Please sign in to comment.