Giter VIP home page Giter VIP logo

pstoll / insta360-auto-converter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whmou/insta360-auto-converter

0.0 0.0 0.0 4.94 MB

Automatically take insv(p) files from google drive and convert them to 360 mp4(jpg) and upload to google photos in docker

License: Creative Commons Zero v1.0 Universal

Python 1.76% Perl 7.95% CSS 0.04% HTML 90.06% PostScript 0.16% Dockerfile 0.02% Rich Text Format 0.01%

insta360-auto-converter's Introduction

insta360-auto-converter

Automatically take insv (insp) files from google drive and convert them to 360 mp4 (jpg) and upload to google photos

image

Why this project?

I have a insta360 one X, and I record with it very often, I got full 128GB insv (insp) files almost every trip.

Pain points:

  1. To convert 128GB files to mp4 means I need ~128x2 = 256GB free on my mac which is sometimes too much.
  2. Using the official 360Studio software to convert them will cost high CPU usage, almost can't do other things.
  3. I'll have to upload them to google photos to enjoy the 360 experience in cardboard or on my phone/mac, but using the google photos web UI is a terrible experience.

Prerequisite:

  1. You know what python3 and docker are and how to run them.
  2. You have enough space for your google drive and photos (Gsuite for biz for education).
  3. You have a cloud linux machine which can run docker (or a spare mac to run it 24/7), ex: AWS EC2, Google cloud instance...

Getting Start:

  • Clone this project to your instance that runs the docker or (download the zip)

  • Due to security and NDA issues, you have 4 sub tasks to do which might take a while, but if those pain points can be eliminated, I think it's worth it.

  1. Follow the guide to get insta360 Media SDK (link)
  2. Follow the guide to get your own Google Drive service account credential. (link)
  3. Follow the guide to get your own Google photos OAtuh credential. (link)
  4. Follow the guide to setup the config files (link)

Put it all together

  1. Check if you are ready to build the docker image

    • MediaSDK folder is in this project folder insta360-auto-converter
    insta360-auto-converter
    ├── Dockerfile
    ├── MediaSDK
    └── apps
    
    • You followed the guide above and have the metadata folder somewhere else, ex: /Users/wmou/Documents/insta360-auto-converter-data, please keep in mind that files in this folder are confidential to you, DO NOT SHARE WITH OTHERS!
    insta360-auto-converter-data
    ├── auto-conversion.json 
    ├── configs.txt 
    └── gphotos_auth.json 
    
  2. Build the docker image under the folder which contains the Dockerfile, the last "." is required.

$ sudo docker build -t insta360-auto-converter .
  1. run the docker image as container please note that the folder you mount with -v should be your own metadata folder.
$ sudo docker run -d -v /Users/wmou/Documents/insta360-auto-converter-data:/insta360-auto-converter-data insta360-auto-converter

Where/How do I put insv (insp) files on the Google Drive?

  1. In the google drive setup sub task, you should have a working folder, then upload a folder under that working folder, which contains your insv (insp) files.
  2. Then this auto-converter will automatically upload the mp4 (jpg) to the Album of your google photos as the same name as the subfolder you uploaded.
  3. for example, "inst360_autoflow" is my working folder, then sub folder will be “測試1_360raw", and contains with many insv, insp files.

image

Multi-process

  • You can run multiple docker containers on different instance for the same google account, there's a task management based on flag-files on google drive, so N docker containers are less likely getting the same insta file to work. (There's still a chance but only wasting some computing power for the cheap task management implementation.)

Bug fix release notes:

  • Nov. 25, 2020
    • fix on stall of video conversion, some error handling added
    • using resumable upload to google photos, >2GB files now supported

Limitations:

  1. HDR photos can not be merged in the MediaSDK until they support it, so some of photos will not be stabilized.

insta360-auto-converter's People

Contributors

whmou avatar kissofjudase23 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.