Paul-Louis Ageneau 30117bc3a3 Renamed Track::*RtcpHandler methods to Track::*MediaHandler hace 4 años
..
samples b39fe51365 Add h264 and opus samples hace 5 años
ArgParser.cpp 4d407cf15e Replace getopt with custom arg parser hace 5 años
ArgParser.hpp 4d407cf15e Replace getopt with custom arg parser hace 5 años
CMakeLists.txt 98d926a7bf Clean up examples/streamer/CMakeLists.txt a little bit. hace 4 años
README.md d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
client.js 7730496bf9 Fix streamer example for safari hace 4 años
dispatchqueue.cpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
dispatchqueue.hpp 226e849915 Include <functional> in dispatchqueue.hpp hace 5 años
fileparser.cpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
fileparser.hpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
h264fileparser.cpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
h264fileparser.hpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
helpers.cpp b5699239cc Rename RtcpSRReporter to RtcpSrReporter for naming consistency hace 4 años
helpers.hpp b5699239cc Rename RtcpSRReporter to RtcpSrReporter for naming consistency hace 4 años
index.html 7730496bf9 Fix streamer example for safari hace 4 años
main.cpp 30117bc3a3 Renamed Track::*RtcpHandler methods to Track::*MediaHandler hace 4 años
opusfileparser.cpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
opusfileparser.hpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años
stream.cpp 3f9565b55d Add custom implementation of usleep for windows hace 5 años
stream.hpp d9aa1818b2 Add example project for h264 and opus streaming hace 5 años

README.md

Streaming H264 and opus

This example streams H264 and opus1 samples to the connected browser client.

Starting signaling server

$ python3 ../signaling-server-python/signaling-server.py

Starting php

$ php -S 127.0.0.1:8080

Now you can open demo at 127.0.0.1:8080.

Arguments

  • -a Directory with OPUS samples (default: ../../../../examples/streamer/samples/opus/).
  • -b Directory with H264 samples (default: ../../../../examples/streamer/samples/h264/).
  • -d Signaling server IP address (default: 127.0.0.1).
  • -p Signaling server port (default: 8000).
  • -v Enable debug logs.
  • -h Print this help and exit.

Generating H264 and Opus samples

You can generate H264 and Opus sample with samples/generate_h264.py and samples/generate_opus.py respectively. This require ffmpeg, python3 and kaitaistruct library to be installed. Use -h/--help to learn more about arguments.

1 Opus samples are generated from music downloaded at bensound.