Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • BigBuckBunny.mp4 is a file to publish
  • test1.flashphoner.com is WCS server
  • stream_ffmpeg is a stream name to publish on server

The stream publishing begins.

3. Open Player appliction in browser https://test1.flashphoner.com:8888/client2/examples/demo/streaming/player/player.html, where test1 where test1.flashphoner.com is com is WCS server. Set the stream name and press 'Play'. The stream playback begins.

Excerpt

Sorenson Spark + Speex 16 kHz stream publishing

WCS server can capture RTMP stream encoded with Sorenson Spark + Speex 16kHz to FLV container. This stream can be published, for example, using ffmpeg as follows:

Code Block
languagebash
themeRDark
ffmpeg -re -i BigBuckBunny.flv -preset ultrafast -ar 16000 -ac 1 -acodec speex -vcodec flv -strict -2 -f flv rtmp://test1.flashphoner.com:1935/live/test

Known limits

1. To handle such stream including stream recording, the stream will be transcoded to H.264 + AAC.

2. Payload types 127 for video and 97 for audio should be set in SDP when publishing such stream, for example

Code Block
languagebash
themeRDark
v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 127
a=rtpmap:127 FLV/90000
a=sendonly
m=audio 0 RTP/AVP 97 8 0
a=rtpmap:97 SPEEX/16000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=sendonly

...

Code Block
languagejs
themeRDark
{
 "auth" : "22222222",
 "stream" : "3333333"
}

How to rotate stream published from ffmpeg

ffmpeg RTMP encoder allows to send orientation metadata to WCS server using command line switches:

Code Block
languagebash
themeRDark
ffmpeg -i input.mp4 -metadata:s:v rotate=90 -vcodec copy -acodec copy -strict -2 -f flv rtmp://test1.flashphoner.com:1935/live/stream_ffmpeg

Note that ffmpeg sends orientattion value but not angle itself.