Enabling RAM Writes
By default, disk writes of the video are set to true
. The necessary settings to allow for writing to RAM are:
- Define the
useDistWrites
bean property in conf/hlsconfig.xml asfalse
. - Ensure that the
servlet
andservlet-mappings
for hls and hls2 are defined inred5pro-server/webapps/live/WEB-INF/web.xml
.
The hls and hls2 definitions in red5pro-server/webapps/live/WEB-INF/web.xml:
<servlet>
<servlet-name>hls</servlet-name>
<servlet-class>com.red5pro.stream.transform.mpegts.server.TSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hls</servlet-name>
<url-pattern>*.m3u8</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>hls2</servlet-name>
<servlet-class>com.red5pro.stream.transform.mpegts.server.TSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hls2</servlet-name>
<url-pattern>*.ts</url-pattern>
</servlet-mapping>