MediaArea / MediaInfoLib

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://mediaarea.net/MediaInfo
BSD 2-Clause "Simplified" License
632 stars 173 forks source link

Video 360 #129

Open fdsadat opened 8 years ago

fdsadat commented 8 years ago

Is there a way to get Spherical information? It seems to be in a different part of the video metadata, I could not retrieve this info.

JeromeMartinez commented 8 years ago

I found a draft of 360° metadata but I don't find such metadata in a 360° mp4 from Youtube, looks like they use a side car XML.

Please provide a mp4 with 360° metadata in it.

fdsadat commented 8 years ago

There is an exemple, just rename it to .mp4, if you open it with notepad you can see spherical metadata.. Im newbie using this lib, if you find out how to get this data, please help me

test

JeromeMartinez commented 8 years ago

There is an exemple

Thank you for the file. I see the global spherical video metadata.

Im newbie using this lib, if you find out how to get this data, please help me

MediaInfo currently does not read this meta, this is a feature request. What kind of MediaInfo output do you expect (which detail is important for you? only the presence of spherical metadata? or more?)

JeromeMartinez commented 8 years ago

Accepted.

Warning: non-paid feature request are set to low priority, I don't know when I have time to handle it. If you desire to accelerate the development, don't hesitate to contact me for a quotation.

fdsadat commented 8 years ago

Can you give me some directions so I could help you with this?

Thx in advance!

JeromeMartinez commented 8 years ago

First: say an example of output you expect (which field you want, which value you expect...)

fdsadat commented 8 years ago
<rdf:SphericalVideo xmlns:GSpherical="http://ns.google.com/videos/1.0/spherical/">
<GSpherical:Spherical>true</GSpherical:Spherical>
<GSpherical:Stitched>true</GSpherical:Stitched>
<GSpherical:StitchingSoftware>Samsung Gear 360 Manager</GSpherical:StitchingSoftware>
<GSpherical:ProjectionType>equirectangular</GSpherical:ProjectionType>
<GSpherical:InitialViewHeadingDegrees>90</GSpherical:InitialViewHeadingDegrees>
<GSpherical:InitialViewPitchDegrees>0</GSpherical:InitialViewPitchDegrees>
<GSpherical:InitialViewRollDegrees>0</GSpherical:InitialViewRollDegrees>
</rdf:SphericalVideo>

This would be the input, the output would be all those tags...

fdsadat commented 8 years ago

https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md

This project specify very well how those spherical tags work and how they are saved inside the video file

JeromeMartinez commented 8 years ago

the output would be all those tags...

Hum... 7 lines for only spherical info, it is too much for at least the default view (data will be available via "-f" option from the command line, and only one or 2 lines, to be defined, would be displayed by default). I think I would be OK for something like:

Spherical Video Stitching Software: Samsung Gear 360 Manager
Spherical Video Projection Type: equirectangular

Why other fields are important for you?

This project specify very well how those spherical tags work and how they are saved inside the video file

They do not say which metadata is relevant when we want to show information on 1 line.

Can you give me some directions so I could help you with this?

First, checking the code and expanding it for supporting the parsing of the corresponding atom, a bit like this atom with UUID. Then sending the atom content to a MediaInfo parser you create, like the PropertyList parser (it also parses XML content).

fdsadat commented 8 years ago

Why other fields are important for you?

I will use these informations to better show our content, When I start playing a 360 video, I need to know the place where I should start looking at, for exemple

https://www.youtube.com/watch?v=-xNN-bJQ4vI

Like in this video, I need to set the first place to look as the Gillett logo.

Other metadata might be usefull latter too, but, right now, this one is needed too..

fdsadat commented 8 years ago

I still cant understand much of the solution... :(

I think I will wait until you have time to finish this, thx for the hard work!

mrshll commented 8 years ago

google's spatialmedia tool provides a python implementation of extracting this data

https://github.com/google/spatial-media/tree/master/spatialmedia

With the output:

$ python spatialmedia spherical_video.mp4
Processing: spherical_video.mp4
Loaded file...
    Track 0
        Spherical = true
        Stitched = true
        StitchingSoftware = Spherical Metadata Tool
        ProjectionType = equirectangular
    Track 1

It would be awesome to see something similar in mediainfo

luckyzoner commented 6 years ago

Hey Jerome It would be helpful if you could provide the ETA for the solution. We have been using mediainfo to extract metadata from remote assets. Other tools such as exiftool , though providing projection information, works only on local files. Regards Lakshaya

JeromeMartinez commented 6 years ago

ETA actually depends on you. I added it to our new vote system: Vote for Video 360 / Spherical information in MediaInfo! (I set the target lower than our cost because the feature may be interesting in general)