我无法构建 red5-hls-plugin

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

所以我最近在我的计算机上安装了 Red5 Docker image/container 并尝试获取 red5-hls-plugin built/compiled 以将其添加到插件中

我按照 https://github.com/Red5/red5-hls-plugin#tiagos-step-by-step-guide 上的说明进行了操作,但是当 red5-hls-plugin/plugin/ 目录中的 运行 mvn -Dmaven.test.skip=true 时,我得到的只是

[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

附加信息

我不知道你是否想将 hls 插件构建到你安装的版本,我有 1.0.4 但是当我编辑 pom.xml 文件并将 <red5-server.version>1.0.2-SNAPSHOT</red5-server.version> 更改为 <red5-server.version>1.0.4-RELEASE</red5-server.version> 并添加以下存储库:

<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>

我在尝试 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

只是为了回答这个老问题,以将其保留在 Stack Overflow 的本质中。我最终通过几乎使用当时比当前版本更旧的某些版本的构建工具来解决我的构建问题;更具体地说,使用 gcc 3.6 或更低版本与当时 linux 发行版附带的 3.7+。

我在帮助时收到的说明来自 red5 板的一位用户,他告诉我他是如何编译的,我将在下面分享对我有用的:

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!!