Starting the websocket server?
I'm a bit confused on how I can get your code up and running, any help would be appreciated. It looks like some really cool stuff you've built, but I can't play around with it unless I can setup the websockets, etc. Thanks!
Have you built WSStreamer yet? If you have, you can use the WSStreamer executable in the following way:
WSStreamer <host> <port>
It defaults to
WSStreamer localhost 8082
Let me know if you need help building WSStreamer
Make sure you have the Boost libraries installed and setup properly first:
- Unzip boost libraries to C:\Program Files\boost\boost_1_58_0
- Set the environment variable BOOSTROOT to wherever you've unzipped the files to. You may need to restart Visual Studio for the variable to take into effect.
- Open command prompt and run:
bootstrap
b2
I've added a README. Let me know if you need anymore information.
Thanks so much! I'm still resolving some issues with building boost. While I get that ironed out, do you think it would be possible to seek/skip around on an h264-encoded stream using websockets?
It should be possible, but you won't be able to seek based on time as there's no time index. The .264 files are just NAL frames strung together. You can however implement a system where you index the file first by searching for all the NAL headers (they start with a 4 byte header (0x00000001) and saving the file read head position for each one so you can seek based on NAL number. Then you can implement a "SEEK" message in WSStreamerHandler::on_message that adjusts the file read head.
Unfortunately I don't have time to implement this in the next few weeks. You are welcome to try to implement that in the source though :)