Receive and re-stream MPEG-TS with Wowza and problems with MPTS

2015-02-05 19:04:00

One of the most popular practices is to deploy Wowza Streaming Engine for receiving of MPEG-TS transport stream ( usually multicast ) from satellite receiver or cable receiver ( IP headend ) and re-stream it over the Internet , with transcoding or without it ( in case the source stream is encoded H.264/AAC|MP3 ). MPEG-TS stream could be of two types SPTS and MPTS. On Wowza side the stream’s address is defined in the .stream file and being published by adding it into auto start file. With MPTS all the settings are the same but PID of the program to re-stream should be defined also. Usually there are no problems with the first type of the stream but the result with MPTS could disappoint much – video image is fill of missing pixels like on the sample below:

With the same source stream in SPTS the problems are not observed. The reason of the issue in this case is covered in the settings of UDP buffer defined in the operating system by default. In both Linux and Windows receive buffer is not large enough for MPEG-TS of MPTS type. For Linux buffer settings are defined by the following commands: echo 3000000 > /proc/sys/net/core/rmem_default echo 3000000 > /proc/sys/net/core/rmem_max or is edited in sysctl.conf file . The second approach will allow to preserve the values upon reboot. For Windows buffer settings are defined in the registry : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters New DWORD type value "DefaultReceiveWindow" should be created and the size of the buffer should be set by decimal value. The buffer size depends on the source stream bitrate and on the number of programs in MPTS. The summary bitrate value in bytes could be set as the starting point. Content edited with the HTML G online editor program . Please purchase a license to stop adding similar ads to the edited documents.