Errors in recording video file, output file is of just 1sec

166 views
Skip to first unread message

Mallikarjun Gurav

unread,
Jun 16, 2020, 8:54:54 AM6/16/20
to kurento
Hi,

We are using Java library for KMS interaction and recording of video streams on the server. 

Issue:
Presenter and Viewer performed a streaming of 02:29 mins in length with Iphone device and viewer was able to view the streaming when it was actually happened. But the recorded file produced on the server is of 1 sec in length having size 405 KB. Streaming period 2020-05-29T22:21:38 to 2020-05-29T22:24:07. Please note there are no exceptions produced by application code during this streaming session.
This faulty recording issue has been observed only once since last one year.

Presenter device info:
{
   "deviceType": "mobile",
   "deviceVendor": "Apple",
   "osName": "iOS",
   "osVersion": "13.4.1",
   "browserVersion": "13.1",
   "browserName": "Mobile Safari",
   "deviceModel": "iPhone"
}

However, observing KMS logs for the streaming duration we did see some exceptions reported while recording was in process. Detailed stack trace of KMS logs for that period(22:21:38 to 22:24:07) is attached.

We want to know, was there any issue at KMS level in the recording process, so that output produced with 1sec video, even though streaming was of 02:29 min? If there was an issue while recording by KMS itself, is there any chance to get fix for this issue in the upcoming releases? 

Thanks,
Mallikarjun


KMS_Error_Logs.txt

Juan Navarro

unread,
Jun 16, 2020, 1:41:15 PM6/16/20
to kur...@googlegroups.com
I think the problem is a change in resolution.

First format detected for GStreamer capabilities is like this:

video/x-h264, stream-format=(string)avc, [...], width=(int)480, height=(int)640, framerate=(fraction)0/1

then it suddenly changes to this:

video/x-h264, stream-format=(string)avc, [...], width=(int)640, height=(int)480, framerate=(fraction)0/1

and then it is when the error message appears: "pad video_0 refused renegotiation"

so I guess it is because the user rotates their smartphone... but the Kurento recorder won't allow changes in resolution, once the recording has started. More info in issues like https://github.com/Kurento/bugtracker/issues/372

I'm not sure if iOS Safari is doing the right thing here, changing the resolution. Also other thing to note is that framerate is 0/1, that sounds impossible but thankfully the decoder catches the issue ("ignoring insane framerate 1/0")
--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/73acb645-57ea-4cb1-887b-9a9915fd547co%40googlegroups.com.

Mallikarjun Gurav

unread,
Jun 17, 2020, 7:25:37 AM6/17/20
to kur...@googlegroups.com
Hi,
I did some testing on iphone around changing resolution. In a 60 sec video, after 45 seconds, I did rotate the camera. The output video was just 45 sec, so we lost those 15 sec of stream. 
Yes, the resolution gets changed once we rotate the iphone and thats why recording was paused and resulted in 45 sec video. But we cant ask iPhone why safari does that, right? 

So couple of things
1. Is there any fix that kurento could provide in upcoming release specifically for iphone in this case? 
2. If not providing any fix in near future by itself, can we raise a bug against kurento that would get a fix in next releases?

Seeking your suggestion. 

Thanks, 
Mallikarjun

nguyễn văn hưng

