-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video Stitching is not working for Gear360(R210) 2017 model video #43
Comments
Could you please try with the latest version? |
Hi, the image stitch works fine (thanks!), but I too am having problem with the video (nona image sizes not consistent). My unit is a SM-R210. In the camera settings the video is a fixed 2560x1280. This may be a problem since you said it had to be 1290. In the phone Gear-app, the video size is grayed out, so I cannot change it. Presumably I can go into the pto and modify it? The output to the frames sub-directory works. However, at the start of the decompression, ffmpeg output the following: Regards, |
Good news everyone! I got it working on the video from the SM-R210. I guessed correctly that it was the "wrong" numbers in the pto file because the image size was different. I just scaled all the X,Y, displacement numbers appropriately , in my case divide by 2.2625 (instead of 5792x2896 it is 2560x1280) , loaded up the image and modified pto in Hugin: adjusted a few control points, recalculated, stitched, check that it looked the same (it does), then hard-coded gear360video.cmd to point to the modded pto, and it ran fine. I will post the new pto when I figure out where I can attach it. |
Oh, it says it right there at the bottom of the box. Doh. I just added the .log at the end so github would attach the .pto file. More than one way for changing the scripts, but a simple one is adding a command-line parameter while calling gear360pano.cmd to let it know to load the different pto. Or running an if structure based on the height/width. One thing I did notice is that the ffmpeg, when writing out the frames, in the exif, the camera model is not one of the parameters, so that's why gear360pano.cmd does a default assign (line 150). Regards, |
I have a question, please? Do you change contain of gear360video.cmd (for Gear 360 2017), please? I changed: to "set PTOTMPL=gear360video4096.pto" 2.) Frame rate and resolution for Gear 360 2017 videos: to ""%FFMPEGPATH%/ffmpeg.exe" -y -f image2 -i %OUTTEMPDIR%/%IMAGETMPLENC% -r 24 -s 4096:2048 -vcodec libx264 %OUTTEMPDIR%/%TMPVIDEO%" What not working for me is use Intel Quick Sync (in Windows 10 1709), on Skylike Intel Core i5-6200U CPU/Intel HD Graphic 520, in ffmpeg (when I changed in gear360video.cmd: from "-vcodec libx264" to "-vcodec h264_qsv"). Well, only one way is use very slow rendering via CPU, on my laptop without dedicated GPU, when ffmpeg can't make a video file from stitched images with Quick Sync Hardware Acceleration. But it is not part of this project (software). |
Otherwise I had to "repair" (add 360 metadata) created stitched videos, from Gear360Pano, via "Spatial Media" https://github.com/google/spatial-media, because Youtube and Facebook don't recognized that video files like 360 videos. |
Hi Boris, I just tried a 4096x2048 video on Gear 360 (2017) SM-R210 and was successful with gear360video.cmd. Changes to gear360video.cmd, same as you: I have no knowledge about hardware acceleration, so I cannot help you with your QuickSync and codec problem. Sorry. I also need to learn about posting to Facebook Youtube for the 360 videos. |
I see you are using video stitching script for Windows which is pretty limited (compared to Linux version). I'll spend some time to match functionality with Linux (Batch programming is a challenge). Problems you are having is from the script not recognising correct video side. BTW: @Skygaze thanks for the contribution, I'll compare this file with the existing one gear360video2560.pto to see what gives better results. |
No problem, I get a kick out of working on puzzles. It should be obvious that my change to the cmd was a hardcode that should have a if branch depending on the imagesize. I did not want to try and write that bit of code because I am not familiar with windows batch (just enough to reasonably understand). For the pto, there are a couple of control points high up that I left alone because I only had blank sky. Remember that it is possible that the hardware has slight assembly differences from one camera to the other that prevents having an absolute pto across all cameras. But as a first guess it should be very close. Thank you again for all the work you have put in so far! It certainly made my life easier. If you wish, I can look at (on the windows side) incorporating the spatial media exif writer so that when uploaded to YouTube, the browsers recognize the 360 tag. [I am away a few days so can't start until next weekend]. |
https://purplepill.io/blog/best-encoding-settings-resolution-for-4k-360-3d-vr-videos/ The recommendation was to use the following settings, and that the obvious vertical reduction has no impact, the 360 player seems to understand to play it correctly in the vertical: Here is the result: |
You can update to script files? |
Hi kszere, the owner of the script, ultramango, may be on summer holidays, so it could take a while before he responds. I hope you can wait. I might be able to help when I return from my holidays, in the middle of August. Regards, |
Hi, I remember reading this article a while ago and I had some problems with understanding it (a lot of content, very little specifics). I read it the second time now but got similar feelings. What I understood:
Note: article is from late 2015; since then hardware got more powerful. Also I recon they might care about size as they want to stream videos, this is not the priority for gear360 script (for now :) ). So far I don't see anything valuable, from that article, that I could improve in the gear360 script. Actually current quality parameter Also let's not forget that the source material from Samsung 360 camera is not of the highest quality, which then makes some high quality settings for output video coded an overkill. The only thing that I would be tempted to do is to revert the default to h264 as it is faster and size is not that important nowadays. Or perhaps add more quality options (presets). Cheers, P.S. |
Image Stitching is working fine. During executing command for video Stitching, it is failing:
Here is the command output :
~/StitchingPoC/gear360pano$ ./gear360pano.cmd 360_7690.MP4File not found: 360_7690.MP4
Processing panofile: 360_7690.MP4
Processing input images (nona)
nona: using graphics card: NVIDIA Corporation GeForce GTX 1050 Ti/PCIe/SSE2
caught exception:
Precondition violation!
Unable to open file '360_7690.MP4'.
(/build/libvigraimpex-dp3J2t/libvigraimpex-1.10.0+dfsg/src/impex/codecmanager.cxx:203)
Error while running nona
Please help.
The text was updated successfully, but these errors were encountered: