THETA V Long Video Plug-in: Recording beyond 25 minutes

Plug-in Technology Smashes Through 25 Minute Limitation

image

2k video test

Without plug-ins, the THETA V can record video for only 25 minutes.

With plug-in technology, I recorded a 4K video with 4-channel spatial audio that was longer than 48 minutes. Specifications on the main THETA V product page on the Ricoh site indicate max record time per video of 25 minutes. We can get around this limit.

My 48 minute 29 second video test resulted in a 19 GB MP4 file saved to the THETA internal storage with a resolution of 3840x1920. A companion .wav file with 4 channel audio was 1.04 GB. The plug-in will automatically stop the video when it reaches 19GB.


How to Use the Plug-in

Set Long 4K Video Plug-in to Launch

Use the official Ricoh or mobile app to set Long 4K Video to launch.

image

Put camera into plug-in mode

Press the lower mode button for 2 seconds. The white LED light on the front will turn on.

Press main shutter button

Press the main shutter button. The red record button will blink.


Transfer Large Files from Camera to Computer

If you fill up the entire 19 GB storage of your THETA V, you will see a red storage LED. In my tests, this was fine and I had no problem. The red storage LED went away after I deleted the large file from my camera.

Connect Camera to Computer with USB Cable

I’ve only tested this on Windows 10. Connect the THETA V to your computer and drag and drop the video file onto your computer.

When I started the transfer to my Windows 10 desktop, I saw some large times remaining. You can ignore this as the the time was not accurate. It takes about 5 minutes, not 1 hour 20 minutes.

Camera back to normal after I transferred the 17 to 19 GB files to my computer and deleted them from the camera.


Notes On Usage

As of September 15, 2018,

  • video will fill entire 19 GB storage of internal camera storage. To get the longest video possible, delete the existing files from your camera before starting the video recording session.
  • No metadata on video file using this plug-in. You may need to add it, depending on your use of the video. See these articles:
  • the mp4 file has single channel audio only. You can’t use the Ricoh Movie Converter
  • the .wav file has 4 channel first-order ambisonics B-format
    • you need to use adb pull to get the audio file see instructions below
  • to combine the Ambisonics audio and video, read this tutorial from Adobe on using Premiere Pro to assemble the audio and video for your immersive experience.
  • You may need to use adb to delete old audio files. See this article.

Possible changes

  • fps is 30. this is adjustable in the code
  • video encoding bit rate is 56Mbps. this is adjustable in the code
  • video is 4K. There is another plug-in that records 2K video. resolution can be changed in the code.
  • video encoder is H.264 and we cannot change it to H.265
  • video is stitched in the camera to output equirectangular. can be changed in the code to record dual-fisheye video inside the camera.

Requirements

  • RICOH THETA V in Developer Mode

    You must register your camera with the partner program to put it into developer mode. Start the process of signing up for the partner program here.

  • Firmware ver.2.40.2 and above

    Information on checking and updating the firmware is here.

  • Windows 10 Version 1709

  • macOS High Sierra ver.10.13


Test File Information

4K video

From the Ricoh site, it appears that the internal storage capacity of the camera will limit maximum video length.

image

One-Time Permissions Configuration

As this is a developer version of the plug-in, you will need to use Vysor to set the permissions. This is a one-time configuration that you need to do each time you install a new version of the plug-in.

In Vysor, go to settings

Select Apps

Select Long 4K Video

Select Permissions

Enable Permissions to Camera Features

How to Install the Plug-in

If you’re a developer and are part of the partner program, you can go to the next section and install the plug-in from the GitHub repository.

If you’re not ready to compile the source code with Android Studio, @jcasman will work out a way to help you. Drop us a note below and he’ll contact you.

You’ll need to:

  1. sign up for the partner program. It’s free.
  2. get the plug-in from @jcasman by posting a note at the end of this article. Something like, “send me the long-duration plug-in for testing”
  3. install a few basic tools, adb and Vysor
  4. install the camera plug-in from the command line
  5. set the default plug-in using the Ricoh desktop or mobile app
  6. use Vysor to set plug-in permissions

It’s a long set of steps, so we’d like to help. You can also send @jcasman a DM.

