/

Enabling RAM Writes


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 as false.
  • Ensure that the servlet and servlet-mappings for hls and hls2 are defined in red5pro-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>