Video freeze on camera orientation change

85 views
Skip to first unread message

Bohdan Kontsedal

unread,
Dec 22, 2018, 5:39:56 AM12/22/18
to kurento
Hello,

I was faced with freeze video problem on Safari and latest Kurento. During recording, I have flipped phone few times and video is normal only before the first flip, then it freezes completely and very last frame before flip is shown.
I can't reproduce this problem on Android. Also, after patching for AAC codec support, audio is present during all recording. Is there any workaround to fix that? Thanks.

Bohdan Kontsedal

unread,
Dec 22, 2018, 5:45:12 AM12/22/18
to kurento
Also, it freezes only in recorded file. During a video conference, it doesn't freeze

суббота, 22 декабря 2018 г., 12:39:56 UTC+2 пользователь Bohdan Kontsedal написал:

Paulo R. Lanzarin

unread,
Dec 22, 2018, 5:45:20 AM12/22/18
to kur...@googlegroups.com
The MP4 container in gst/KMS (which is probably the one you are using for recording h264) do not support rotation or resolution changes. You'd have to use mkv for that (or webm when safari lands VP8)

--
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 post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/791a0394-bd35-48d8-9da7-2764b8983367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bohdan Kontsedal

unread,
Dec 22, 2018, 5:53:51 AM12/22/18
to kurento
Thanks for the response. I need to have the ability to immediately playback recorded session, and I believe safari doesn't support mkv playback. Or I'm wrong?  Also, the documentation says that recorder endpoint supports only WEBM and MP4 formats

суббота, 22 декабря 2018 г., 12:45:20 UTC+2 пользователь Paulo Lanzarin написал:

Bohdan Kontsedal

unread,
Dec 22, 2018, 6:15:48 AM12/22/18
to kurento
Also, I don't understand why it works on Android. I have left only h264 codec in SdpEndpoint.conf.json and ffprobe says that recorded file is with this codec

Micael Gallego

unread,
Dec 22, 2018, 7:27:51 AM12/22/18
to kur...@googlegroups.com
MKV format is in the works. It will land KMS in the next weeks/months.

Regarding to codecs, containers and devices with rotation.. we are limited by GStreamer container plugins and browser player capabilities. 

If you make extensive experimentation on this topic (devices, browsers, codecs, etc...) Please share with us to be included in Kurento official documentation.

Best regards


El sáb., 22 dic. 2018 12:15, Bohdan Kontsedal <kontsed...@gmail.com> escribió:
Also, I don't understand why it works on Android. I have left only h264 codec in SdpEndpoint.conf.json and ffprobe says that recorded file is with this codec

--
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 post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.

Bohdan Kontsedal

unread,
Dec 22, 2018, 8:27:13 AM12/22/18
to kurento
I see. Thanks for the explanation.
I am afraid that Mobile Safari is the only reason for using Kurento in my case(because MediaRecorder is not implemented yet) so there is no need for deep investigation for other browsers and platform, sorry. I think now I must find the way to lock aspectRatio of video somehow to avoid this issue (but looks like it is impossible). 

суббота, 22 декабря 2018 г., 14:27:51 UTC+2 пользователь Micael Gallego Carrillo написал:

Paulo R. Lanzarin

unread,
Dec 22, 2018, 12:18:37 PM12/22/18
to kur...@googlegroups.com
You cannot lock the aspect ratio afaik. The horrible workaround would be to detect the orientation changes and segment the recordings based on that (stop and start recording a new segment). You could then do some postprocessing with ffmpeg to reassemble, but that would still leave gaps.

Regarding it working on Android: I don't know the answer to that. Last I tested, even screen sharing on application windows broke with resizes, Android too. But then again, that was a couple of months ago. Was it Firefox or Chrome?

Regarding not being able to playback mkv on safari: you can pass a postprocessing script over the mkv recording  with e.g. ffmpeg to remux it from mkv to MP4. Use vcodec copy and it'll be almost instantaneous, if you need the recordings played right away.

Good news on the part of Micael about mkv. If you're in hurry, Bodan, you can compile Kurento with the proposed PRs that are currently open on kms-core and kms-elements that add mkv support and try it yourself.


Bohdan Kontsedal

unread,
Dec 22, 2018, 4:36:13 PM12/22/18
to kurento
I've tested on Chrome 71.0.3 on Android 7.1.2. Thanks for the advice, I will check PR for mkv support.

суббота, 22 декабря 2018 г., 19:18:37 UTC+2 пользователь Paulo Lanzarin написал:
Reply all
Reply to author
Forward
0 new messages