Transfer Spatial Audio File to Your Computer

image

In the example above, the mp4 video file is called plugin_20180915114136.mp4

The audio file name is plugin_20180915114136.wav. The only difference is the .wav extension.

Transfer the audio file to your computer with

adb pull /sdcard/DCIM/plugin_20180915114136.wav

You now have both the audio and video files.

image

You’ll need to use a tool like Premiere Pro to assemble the files.

Delete the audio file from your camera.

adb shell rm /sdcard/DCIM/plugin_20180915114136.wav

Long 2K Video Plug-in

The Long 2K Video plug-in operates the same except for these differences:

  • video is in 2K
  • audio is embedded into the mp4 file
  • video length is longer

Selection

The plug-in name is Long 2K Video

image


Developer Information: THETA CameraAPI Capture Plugin

Plug-in specifications

  • Captures still and video by using Camera API, AudioManager API and PluginLibrary for RICOH THETA V.
  • After capturing still or video, the JPEG or MP4+WAV file is stored in /sdcard/DCIM/ folder.
  • The stored file name is “yyyyMMddHHmmss”.jpg (.mp4 or .wav for video). “yyyyMMddHHmmss” is 20180123123456 when it is 12:34:56 Jan 23, 2018.
  • WebAPI can not be used when Camera API is used.
  • The .wav file includes 4ch spatial audio as a first-order ambisonics B-format.
  • The .mp4 file includes 4K video and 1ch monaural audio.
  • The metadata of the files (.mp4 and .jpg) which outputted by using CameraAPI will be missed than the case of using WebAPI. (We recommend to use WebAPI instead of CameraAPI.)

Check Back Soon for Updates

@jcasman can send you three apks, one for 4K long-duration video, tested for 45 minute continuous shoot, one for 2K long-duration video, tested for 84 minutes of continuous shooting, and one for surveillance or monitoring which can take 4 hours+ of video. The code we’re using for the plug-in used in this tutorial is different from the Ricoh repository and is available on GitHub

Post-Production Workflow Information


Surveillance Mode

I am still experimenting with different bitrate and framerates. Check back for progress in the future. Current tests can record 19 hours 55 minutes of 2K surveillance video at 10fps. I’ll post a short test clip soon so people can see the quality.

2 Likes

I worked with the Long 4K Video plug-in over the weekend. I like it a lot, it’s quite easy to install and use.

I did several short tests starting and stopping the video. And I’ve done one longer test - 30 minutes and 7 seconds which made a 11.8GB file on my THETA - and I intend to be testing more soon.

That’s 10 times longer than any THETA video I’ve done before, so it was a pretty cool result already!

size

I intend to be doing more testing. But here’s a couple important things I noticed so far:

  • Don’t forget to set permissions for the newly installed apk using Vysor. If you don’t, when you go into Plug-in Mode (white LED) it will triple beep and flash a red LED as if the plug-in is crashing.

  • In the “Transfer Spatial Audio File to Your Computer” section, please note the location of the file

/sdcard/DCIM/plugin_20180915114136.wav

If you’re in adb shell, it will look slightly different:

/DCIM/0/DCIM/plugin_20180915114136.wav

I don’t know understand the discrepancy. But the information here in this post by @codetricity is correct.

  • For me, connecting with the THETA and managing the longer video files - moving them over to my PC, copying from or deleting on my THETA - in my experience takes a little bit of effort. The section in this post called “Transfer Large Files from Camera to Computer” has good details and shouldn’t be skipped over.

  • I did all my testing on a Windows machine. When you connect to your THETA, you can get better information then when you’re on a Mac on things like THETA battery level, firmware version, and lots more. I’m basically a Mac guy, but in this case Windows appears to have quite a few advantages.

test

1 Like

Did you log in with adb shell and then do cd /sdcard/DCIM/? The prompt on my camera is /sdcard/DCIM/…

image

image

what happens when you do

  adb shell
  cd /sdcard/DCIM/
  pwd

sdcard is a symbolic link, but I believe it functions on camera.

Still testing this. The plug-in is stable and I still like the the ability to do longer videos.

