VideoContext icon indicating copy to clipboard operation
VideoContext copied to clipboard

Vertical video

Open pietrop opened this issue 4 years ago • 8 comments

👋Hello, Can VideoContext handle vertical video (eg from a phone)? I did a test and it seemed to stretch it side to side...

pietrop avatar Mar 17 '20 23:03 pietrop

Hi @pietrop

Running a test locally with a phone recording does suggest we aren't using the rotation metadata which confirms your results.

Looking back at previous issues - https://github.com/bbc/VideoContext/issues/155 - the challenge is that we don't have access to the rotation metadata within JavaScript.

I'd certainly welcome a pull request/contribution if you find a sensible approach or workaround that we can document. Otherwise, this is something I'll note as TODO.

yakca avatar Mar 18 '20 14:03 yakca

Hey @bevand10, do you have any thoughts on this? :)

emettely avatar Mar 18 '20 15:03 emettely

Thanks @yakca, It seems like with ffprobe and exiftool it might be possible to get the rotation ("server side" in node) - "Inspect Video Orientation using Node & fluent-ffmpeg, ExifTool, or MediaInfo"

So was wondering, could there be an optional attribute in the segments of the sequence/playlist/edl eg 'rotation'? And if that's present VideoContext behaves accordingly?

pietrop avatar Mar 18 '20 15:03 pietrop

Also I remember @chrisbaume a while back mentioned using mediainfo lib github.com/buzz/mediainfo.js(demo mediainfo.js.org) and that seems to return a rotation attribute 😮

Screen Shot 2020-03-18 at 11 43 52 AM

pietrop avatar Mar 18 '20 15:03 pietrop

mediainfo looks promising, looks the native transpile is the key there.

yakca avatar Mar 19 '20 21:03 yakca

ok, just to get an overview, do you know once figured out that first part of getting the rotation metadata info, what else would need to be changed(and where, in the code) for VideoContext to take it into account when showing a clip?

pietrop avatar Mar 19 '20 22:03 pietrop

Also was just looking that, canvas.rotate and canvas.transform might come in handy unless you already have some other way in mind?

pietrop avatar Mar 19 '20 22:03 pietrop

Hi @pietrop - sorry for the delay. It will be a month or two before I can personally look at adding this as a feature. The canvas transformation may be useful but it isn't an area I'm familiar with in VC yet. We are in something of a transition phase between maintainers; it is now @emettely and myself and we are both relatively new to the project.

If you get something working, we'd certainly be happy to look at a pull request!

yakca avatar Apr 07 '20 20:04 yakca