google / spatial-media

Specifications and tools for 360º video and spatial audio.
Other
1.83k stars 424 forks source link

Error while loading Samsung Gear 360 videos #202

Open VoodooDE opened 6 years ago

VoodooDE commented 6 years ago

gear360

I have problems using the tool for my Samsung Gear 360 (2017). Last year it worked with the same videos, but now it doesnt. As soon as I try to open the files, this error occurs. Can you help me with that?

kabkee commented 6 years ago

I got the same one.

VoodooDE commented 6 years ago

So nobody can help here?

kabkee commented 6 years ago

@VoodooDE Not yet I think... I start studying python yesterday lol.

emontellese commented 6 years ago

Same issue

emontellese commented 6 years ago

The issue occurs in the user interface portion only. You can inject files with metadata using the commandline -- but this is unfortunately difficult for users unfamiliar with commandline tools.

The error occurs when the program attempts to read the existing metadata. If your file has no metadata it fails and dies.

For developers who want to fix it -- the fix should be rather simple: just handle the error and let the GUI continue (so the user can click the 'inject' button). I may investigate it in the future, but have limited time for awhile.

kabkee commented 6 years ago

Unfortunately, at the moment, the solution is that if you have Adobe premiere, you may convert the video with 360 video metadata :(

Boscop commented 6 years ago

@VoodooDE Maybe it works after converting it with VLC? Did you try that?

Chilliane commented 6 years ago

I have the same issue I have looked around for possible fix and i got this one https://github.com/google/spatial-media/tree/master/spatialmedia It has some line of codes that can you run on python however I am no coder on python and the codes does not explain how to target the file.

BigKahunaFSU commented 5 years ago

I have the same issue I have looked around for possible fix and i got this one https://github.com/google/spatial-media/tree/master/spatialmedia It has some line of codes that can you run on python however I am no coder on python and the codes does not explain how to target the file.

Did you get this to work? I'm in need of a fix bad. The videos of my daughter opening her Christmas presents aren't working.

Chilliane commented 5 years ago

Was not able to confirm, you can try Seems the all you need to do is install python and spatialmedia and run command

python spatialmedia -i [--stereo=(none|top-bottom|left-right)] [--spatial-audio]

= video.mp4

= injectedvideo.mp4 Tell me if it worked On Tue, 25 Dec 2018 at 08:02, BigKahunaFSU wrote: > I have the same issue > I have looked around for possible fix and i got this one > https://github.com/google/spatial-media/tree/master/spatialmedia > It has some line of codes that can you run on python however I am no coder > on python and the codes does not explain how to target the file. > > Did you get this to work? I'm in need of a fix bad. The videos of my > daughter opening her Christmas presents aren't working. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
tonytone23 commented 5 years ago

I use the Samsung software to stitch (1) and then facebook https://www.facebook.com/360_media/create to process the file (2), then I can inject (3). This is very cumbersome and I don't understand what's going on. Is there a way to streamline for Samsung 360 videos?

DeliberatelyOmitted commented 5 years ago

I am looking for what Youtube refers to simply as the metadata injector so I can upload 360 videos in fully functional mode. What i am finding here (which is where Google points me) is a clusterfuck (pardon my French) of frustrating dialog which leaves me with the impression there is really no viable way to perform this vital function, yet there are those who profess to know how but lack the ability to explain it to others.

Does anyone here speak "normal-speak" so that a simpleton such as myself can go on with my boring life and successfully upload my 360 videos from my Samsung 360 without banging my head against my keyboard more than I already have?

Thanks.

tonytone23 commented 5 years ago

There are two steps:

  1. Stitch the video using the software from Samsung - watch this: https://www.youtube.com/watch?v=2Fok2YcyNSw

  2. Inject the metadata to tell YouTube and Facebook that the stitched video is 360. - goto this page: https://support.google.com/youtube/answer/6178631?hl=en, download https://github.com/google/spatial-media/releases/tag/v2.1

I'm stuck on #2, even after I inject metadata, I still can't upload the video as 360.

Tony

On Mon, Mar 18, 2019 at 11:41 AM DeliberatelyOmitted < notifications@github.com> wrote:

I am looking for what Youtube refers to simply as the metadata injector so I can upload 360 videos in fully functional mode. What i am finding here (which is where Google points me) is a clusterfuck (pardon my French) of frustrating dialog which leaves me with the impression there is really no viable way to perform this vital function, yet there are those who profess to know how but lack the ability to explain it to others.

Does anyone here speak "normal-speak" so that a simpleton such as myself can go on with my boring life and successfully upload my 360 videos from my Samsung 360 without banging my had against my keyboard more than I already have?

Thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/spatial-media/issues/202#issuecomment-474049517, or mute the thread https://github.com/notifications/unsubscribe-auth/AtVgXiVMC8yVw9IVdlFonHEDtjR6cSYDks5vX93ggaJpZM4Uhy_n .

kenyob commented 5 years ago

Im having the same issue. Any fixes on this?

antoniobejar commented 5 years ago

I've just solved it. The issue is the script tries 'changing' 360 video metadata but, first time, doesn't exist. So, first step is opening 'https://www.facebook.com/360_media/create', select you video for manipulating it and press download. Now you get a '_edited'version of the file which, now, can be succesfully processed by spatial-media. Hope that helps.

anuragchauhan00 commented 2 years ago

thanks @antoniobejar ! as it is FB am bit conscious of privacy of videos being converted.

Any idea if this utility can work for Samsung 360? am soo glad to find this thread, for last 3 weeks i was thinking am doing something wrong :(

acem77 commented 2 years ago

same issue any hope of this being updated to ignore the missing meta data? or any other tools to use to create dummy meta data or replaces this? i will try to learn some python. my smooth brain cant even navigate dirs yet..

thanks

acem77 commented 2 years ago

getting this with the python version

D:\360\spatial-media-2.1>python spatialmedia -i D:\360\test.mp4 D:\360\testout.mp4 Processing: D:\360\test.mp4 Saved file settings Track 0 Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\360\spatial-media-2.1\spatialmedia\main.py", line 127, in main() File "D:\360\spatial-media-2.1\spatialmedia\main__.py", line 106, in main metadata_utils.inject_metadata(args.file[0], args.file[1], metadata, File "D:\360\spatial-media-2.1\spatialmedia..\spatialmedia\metadata_utils.py", line 430, in inject_metadata inject_mpeg4(infile, outfile, metadata, console) File "D:\360\spatial-media-2.1\spatialmedia..\spatialmedia\metadata_utils.py", line 381, in inject_mpeg4 parse_spherical_mpeg4(mpeg4_file, in_fh, console) File "D:\360\spatial-media-2.1\spatialmedia..\spatialmedia\metadata_utils.py", line 327, in parse_spherical_mpeg4 parse_spherical_xml(contents.decode("utf-8"), console) File "D:\360\spatial-media-2.1\spatialmedia..\spatialmedia\metadata_utils.py", line 282, in parse_spherical_xml for child in parsed_xml.getchildren(): AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

D:\360\spatial-media-2.1>python spatialmedia -i D:\360\test.mp4 D:\360\testout.mp4

sblackstein commented 1 year ago

BTW, for those still struggling with this, the fix is indeed to skip enumeration of existing tags and the injection proceeds just fine where YouTube sees the video as a 360. Just insert return sphericalDictionary as a new line before line 282 in parse_spherical_xml() in spatialmedia/metadata_utils.py to return early.