Closed EitanGoldfrad closed 7 years ago
Hi. Real-time orientation comes with video stream, in TS metadata. Using API it's impossible to get this data.
I think it has to be in some method of the API because the ts stream is always 320x568 but in the periscope.tv site they rotate the video when the phone is rotated but the stream itself stays in the initial 320x568 and so does the metadata. Could there be any other function that could do that?
periscope.tv player parses TS stream and extracts metadata:
Therefore there isn't separate API method.
Ohh I see. Is there a way to get this data using ffmpeg?
As far as I know, no. I tried -f ffmetadata metadata.txt
option, but periscope metadata is absent in output.
You can parse the stream manually, for example
ffmpeg -i "[url]" -c copy -f mpegts - | head | xxd | grep -A 1 rotation
prints some bytes after "rotation" word. Rotation is represented as 64-bit float after it and 0x00 byte.
Hey,
Is there a way to get the updated orientation of the video (if vertical or horizontal or flipped) The property "camera_rotation" in the 'accessChannel' function does not update, it just stays with its initial value.
Thanks