OpenVidu / openvidu

OpenVidu Platform main repository
https://openvidu.io
Apache License 2.0
1.88k stars 465 forks source link

black screen when record session in COMPOSED mode #299

Closed hemasharshar closed 4 years ago

hemasharshar commented 5 years ago

Hello,

I have problem when record session in COMPOSED mode and remote video,

record problem : when i record session in COMPOSED mode after i stop the record and download the file video display black screen but working fine with INDIVIDUAL mode

remote video problem : when i start session with two devices the remote video freezes after 3 second

Note : i using centos 7 server and docker container openvidu-server-kms:2.11.0 and openvidu-recording-node as client side, i didn't get any errors.

zlatnaspirala commented 5 years ago
hemasharshar commented 5 years ago

I am using Dedicated Server Processor: Intel Xeon Silver 4108 - 8 Total Cores Memory: 32GB DDR4 SDRAM

micaelgallego commented 5 years ago

CentOS is not officially supported. It should work, but OpenVidu COMPOSED mode uses Docker to create a browser that handles the recording and it is possible that some misconfiguration is causing problems.

Share openvidu-server logs to see if there is some clue on them

hemasharshar commented 5 years ago

I have two files logs openvidu-server.log openvidu-server-recording.log

hemasharshar commented 5 years ago

Are there any suggestions to solve this problem? @micaelgallego

pabloFuente commented 5 years ago

I see this line in your OpenVidu Server log:

{"log":"[INFO] 2019-08-05 15:02:42,429 [0.0-4443-exec-8] io.openvidu.server.recording.service.ComposedRecordingService (startRecordingWithVideo) - Recorder connecting to url https://OPENVIDUAPP:pass@OPENVIDU_IP:4443/#/layout-best-fit/iznev2nbckpntt1n/pass/4443/false\n","stream":"stdout","time":"2019-08-05T15:02:42.43372652Z"}

In this case, the container where the recording takes place will be connecting to url https://OPENVIDUAPP:pass@OPENVIDU_IP:4443/#/layout-best-fit/iznev2nbckpntt1n/pass/4443/false. There's somehting clearly wrong with that URL.

That "OPENVIDU_IP" is probably the cause the recording is black. Shold be a valid IP accessible for a Chrome instance inside the same host. It is by default the public ip OpenVidu gives clients to connect to it, so I don't really understand why it has that string as value. You can force the value of "OPENVIDU_IP" with configuration property openvidu.recording.composed-url

hemasharshar commented 5 years ago

Thank you for reply

The problem still exists i added property openvidu.recording.composed-url=https://quraniqraa.com:4443 This is log file for openvidu-server openvidu-server-recording.log

hemasharshar commented 5 years ago

Hello,

Any update in this please @pabloFuente

micaelgallego commented 5 years ago

Can you share openvidu-server.log?

hemasharshar commented 5 years ago

openvidu-server.log

micaelgallego commented 5 years ago

You have something wrong on your openvidu installation as this is where recorder is connecting to record:

(startRecordingWithVideo) - Recorder connecting to url https://OPENVIDUAPP:7g0rARAC4RBQegn8pi@quraniqraa.com

It seems you have used an email where a port should be used. And you have used user name when server URL has to be defined.

Regards

Micael Gallego https://gestion2.urjc.es/pdi/ver/micael.gallego ElasTest Project Technical Coordinator - http://elastest.io Profesor en la Escuela Técnica Superior de Ingeniería Informática URJC

On Tue, Aug 20, 2019 at 10:36 PM hemasharshar notifications@github.com wrote:

openvidu-server.log https://github.com/OpenVidu/openvidu/files/3522467/openvidu-server.log

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenVidu/openvidu/issues/299?email_source=notifications&email_token=AAIF2KCBTND4IAXHBSGAXXTQFRIWVA5CNFSM4IJUYB2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4XSSNA#issuecomment-523184436, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIF2KF2XRAMXQD2D7KV52DQFRIWVANCNFSM4IJUYB2A .

hemasharshar commented 5 years ago

I start openvidu by this commaned :

docker run -p 4443:4443 -e openvidu.secret=64DC879B48A5362A59 -e openvidu.publicurl=https://myWebsite:4443/ -e openvidu.recording.composed-url=https://myWebsite:4443 -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/KEYSTORE.jks:/path/to/KEYSTORE.jks:ro -v /path/to/recordings:/path/to/recordings -e openvidu.recording=true -e openvidu.recording.path=/path/to/recordings -e server.ssl.key-store=/path/to/KEYSTORE.jks -e server.ssl.key-store-password=64DC879B48A5362A59 -e server.ssl.key-alias=FILE_ALIAS -e KMS_STUN_IP=stun2.1.google.com -e KMS_STUN_PORT=19302 -e KMS_TURN_URL=admin:password@my_ip:port openvidu/openvidu-server-kms:2.11.0

and using this tutorial to test openvidu server and record : openvidu-recording-node https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-recording-node

Everything is good except record in composed mode.

hemasharshar commented 5 years ago

Hi Micael Gallego,

I try to record with INDIVIDUAL mode with openvidu-recording-node tutorial and REST API but i get this error :

