Skip to content

openigtlink/VideoStreamingOpenIGTLink

Repository files navigation

Video Streaming with OpenIGTLink and OpenH264 Library

This project is a demonstration of video streaming using OpenIGTLink protocal OpenIGTLink Web Page and OpenH264 library OpenH264 Web Page. The project is consists of two sub-projects, a VideoStreamServer and a VideoStreamReceiver, the former reads a video file of YUV format and compresses the file into bit stream, while the latter receives the bit stream and decompresses the bit stream back into YUV file. The communication between them is achieved via the OpenIGTLink protocal.

Build Instruction

Linux / Mac OS X

First, obtain the source code from the repository using Git. To simply download the code, run the following command from a terminal:

$ git clone https://github.com/leochan2009/VideoStreamingOpenIGTLink.git

Then configure using CMake. The library requires CMake version higher than 2.8.

$ mkdir VideoStreamingOpenIGTLink-build
$ cd VideoStreamingOpenIGTLink-build
$ cmake ../VideoStreamingOpenIGTLink
$ make

If all went OK you will have the executable and the library:

  • ../VideoStreamingOpenIGTLink-build/VideoStreamReceiver/VideoStreamReceiver.exec
  • ../VideoStreamingOpenIGTLink-build/VideoStreamServer/VideoStreamServer.exec

You may install the library into your disk (optional). The default target directory is /usr/local, but you can configure it from the CMake configuration screen. To install the files, run

$ make install

You might need super user access.

Windows

  • Download the source code from Git repository.
  • Run CMake
    • Where is the source code: C:\Devel\VideoStreamingOpenIGTLink
    • Where to build the binaries: C:\Devel\VideoStreamingOpenIGTLink-build
    • Click "Configure" and select your compiler (usually just click "OK")
    • Message: "Build directory does not exit, should I create it?" - click "OK"
    • Click "Configure"
    • The source code for OpenIGTLink and OpenH264 will be download, OpenIGTLink library will be build automatically.(if the build was not successful, manual rebuild is needed, Check the build step for OpenIGTLink at this web page OpenIGTLink Web Page)
    • In the CMake GUI of VideoStreamingOpenIGTLink, specify the build location of the OpenIGTLink and configure again if you use manual build.
    • close this CMake
  • Build OpenH264
    • The source file is located at: C:\Devel\VideoStreamingOpenIGTLink-build\OpenH264
    • Check the build step for OpenH264 at this web page OpenH264 Web Page
  • Start Visual C and compile the project (C:\Devel\VideoStreamingOpenIGTLink-build\VideoStreamingOpenIGTLink.sln) If all went OK you will have the executable and the library:
  • C:\Devel\VideoStreamingOpenIGTLink-build\VideoStreamReceiver\bin\debug\VideoStreamReceiver.exe
  • C:\Devel\VideoStreamingOpenIGTLink-build\VideoStreamServer\bin\debug\VideoStreamServer.exe

Demonstration Instruction

Prepare the data in the format of YUV420, which is currently the only supported format. Open A terminal or command window, run the VideoStreamServer.exec first, which take four augments, an example in the mac terminal will be:

$  ./VideoStreamServer 18944 ../OpenH264/res/CiscoVT2people_320x192_12fps.yuv 320 192

Then run the VideoStreamReceiver.exec in another terminal window, an example will be:

$  ./VideoStreamReceiver localhost  18944 10 100

To see the explanation of the augments, just run the programs without any augments. The decoded output image with name "outputDecodedVideo.yuv" will be in the same directory as the VideoStreamReceiver.exec To view the decodedvideo, you could download a YUV player from this repository YUV Player

License

The code is distributed as open source under the new BSD liccense.

Acknowledgement

  • The project is based on the work of OpenIGTLink and OpenH264 Communities.
  • Documentation is based on the README.md file from OpenIGTLink.
  • We also use The video display from the Institut für Nachrichtentechnik from RWTH Aachen University

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published