But I’d like to post one issue that I’m having that might be common. If you overdo it, and fill the memory of the THETA, I can’t seem to get the video off the camera.

Here I’ve recorded a video for about 50 minutes and the .mp4 video file appears to be over the amount available in memory: 20402573030 bytes or over 20GB. Note there are 2 files, a .mp4 and a .wav.

And then below in the next screenshot is the I/O error I get when trying to do an adb pull to get the files off the camera.

Trying to use Windows programs (File Explorer or Movies & TV) which work for smaller videos files also fails.

I’ve done a df to show the amount of available disk space as well.

I believe this is due to the combined filed being over 19GB. The plug-in will stop after the video file reaches 19GB. Due to the size of the WAV file, it is exceeding the capacity. I think an easy fix will be to set the max video size to 18GB instead of 19GB and see if it fits on the camera.

In addition, I have a version that saves the video into HEVC format, which has better compression than H.264.

You screenshot is helpful because I can see the max size of the WAV file.

I’m going to make the two changes above, both for the encoding and the max file size, then I’ll run another test.

Update October 4, 2018 - Test 1

Camera overheated after 18 minutes of HEVC recording to file.

Note: camera was lying down on my desk for the test and resting on the foam case with zero airflow. I am going to redo the test with the camera in a tripod and provide some airflow to the camera.

Reading this article

It looks like HEVC is putting much higher load on the camera MCU.

Higher efficiency usually comes with a cost: complexity. H.265 is far more difficult to encode as a result of its complexity, and can require up to 10 times the compute power to encode at the same speed as H.264.

I also changed the icon as well as the application name and package name. When you set the permissions, look for the application below.

image

1 Like

I tied the record! I guess without changing any settings, 48 minutes and 29 seconds is the longest video you can record.

And here’s the completed adb pull with no I/O error.

Didn’t break the record but it’s progress for me!

How did you get the exact same video length that I did?

Did the file just fill up the 19GB of storage and then stop? If so, why were you having a problem before?

I wasn’t able to get a longer video with HEVC in my first test. This leads me to think that something is wrong. Maybe it’s not actually saving it as HEVC? How would it be possible for the file to say that it is HEVC, but not actually be HEVC?

I’m going to try and record with single channel audio only. If I don’t save the spatial audio WAV file to the camera, I should be able to get a longer recording.

Update

  • did not extend time beyond 48 minute 29 seconds. Leads me to believe that it is not actually using HEVC compression
  • the plug-in automatically stops when the file size reaches 19GB
  • I’m not have any problems transferring the files to Windows 10. If you’re having problems, maybe try a different USB cable?

With a shorter test clip, I compared the file size of HEVC and H.264. Though the encoding is different, the file size is roughly the same.

image

It’s not clear to me how this is possible. I would expect the H.265 file to be smaller than the H.264.

I’m going to do another test to see if reducing the bitrate and thus file size will negatively impact video quality. There’s another article that shows that H.265 requires less bandwidth HEVC (H.265) vs. AVC (H.264): What’s the Difference?


Update 2018 - Oct - 4 - night

I was able to get longer videos stored internal to the camera without a loss in video quality.

Sample Frame Grabs

Framerate and resolution are identical to default camera app. No noticeable artifacts.

zoom of objects in motion

The following are zoomed in portions of the equirectangular image. Object is a wooden ball moving quickly.

image

Other Notes on Test

  • household fan was blowing on camera during the test. have not tested for temperature range. Without the fan, the camera felt hot to the touch
  • this test does not save the spatial audio file in order to maximize space for the video. Single channel AAC is embedded into the MP4. Audio works as expected. Spatial audio is possible, but will shorten maximum video time
  • camera was powered by USB phone charger. I have not tested it with the battery only
  • video file is HEVC and is viewable on Windows 10 1809
  • File did not display properly in VLC 3.0.4
  • worked fine in CyberLink PowerDirector 17

Update: Nov 6, 2018

After discussions with @jcasman about VP9, I looked into support for that video encoding standard. Unfortunately, it doesn’t appear to be supported by the Android MediaRecorder.VideoEncoder.

It looks like the best we can do is use HEVC