unread,
Jun 17, 2020, 11:42:28 PM6/17/20
to kur...@googlegroups.com
it not just when the user rotates the screen, sometimes, it also did some exception. I think it may be an internet problem. the Log is below: 
2020-06-18T03:08:37,513417 8845 0x00007f0b132f2700    info agnosticbin               kmsagnosticbin.c:774 kms_agnostic_bin2_link_pad() <kmsagnosticbin2-3>  Upstream provided caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001327640034ac568170f7979b81010103682211a801000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)360, height=(int)480, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:08:37,513575 8845 0x00007f0b132f2700    info agnosticbin               kmsagnosticbin.c:783 kms_agnostic_bin2_link_pad() <kmsagnosticbin2-3>  Downstream wanted caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)360, height=(int)480, codec_data=(buffer)01640034ffe1001327640034ac568170f7979b81010103682211a801000428ee3cb0, level=(string)5.2, profile=(string)high, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:08:37,513877 8845 0x00007f0b132f2700    info agnosticbin               kmsagnosticbin.c:774 kms_agnostic_bin2_link_pad() <kmsagnosticbin2-3>  Upstream provided caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001327640034ac568170f7979b81010103682211a801000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)360, height=(int)480, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:08:37,514015 8845 0x00007f0b132f2700    info agnosticbin               kmsagnosticbin.c:783 kms_agnostic_bin2_link_pad() <kmsagnosticbin2-3>  Downstream wanted caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)360, height=(int)480, codec_data=(buffer)01640034ffe1001327640034ac568170f7979b81010103682211a801000428ee3cb0, level=(string)5.2, profile=(string)high, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:08:37,730084 8845 0x00007f0b0ccdf700   fixme basesink                  gstbasesink.c:3125 gst_base_sink_default_event() <filesink1>  stream-start event without group-id. Consider implementing group-id handling in the upstream elements
2020-06-18T03:08:48,643029 8845 0x00007f0accb84700    info webrtcendpoint            kmswebrtcendpoint.c:128 on_ice_gathering_done() <kmswebrtcendpoint1>  [IceGatheringDone] session: 'kmswebrtcendpoint1-sess0'
2020-06-18T03:09:05,250238 8845 0x00007f0b10aed700    info KurentoServerMethods      ServerMethods.cpp:814 ping()  WebSocket Ping/Pong with sessionId c869159d-172d-4f97-ae93-59a866dd549b
2020-06-18T03:09:21,441193 8845 0x00007f0b0faeb700    info KurentoWebSocketTransport WebSocketTransport.cpp:340 keepAliveSessions()  Keep alive c869159d-172d-4f97-ae93-59a866dd549b
2020-06-18T03:09:23,140079 8845 0x00007f0b0e47e700 warning rtpsource                 rtpsource.c:1147 update_receiver_stats()  duplicate or reordered packet (seqnr 23291, expected 23293)
2020-06-18T03:09:23,277939 8845 0x00007f0b0e47e700 warning rtpsource                 rtpsource.c:1147 update_receiver_stats()  duplicate or reordered packet (seqnr 23291, expected 23301)
2020-06-18T03:09:28,848894 8845 0x00007f0b0ccdf700 warning qtmux                     gstqtmux.c:4123 gst_qt_mux_video_sink_set_caps() <mp4mux1>  pad video_0 refused renegotiation to video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001427640034ac568110bf9659b81010103682211a8001000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)264, height=(int)360, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:09:28,849015 8845 0x00007f0b0ccdf700 warning qtmux                     gstqtmux.c:4123 gst_qt_mux_video_sink_set_caps() <mp4mux1>  pad video_0 refused renegotiation to video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001427640034ac568110bf9659b81010103682211a8001000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)264, height=(int)360, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:09:28,849064 8845 0x00007f0b0ccdf700 warning basesrc                   gstbasesrc.c:2948 gst_base_src_loop() <videoSrc>  error: Internal data flow error.
2020-06-18T03:09:28,849084 8845 0x00007f0b0ccdf700 warning basesrc                   gstbasesrc.c:2948 gst_base_src_loop() <videoSrc>  error: streaming task paused, reason not-negotiated (-4)
2020-06-18T03:09:28,849123 8845 0x00007f0b0ccdf700 warning structure                 gststructure.c:1935 priv_gst_structure_append_to_gstring()  No value transform to serialize field 'gerror' of type 'GError'
2020-06-18T03:09:28,849115 8845 0x00007f0b0ccdf700 warning recorderendpoint          kmsrecorderendpoint.c:1969 bus_sync_signal_handler() <kmsrecorderendpoint1>  Message error message: 0x7f0ae02bc940, time 99:99:99.999999999, seq-num 4239, element 'videoSrc', GstMessageError, gerror=(GError)NULL, debug=(string)"gstbasesrc.c\(2948\):\ gst_base_src_loop\ \(\):\ /GstPipeline:pipeline3/GstAppSrc:videoSrc:\012streaming\ task\ paused\,\ reason\ not-negotiated\ \(-4\)";
2020-06-18T03:09:28,849192 8845 0x00007f0b0ccdf700 warning structure                 gststructure.c:1935 priv_gst_structure_append_to_gstring()  No value transform to serialize field 'gerror' of type 'GError'
2020-06-18T03:09:28,849187 8845 0x00007f0b0ccdf700 warning recorderendpoint          kmsrecorderendpoint.c:1973 bus_sync_signal_handler() <kmsrecorderendpoint1>  Error: error message: 0x7f0ae02bc940, time 99:99:99.999999999, seq-num 4239, element 'videoSrc', GstMessageError, gerror=(GError)NULL, debug=(string)"gstbasesrc.c\(2948\):\ gst_base_src_loop\ \(\):\ /GstPipeline:pipeline3/GstAppSrc:videoSrc:\012streaming\ task\ paused\,\ reason\ not-negotiated\ \(-4\)";
2020-06-18T03:09:28,849280 8845 0x00007f0b0ccdf700 warning qtmux                     gstqtmux.c:4123 gst_qt_mux_video_sink_set_caps() <mp4mux1>  pad video_0 refused renegotiation to video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001427640034ac568110bf9659b81010103682211a8001000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)264, height=(int)360, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:09:28,849327 8845 0x00007f0b0ccdf700 warning qtmux                     gstqtmux.c:4123 gst_qt_mux_video_sink_set_caps() <mp4mux1>  pad video_0 refused renegotiation to video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)01640034ffe1001427640034ac568110bf9659b81010103682211a8001000428ee3cb0, level=(string)5.2, profile=(string)high, width=(int)264, height=(int)360, framerate=(fraction)0/1, parsed=(boolean)true
2020-06-18T03:09:28,849561 8845 0x00007f0b267a1240   error KurentoMediaPipelineImpl  MediaPipelineImpl.cpp:69 processBusMessage()  Error code 1: 'Internal data flow error.', element: kmsrecorderendpoint1, parent: pipeline2
2020-06-18T03:09:28,849610 8845 0x00007f0b267a1240   error KurentoMediaPipelineImpl  MediaPipelineImpl.cpp:72 processBusMessage()  Debugging info: gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline3/GstAppSrc:videoSrc:
streaming task paused, reason not-negotiated (-4)
2020-06-18T03:09:28,849645 8845 0x00007f0b267a1240   error KurentoMediaElementImpl   MediaElementImpl.cpp:266 processBusMessage()  Error code 1: 'Internal data flow error.', element: kmsrecorderendpoint1, parent: kmsrecorderendpoint1
2020-06-18T03:09:28,849663 8845 0x00007f0b267a1240   error KurentoMediaElementImpl   MediaElementImpl.cpp:269 processBusMessage()  Debugging info: gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline3/GstAppSrc:video


