Sunday, January 15, 2023

Sharing 360° video?

So, you've got a 360 degree video file from your GoPro. What to do with it?
Well, share it on YouTube.

YouTube supports uploading and playback of 180° or 360° spherical videos on computers in Chrome, Firefox, MS Edge, and Opera browsers. You can also watch 180° and 360° videos on YouTube app or on the YouTube VR app available on most VR headsets.

The following guide works for MacOS.

Step 1a. Using the GoPro Player, Export the .360 file to .mov - this step utilises GoPro's World Lock & horizon Level & Mount Optimisation stabilisation processor. Settings in the screenshot below.
Optional Step 1b. If you have a sequence of .mov files use QuickTime to join them into one (file names number in order sequence - e.g. 01.mov, 02.mov, 03.mov) by opening the first .mov in QuickTime then dragging the remaining files onto the open QuickTime window, which then shows them in sequence and offers to join/merge them by clicking "done"), then export it to a new file .mov at 4k H.264.


Step 2. Using Handbrake export to mp4 format (do this to generate a much smaller file).

Step 3. Create a 360 degree aware version of the mp4 file via the Spatial Media Metadata Injector. This generates a file that contains 360 degree metadata so that it can be played in immersive mode by video players that support 360 degree viewing.

Step 4. Publish as normal via YouTube.

Notes:

Google's instructions here.
https://support.google.com/youtube/answer/6178631?hl=en

I followed migiguser's very good step through here.
https://www.youtube.com/watch?v=vQI3gxC9Ykc

You can find Handbrake here.
https://handbrake.fr

The Spatial Media Metadata Injector can be found on Github here.
https://github.com/google/spatial-media/releases/tag/v2.0

Sample video of a training row with OCBC on Sun 15 Jan 2023 - the second upstream run. 
https://youtu.be/8E6TcQLYxpQ

This is a 360° video. Open the ink using a PC with one of the following web browsers: Chrome, Firefox, MS Edge, or Opera. You can also watch 180° and 360° videos on the YouTube app or on the YouTube VR app available on most VR headsets.

Even if just using a web browser (see above) you should be able to pan around the scene (i.e. see stuff that is off-screen and different points of view by using the pan button in the top left of the viewer. You should be able to rotate the view the WASD keys. You can also swipe through a video by clicking and dragging through the space.

Tuesday, January 10, 2023

Text trimming in Excel

For example, to extract text to the right of the first space character (" ") in a cell containing "first-name second-name".

 =RIGHT(B2, (LEN(B2) - FIND(" ", B2)))

Monday, January 9, 2023

Homebrew setup

Before you run Homebrew you need to install the MacOS Command Line Tools that come in Xcode. To do this, open the App Store, search for and install Xcode. This can take upwards of 30' or more.

The Homebrew web site has further information.

 https://brew.sh/

To install Homebrew from the command prompt (e.g. Terminal) - you will need sudo permission.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

The install script will take 10' or so to download packages, install and configure.

You may need to run the echo commands to add brew to the PATH environment variable. The command looks something like...

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/name/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"


For previous versions it looked like...

echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/name/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/name/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

homebrew rename

To remove first 5 characters from bunch of file names...

From a terminal 

brew install rename

You can use the following command when you are in the folder where you want to make the renaming:

rename -n -v  's/^(.{5})//' *

-n is for no action and -v to show what will be the changes. If you are satisfied with the results you can remove both of them, e.g.

rename 's/^(.{5})//' *

To remove the first 14 characters including spaces of the names of files/folders in the current folder...

rename -n -v  's/^(.{14})//' *

(credit: armtatoo on https://stackoverflow.com)

Sharing 360° video?

So, you've got a 360 degree video file from your GoPro. What to do with it? Well, share it on YouTube. YouTube supports uploading and pl...