mavendockerred5red5-hls-plugin

I can't get red5-hls-plugin to build


So I recently installed a Red5 Docker image/container on my computer and trying to get the red5-hls-plugin built/compiled to add it to the plugins

I followed the instructions as instructed on https://github.com/Red5/red5-hls-plugin#tiagos-step-by-step-guide but all I get when running mvn -Dmaven.test.skip=true in the red5-hls-plugin/plugin/ directory is

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org:jaudiotagger

Reason: Error getting POM for 'org:jaudiotagger' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/root/.m2/repository/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata-sonatype-snapshots.xml': end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... @6:8)
  org:jaudiotagger:pom:2.0.4-SNAPSHOT


 for project org:jaudiotagger

Additional Information

I don't know if your suppose to build the hls plugin to the version you have installed which I have 1.0.4 but when I edit the pom.xml file and change <red5-server.version>1.0.2-SNAPSHOT</red5-server.version> to <red5-server.version>1.0.4-RELEASE</red5-server.version> and add the following repositories:

<repository>
    <id>sonatype-releases</id>
    <url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>
<repository>
    <id>sonatype-snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>

I get the following error now when trying to compile/build:

[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 26 source files to /src/red5-hls-plugin/plugin/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /src/red5-hls-plugin/plugin/src/main/java/org/red5/service/httpstream/model/VideoFrame.java:[25,35] error: package org.red5.server.stream.codec does not exist
[ERROR] /src/red5-hls-plugin/plugin/src/main/java/org/red5/service/httpstream/model/VideoFrame.java:[58,34] error: package VideoCodec does not exist
[ERROR] /src/red5-hls-plugin/plugin/src/main/java/org/red5/service/httpstream/model/VideoFrame.java:[60,41] error: package VideoCodec does not exist
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

Solution

  • Just to answer this old question to preserve it in the Stack Overflow nature of things. I ended up fixing my build problem by pretty much using certain versions of build tools at that time that were older then the current versions; more specifically using gcc 3.6 or lower vs the 3.7+ that came with the linux distro at the time.

    The instructions I received at the time of help was from a user in the red5 board, he told me how he got his to compile which I will share below that worked for me:

    Instructions courtesy of Frans Gouverne off the google red5 group

    Below are the steps I made to get it up and running with latest release RED5 1.0.5.
    My server is running CentOS 6.6, 64-bits.
    Not sure if it is all 100% accurate, but it will come close to it.
    
    Hopefully it is of any help for you,
    
    Regards Frans
    
    ========================
    
    Install compiler and other tools:
      yum install git -y
      yum install gcc make gcc-c++ -y
      yum install libtool -y
      yum install automake -y
      yum install autoconf -y
      yum install openssl openssl-devel -y
      yum install yasm nasm -y
    
    Install JAVA:
      yum -y install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
      yum -y install java-1.8.0-openjdk-devel.x86_64
      export JAVA_HOME=/usr/lib/jvm/java
    
    Install Maven:
      cd /tmp/
      wget  http://mirrors.supportex.net/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
      tar -xfz apache-maven-3.3.3-bin.tar.gz
      mv apache-maven-3.3.3/ /opt/maven
      ln -s /opt/maven/bin/mvn /usr/bin/mvn
    
    Install Ant:
      cd /tmp/
      wget http://ftp.tudelft.nl/apache//ant/binaries/apache-ant-1.9.5-bin.tar.gz
      tar -xfz apache-ant-1.9.5-bin.tar.gz
      cp -r apache-ant-1.9.5 /usr/local/ant
      export ANT_HOME=/usr/local/ant
      export PATH=$PATH:/usr/local/ant/bin
    
    Build RED5 1.0.5 from source:
      cd /tmp/
      wget https://github.com/Red5/red5-server/archive/v1.0.5-RELEASE.tar.gz
      tar -xfz v1.0.5-RELEASE.tar.gz
      cd red5-server-1.0.5-RELEASE
      mvn -Dmaven.test.skip=true install
      mvn -Dmaven.test.skip=true clean package -P assemble
      cp target/red5-server-1.0.5-RELEASE-server.tar.gz /usr/local/
      cd /usr/local/
      tar -xfz red5-server-1.0.5-RELEASE-server.tar.gz
    
    Install xuggler:
      cd /tmp/
      git clone git://github.com/xuggle/xuggle-xuggler.git
      cd xuggle-xuggler
      ant  (or "ant install", not sure about that...)
      cp -r dist/lib/xuggle-xuggler-noarch.jar /usr/local/red5-server-1.0.5-RELEASE/plugins/
      cp -r dist/lib/xuggle-xuggler-arch-x86_64-unknown-linux-gnu.jar /usr/local/red5-server-1.0.5-RELEASE/plugins/
    
    Build Red5 HLS plugin:
      cd /tmp/
      git clone https://github.com/mondain/red5-hls-plugin.git
      cd red5-hls-plugin/plugin/
      mvn -Dmaven.test.skip=true
    
      cp red5-hls-plugin/plugin/target/hls-plugin-1.1.jar red5-hls-plugin/example/lib/
      cd red5-hls-plugin/example/
      mvn eclipse:eclipse
      mvn -Dmaven.test.skip=true
    
      cp /tmp/red5-hls-plugin/example/target/hlsapp-1.1.war /usr/local/red5-server-1.0.5-RELEASE/webapps/
      cp /tmp/red5-hls-plugin/plugin/target/hls-plugin-1.1.jar  /usr/local/red5-server-1.0.5-RELEASE/plugins/
    
    Finally restart red5 and add the segments directory!!