Versions Compared

Key

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

...

Warning

H265 will be transcoded to H264 or VP8 to play it from server!

Ports reservation for MPEG-TS publishing

Since build 5.2.2046 a certain ports may be reserved for MPEG-TS publishing (SRT or UDP). You don't need to send REST API queries before publishing in this case.

A ports should be reserved from the range set as follows

Code Block
themeRDark
mpegts_reserved_port_from=42001
mpegts_reserved_port_to=43000

MPEG-TS publising parameters are set in /usr/local/FlashphonerWebCallServer/conf/mpegts_ingest.yml file

Code Block
languageyml
themeRDark
streams:
  srtStream1:
    port: 42002
    transport: srt
    timeout: 10000
    hasAudio: true
    hasVideo: true
    maxTimeStampDiff: 90000
    allowedList: ["192.168.1.0/24","192.168.23.83"]
  udpStream2:
    port: 42004
    transport: udp
    timeout: 10000
    hasAudio: false
    hasVideo: true
    maxTimeStampDiff: 90000
    allowedList:
      - 192.168.1.0/24
      - 192.168.23.83

Where:

  • srtStream1, udpStream1 - reserved stream name
  • port - even port from mpegts_reserved_port_from - mpegts_reserved_port_to range
  • transport - transport to use: srt  или udp 
  • timeout - maximum media data receiving timeout, ms 
  • hasAudio - publish stream with audio
  • hasVideo - publish stream with video
  • maxTimeStampDiff - maximum timestamp difference between a sequential frames, ms
  • allowedList - client addresses list allowed to publish the stream

A reserved stream exist permanently on the server and are displayed in /stream/find, /mpegts/find_all REST API queries results. A viewers can't play the stream if there are no publishing to the reserved port.

It's enough to set the reserved port to publish the stream, /mpegts/startup REST query is not needed in this case:

Code Block
languagebash
themeRDark
ffmpeg -re -i bunny360p.mp4 -c:v libx264 -c:a aac -b:a 160k -bsf:v h264_mp4toannexb -keyint_min 60 -profile:v baseline -preset veryfast -f mpegts "srt://test1.flashphoner.com:42002"

Known issues

1. When MPEG-TS stream publishing via UDP is stopped at server side via REST API query /mpegts/terminate , publishing encoder still sends media data

...