`2019-08-26 12:47:28,138 DEBG 'openvidu-server' stdout output: [ERROR] 2019-08-26 12:47:28,137 [-4443-exec-8] io.openvidu.server.recording.service.SingleStreamRecordingService (startRecording) - Error waiting for some recorder endpoint to start in session k9djzmvblaeiolny

2019-08-26 12:47:28,139 DEBG 'openvidu-server' stdout output: [ERROR] 2019-08-26 12:47:28,138 [-4443-exec-8] io.openvidu.server.recording.service.RecordingService (failStartRecording) - Recording start failed for session k9djzmvblaeiolny: Couldn't initialize some RecorderEndpoint

2019-08-26 12:47:28,139 DEBG 'openvidu-server' stdout output: [INFO] 2019-08-26 12:47:28,139 [-4443-exec-8] io.openvidu.server.recording.service.SingleStreamRecordingService (stopRecording) - Stopping individual (video+audio) recording k9djzmvblaeiolny of session k9djzmvblaeiolny. Reason: null

2019-08-26 12:47:28,140 DEBG 'openvidu-server' stdout output: [INFO] 2019-08-26 12:47:28,139 [-4443-exec-8] io.openvidu.server.recording.service.SingleStreamRecordingService (stopRecorderEndpointOfPublisherEndpoint) - Stopping single stream recorder for stream lcydcaly95bmxg9m_CAMERA_NHNIU in session k9djzmvblaeiolny

2019-08-26 12:47:28,143 DEBG 'kms' stdout output: 19:20:29.675702256 95 0x7fd7a4002b90 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:427:processMessage: Message: {"id":437,"method":"subscribe","params":{"type":"Stopped","object":"5e0ecb22-8c75-47ef-8d48-e22bbb7a3967_kurento.MediaPipeline/2d3f1fd0-e1ea-4de8-8efd-e34c1c21c96c_kurento.RecorderEndpoint","sessionId":"b50d48e4-0742-40a8-8b34-335ab7ffc62b"},"jsonrpc":"2.0"}

2019-08-26 12:47:28,143 DEBG 'kms' stdout output: 19:20:29.676033430 95 0x7fd7a4002b90 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:429:processMessage: Response: {"id":437,"jsonrpc":"2.0","result":{"sessionId":"b50d48e4-0742-40a8-8b34-335ab7ffc62b","value":"1059526b-5ce2-445e-9470-ce9bf267172e"}}

2019-08-26 12:47:28,144 DEBG 'kms' stdout output: 19:20:29.676927026 95 0x7fd79c002320 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:427:processMessage: Message: {"id":438,"method":"invoke","params":{"object":"5e0ecb22-8c75-47ef-8d48-e22bbb7a3967_kurento.MediaPipeline/2d3f1fd0-e1ea-4de8-8efd-e34c1c21c96c_kurento.RecorderEndpoint","operation":"stop","sessionId":"b50d48e4-0742-40a8-8b34-335ab7ffc62b"},"jsonrpc":"2.0"}

2019-08-26 12:47:28,145 DEBG 'kms' stdout output: 19:20:29.677168706 95 0x7fd79c002320 ERROR KurentoUriEndpointImpl UriEndpointImpl.cpp:179:stop: Error: Already in state stop 19:20:29.677354477 95 0x7fd79c002320 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:429:processMessage: Response: {"id":438,"jsonrpc":"2.0","result":{"sessionId":"b50d48e4-0742-40a8-8b34-335ab7ffc62b","value":null}}

2019-08-26 12:47:33,147 DEBG 'openvidu-server' stdout output: [ERROR] 2019-08-26 12:47:33,145 [-4443-exec-8] io.openvidu.server.recording.service.SingleStreamRecordingService (stopRecording) - Error waiting for some recorder endpoint to stop in session k9djzmvblaeiolny

2019-08-26 12:47:33,155 DEBG 'openvidu-server' stdout output: [ERROR] 2019-08-26 12:47:33,151 [-4443-exec-8] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] (log) - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPointerException: null at io.openvidu.server.recording.service.SingleStreamRecordingService.sealMetadataFiles(SingleStreamRecordingService.java:360) at io.openvidu.server.recording.service.SingleStreamRecordingService.stopRecording(SingleStreamRecordingService.java:161) at io.openvidu.server.recording.service.SingleStreamRecordingService.stopRecording(SingleStreamRecordingService.java:132) at io.openvidu.server.recording.service.RecordingService.failStartRecording(RecordingService.java:167) at io.openvidu.server.recording.service.SingleStreamRecordingService.startRecording(SingleStreamRecordingService.java:116) at io.openvidu.server.recording.service.RecordingManager.startRecording(RecordingManager.java:184) at io.openvidu.server.rest.SessionRestController.startRecordingSession(SessionRestController.java:497) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:220) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) ` I test it on openvidue server ( 2.11.0 and 2.10.0) and i get the same error.

gvnramu commented 4 years ago

Hi, I got the same problem, working perfectly with localhost and not in server. The following is the composed URL https://OPENVIDUAPP:MY_SECRET@mydomain:4444/#/layout-best-fit/20044/pass/4444/false

gvnramu commented 4 years ago

comment 461548923 solved my problem