I’m in the process of submitting the long video plug-in to the THETA plug-in store. The process may take a while. I’ll share the apk I submitted here.

long-video-hevc.apk (2.0 MB)

With your camera in developer mode, follow these steps for installation:

  1. install plug-in with adb
  2. set permissions with Vysor
  3. use the THETA Desktop app to set the default plug-in to “Long 4K Video”

I’m also working on end-user documentation.

Long Video HEVC Plug-in for RICOH THETA

Records 4K video with a maximum length of 1 hour 24 minutes. It overcomes the 25 minute video limitation of the standard THETA V.

Benefits

  • 336% increase in length of video saved to camera - increased time from 25 minutes to 84 minutes
  • 40% reduction in file size - save more videos of shorter length
  • 40% faster uploads to YouTube and Facebook

Technical Features

  • overcomes 25 minute limit imposed by standard THETA V firmware
  • Uses close to full internal storage of THETA V. Set to limit at 19GB per video file.
  • Uses HEVC, not the default H.264 for video compression
  • Reduces bitrate encoding to 32Mbps from 56Mbps, but retains most of the video quality
  • Strips out spatial audio file to save on storage space (can be easily added back into code)

Limitations

  • No spatial audio. The code can be modified to save a 4ch spatial audio .wav file with first-order ambisonics B-format. The spatial audio file is not saved by default to avoid people having to delete the file.
  • Heat. I have not tested this fully, but the camera does seem to get hotter. You may need to blow a fan on the outside of the camera body. Or, use it in the winter only. :wink:
  • Not all video players support HEVC. This is a new compression standard and a new frontier.
  • metadata is stripped out of the file. You may need to inject the metadata using a tool after your shoot. Instructions are below.

To view the video on Windows 10 Movies and TV Player, you must add HEVC support to the player.

Windows 10 Movie and TV Player

Both Premiere Pro and CyberLink PowerDirector 17 can handle HEVC.

long video info

Usage

  1. put camera into plug-in mode
  2. take video
  3. stop plug-in by pressing lower mode button
  4. turn camera off by pressing the power button for 8 seconds
  5. turn camera back on and plug into your computer with a USB cable
  6. look for the file in /RICOH THETA V/Fixed Storage/DCIM/100RICOH

video file on theta

Post Production

Spatial Media Metadata Injector

You may need to inject the metadata into the video file with Spatial Media Metadata Injector.

Install the binary file with the link above. Pre-built applications are available for Mac and Windows.

spatial media icon

Open the file.

metadata injector

Save the file with metadata injected with a new filename. Use the new video file with injected metadata in your applications and on YouTube/Facebook.

metadata injected

Editing Videos

Both Premiere Pro and PowerDirector support HEVC 360° video editing.

Premiere Pro

premiere pro

CyberLink PowerDirector 17

CyberLink

You do not need to export to H.265 HEVC. You can export with any encoding. However, if you want to keep the encoding the same, CyberLink does support HEVC format output, which will give you a smaller file size than H.264.

CyberLink Export

Sharing HEVC-encoded 360° Videos on Social Media

After injecting the metadata, you can upload the HEVC file directly to YouTube and YouTube. With the metadata, it will automatically be detected as a 360° video.

YouTube

YouTube Upload

Facebook

Facebook


1 Like

I really need to get also the spatial audio Ambix WAV file. Any chance you post here the APK with that feature enabled?
Thanks!

Thank you for your feedback and all your contributions. I think this is no problem. I have a few questions:

  • The .wav file includes 4ch spatial audio as a first-order ambisonics B-format. Is that the same as Ambix? If that format works, you will need to combine it with the MP4 yourself with third-party software, which I think you have.
  • Do you want 4K video or 2K?
  • Do you want HEVC codec or H.264? Or both? (no problem, but it will be in separate plug-ins as it would take more time to set up some type of interface to change the settings). The max time with H.264 is 48 minutes unless I lower the bitrate encoding and possibly compromise resolution, though I haven’t tested the impact.

Also, happy holidays. I’m taking some vacation time and it may take a bit of time get things configured.

