diff --git a/README.md b/README.md index 04fcb53..8310f33 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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