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


#1

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.


SOLVED - Save THETA V Video For Longer than 25 Minutes
Sample Code for RICOH THETA Stitching Available in AMD's Advanced Media Framework (AMF)
#2

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


#3

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.


#4

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.


#5

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


#6

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!


#7

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 https://www.boxcast.com/blog/hevc-h.265-vs.-h.264-avc-whats-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.

https://developer.android.com/reference/android/media/MediaRecorder.VideoEncoder

It looks like the best we can do is use HEVC


#8

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



THETA V Low Bitrate Video
Using Sony MESH IoT Plug-in with RICOH THETA V
Vegas Pro 15 on Sale for $25 at Humble Bundle