RTSP restreamer

245 views
Skip to first unread message

Ramprasad N

unread,
Mar 10, 2015, 5:30:24 AM3/10/15
to red5in...@googlegroups.com
Hi,
I am to get RTSP working in Red5
I download the latest code of red5-rtsp-restreamer
https://github.com/Red5/red5-rtsp-restreamer/archive/master.zip
did mvn clean package

Got two "Symbol not found" errors in ICYStream.java
After commenting lines 83 and 84 it compiled and i got the war file

78: public ICYStream(String name) {
79: log.debug("Hello ICYStream!");
80: mPublishedName = name;
81: mLivePipe = null;
82: mCodecInfo = new StreamCodecInfo();
83: //mCodecInfo.setHasAudio(false);
84: //mCodecInfo.setHasVideo(true);
85: }

I placed the war file in webapps and restarted red5 and got the
following errors in the log.
I am working on developing an enterprise grade video surveillance
application. Is that possible using Red5 with red5-rtsp-restreamer ?
Has any one done it before?
I came across OpenMeetings which uses Red5 for video conferencing. But
is there a video surveillance application using Red5? (I am now
looking at http://www.technogumbo.com/projects/flex-red5-surveillance-system/flex-red5-surveillance-system.php)


2015-03-10 13:21:34,988 [Launcher:/rtsp] INFO
o.s.w.c.s.XmlWebApplicationContext - Refreshing Root
WebApplicationContext: startup date [Tue Mar 10 13:21:34 IST 2015];
parent: org.springframework.context.support.FileSystemXmlApplicationContext@265adfad
2015-03-10 13:21:35,003 [Launcher:/rtsp] INFO
o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions
from ServletContext resource [/WEB-INF/red5-web.xml]
2015-03-10 13:21:35,019 [Launcher:/rtsp] INFO
o.s.b.f.c.PropertyPlaceholderConfigurer - Loading properties file from
ServletContext resource [/WEB-INF/red5-web.properties]
2015-03-10 13:21:35,019 [Launcher:/rtsp] WARN
o.s.w.c.s.XmlWebApplicationContext - Exception encountered during
context initialization - cancelling refresh attempt
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'web.context' defined in ServletContext
resource [/WEB-INF/red5-web.xml]: Unsatisfied dependency expressed
through bean property 'clientRegistry': : Cannot find class
[org.red5.server.WebScope] for bean with name 'web.scope' defined in
ServletContext resource [/WEB-INF/red5-web.xml]; nested exception is
java.lang.ClassNotFoundException: org.red5.server.WebScope; nested
exception is org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.red5.server.WebScope] for bean with name
'web.scope' defined in ServletContext resource
[/WEB-INF/red5-web.xml]; nested exception is
java.lang.ClassNotFoundException: org.red5.server.WebScope
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1279)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1171)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.red5.server.tomcat.TomcatLoader$2.run(TomcatLoader.java:668)
[tomcatplugin-1.7.jar:na]
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.red5.server.WebScope] for bean with name
'web.scope' defined in ServletContext resource
[/WEB-INF/red5-web.xml]; nested exception is
java.lang.ClassNotFoundException: org.red5.server.WebScope
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:385)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:362)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1006)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:964)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:862)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1264)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
... 11 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.red5.server.WebScope
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
~[tomcat-embed-core.jar:7.0.57]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
~[tomcat-embed-core.jar:7.0.57]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:246)
~[spring-core-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317)
~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
... 20 common frames omitted

Thank you
Best Regards
Ramprasad

Andy Shaules

unread,
Mar 10, 2015, 5:41:12 PM3/10/15
to red5in...@googlegroups.com
That was built using a red5 version prior to the scope refactor.

You will have to change the import package names red5 uses for scope and
build against the red5 version you run..

Ram prasad

unread,
Mar 14, 2015, 2:54:49 AM3/14/15
to red5in...@googlegroups.com
Thank you Andy,
I am not very sure how to do that.

Here is what I tried

I am running the latest Red5 version (Red5 Server 1.0.5-RELEASE), installed bu setup-Red5-1.0.5.exe

In C:\Program Files (x86)\Red5\webapps\rtsp\WEB-INF\red5-web.xml
After changing
<bean id="web.scope" class="org.red5.server.WebScope" init-method="register">
to
<bean id="web.scope" class="org.red5.server.scope.WebScope" init-method="register">

the "java.lang.ClassNotFoundException: org.red5.server.WebScope" is gone but now I am getting "java.lang.NoClassDefFoundError: org/red5/proxy/StreamingProxy"

BTW, Looking at the line "requestSocket = new Socket("192.168.10.8", 554);" in AxisTest.java I have a basic doubt.
Will the rtsp-restreamer plugin listen on port RTSP port 554 and act as an RTSP server? or will it act as a RTMP client and send the received RTMP stream out to some other RTSP server?

Basically I want to know whether I can use Red5 for my Video surveillance application which receives videos from CCTV or IP cameras mainly through RTSP/RTP?
Please guide me

Thank you

Ram prasad

unread,
Mar 14, 2015, 7:58:27 AM3/14/15
to red5in...@googlegroups.com
Ah,
I think I now understand it better.
I think the IP camera will be running the RTSP server, and the rtsp-restreamer will act as an RTSP client and fetch the stream and send it to Red5 via RTMP. Am I right?

Thank you

mrchri...@gmail.com

unread,
Mar 14, 2015, 8:25:03 AM3/14/15
to red5in...@googlegroups.com
That is indeed the way it works. 

Sent from my iPad
--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mrchri...@gmail.com

unread,
Mar 14, 2015, 8:46:49 AM3/14/15
to red5in...@googlegroups.com
If you are willing to look at a non open source solution, sign up for Red5 Pro. We do have a much more refined and robust RTSP re-steaming feature built into the server. http://red5pro.com.

I totally respect going with either approach.

Sent from my iPad

On Mar 14, 2015, at 7:58 AM, Ram prasad <rampr...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages