所以我最近在我的计算机上安装了一个Red5 Docker镜像/容器,并试图将red5-hls-plugin内置/编译为将其添加到插件中
我按照https://github.com/Red5/red5-hls-plugin#tiagos-step-by-step-guide上的说明按照说明操作,但在mvn -Dmaven.test.skip=true
目录中运行red5-hls-plugin/plugin/
时我得到的只是
[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>
在尝试编译/构建时,我现在收到以下错误:
[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
答案 0 :(得分:0)
回答这个老问题,将其保留在Stack Overflow性质的东西中。我最后修复了我的构建问题,因为那时使用的某些版本的构建工具比当前版本更旧;更具体地说,使用gcc 3.6或更低版本与当时Linux发行版附带的3.7+相比。
我在帮助时收到的指示是来自red5董事会的用户,他告诉我他是如何编写的,我将在下面分享哪些对我有用:
由谷歌red5小组提供Frans Gouverne提供的说明
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!!