3

Using RecordRTC and WebRTC I am able to save a Peer MediaStream as a webm/video file. The orientation of the file differs based on the peer device. Meaning a 640x480 video is rotated clockwise or counter clockwise.

To re-orient the recorded video, some of the videos need to be rotated "clockwise" and others need to be rotated "counter clockwise". I need a way to determine which direction to rotate the video. Otherwise, some videos will be right side up and others upside down.

I attempted to look up the orientation, using ffprobe. However, the videos created do not have the "rotate" tag in the metadata.

I have also been unable to find the orientation in the Peer video stream of the WebRTC object.

I really thought that since the Video Element has the WebRTC Peer Stream displayed correctly in it, that I should be able to get the orientation from it.

Daryl
  • 772
  • 8
  • 21
  • I ended up using a data channel to ask the peer what its camera orientation is and saved it along with the stream information. I was never pleased with this answer but it was the best I was able to come up with. I also asked the question in the RecordRTC project on Github: https://github.com/muaz-khan/RecordRTC/issues/395 – Daryl Dec 13 '18 at 20:24

0 Answers0