Thanks so much for your plugin!
Regarding your questions:

  1. There are two formats for Ambisonics B-format 1st order (4 channels), named FuMa (Furse-Malham) and Ambix. They differ for channel order and amplitude scaling. FuMa is older. The channel order was WXYZ, and the amplitude of W(omni) was reduced by 3 dB in comparison of the amplitudes of the three figure-of-8 channels XYZ.
    Ambix is the newer Ambisonics format, supported by Youtube, Facebook and Vimeo. The channel order is now WYZX, and the gain is the same for all channels.
    So currently better to save Ambix, FuMa is deprecated.
    But the best is always to save A-format, if possible. That means saving the 4 raw signals from the capsules. Doing that requires a further step of conversion between A-format to B-format, which is usually done on the PC, using a DAW and a special plugin sucha as X-volver: http://www.angelofarina.it/Public/B-format/A2B-conversion/A2B-Xvolver.htm
    So please, save Ambix or A-fornat.

  2. I need 4k for optimal video quality on HMDs such as the Oculus Go. And no problem remuxing audio and video, the Facebook Spatial Workstation contains a nice encoder for this…

  3. Of course better to save in HEVC (H265), for better quality/size ratio. H265 is fine on the Oculus Go…

Thanks
Bye, and Merry Christmas to everyone!

Angelo Farina

1 Like

Dear Codetricity,
tested right now your plug-ins (classic and high compression) and both work well.

I was wondering if now the multi-channel file containing spatial audio is stored or not, as in one of the previous versions (adb pull … procedure to copy it).
If not, may I ask if it is possible for you to provide me two customized versions of both plug-ins, with the spatial audio storing enabled ?
In both cases, the A-format would be perfect, but B-format works anyway. And the .mp4 file could be mute, to save same more space. The adb procedure is fine to retrieve the .wav file.

Thanks and regards,
Daniel Pinardi

2 Likes

Hi!
I dont now what i do wrong but i try to use the High Compression plug-in to record over 1 hour.
I opens the android app and connects to my Theta V over wi-fi. Goes to Settings and plug-in. I select “Long video high compression” and the push “Start plug-in” in the app. The Wi-fi on the Theta disables so the connection to the phone brokes. On the Theta the led is now solid white. I push the mode button so the camera icon is visible and then i starts the record by push the shoot-button on the Theta V.
30 minutes later when i check the Theta it has turned off by it self, the power cable has always been in the camera. When i put the Theta to my computer and check the video length, it is 22 min.
Am i doing some thing wrong?





/Emil

Hello, @jcasman I need the 2k long-duration plug-in for testing.

How can I get it?

Regards

1 Like

This is awesome thank you! I use GoPro a ton and their video is continuous but they break their videos into 5 minute lengths but the video doesn’t’ stop it just automatically creates another .mp4 file… maybe this would work for Theta

1 Like

Hello @jcasman, I would like to experiment with the 2k and 4k long recording plug-ins for multi hour research set ups, could you send them to me?

Cheers!

@Matzebob Somehow I missed your post, very sorry! Both repos are available publicly now, so it’s easy to get them, install them, and try them out.

For 4K, here’s the original repo: GitHub - theta360developers/4k-long-video: Take RICOH THETA V 4K videos with HEVC encoding. Max video of 1 hr 25 minutes.

I’m noticing the README says it’s available in the THETA Plug-in Store but I get a 404 error when I click on the link. This plug-in is in the THETA Plug-in Store, it’s called Long Video Classic and I believe that it uses standard H.264 compression and standard video bitrate. Long Video Classic | RICOH THETA Plug-in Store

For 2K, here’s the original repo: GitHub - theta360developers/long-2k-video: ricoh theta plug-in to record long 2k video

Hope this helps! If you do end up testing, please let me know how it goes. What model THETA will you be using?

Hello, above, I found the 4k .sdk file and was able to install. However, I only found the GitHub link for the 2k. I do not know how to make this a .sdk and therefore can not install 2k. Could you please make available the 2k .sdk file too. Thanks so much.

Jesse

@JesseFirebrand I believe there is no active development on this plug-in. Whatever you find in the repo is what is available.

It looks like I recorded an 11 hour video inside the V at 2K resolution and 10fps in the past.

1 Like