Vào Th 4, 17 thg 6, 2020 vào lúc 18:25 Mallikarjun Gurav <mallika...@gmail.com> đã viết:

Mallikarjun Gurav

unread,
Jun 18, 2020, 3:38:29 AM6/18/20
to kurento
Hi,

Thanks for your reply.

Maybe internet problem in the case you mentioned in earlier email with the logs. But in my case, looking at the applicaiton logs, I am sure there is no network drop issue since there is no disconnect event been triggered during the session. The streaming did happen for 02:29 mins and then when application read the recording from the server to store in DB, it got only 1 sec video which is recorded by KMS.

So my case would be due to rotating the camera. And also we did verify with few test cases, this roatating the iPhone brings this issue for sure.
So in this case, considering the issue is due to roating the phone and resolution getting changed, can we comment on below points ?

1. Is there any fix that kurento could provide in upcoming release specifically for iphone in this case? 
2. If not providing any fix in near future by kurento, can we raise a bug against kurento that would get a fix in next releases?

Thanks,
Mallikarjun
To unsubscribe from this group and stop receiving emails from it, send an email to kur...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kur...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kur...@googlegroups.com.

Juan Navarro

unread,
Jun 18, 2020, 9:20:52 AM6/18/20
to kur...@googlegroups.com
Hi, this bug report can be used to keep progress about the issue with rotation:
https://github.com/Kurento/bugtracker/issues/484
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/beb9c1b7-35ee-4d42-a47b-d7e2ca58debeo%40googlegroups.com.

Carlos

unread,
Jun 26, 2020, 8:03:03 AM6/26/20
to kurento
Hi,

The 1sec video seems to be more related to the Chrome behavior detected in this report already mentioned by Juan: https://github.com/Kurento/bugtracker/issues/372
New Safari versions may behave similarly.

Regards,
Reply all
Reply to author
Forward
0 new messages