Open3d: Cannot read mkvs from kinect

Created on 4 Dec 2019  路  19Comments  路  Source: intel-isl/Open3D

Using the python example azure_kinect_recorder.py, I recorded an MKV file with an Azure Kinect. When attempting to read the resulting mkv file with azure_kinect_mkv_reader, every attempt to get a capture results in an error, and the mkv file does not play.

Steps to reproduce the behavior:

  1. cd .\Open3D\examples\Python\ReconstructionSystem\sensors
  2. python -m azure_kinect_recorder
  3. [Record mkv file with or without moving the camera]
  4. python -m azure_kinect_mkv_reader --input [mkv file name]

every single frame yields the following errors:

[2019-12-04 13:21:39.306] [error] [t=30256] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (344): Invalid argument to capture_get_color_image(). capture_handle (000001E0AFE8E650) is not a valid handle of type k4a_capture_t

[2019-12-04 13:21:39.306] [error] [t=30256] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 000001E0AFE8E650

[2019-12-04 13:21:39.306] [error] [t=30256] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (359): Invalid argument to capture_get_depth_image(). capture_handle (000001E0AFE8E650) is not a valid handle of type k4a_capture_t

[2019-12-04 13:21:39.306] [error] [t=30256] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 000001E0AFE8E650

[2019-12-04 13:21:39.306] [error] [t=30256] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (295): Invalid argument to capture_dec_ref(). capture_handle (000001E0AFE8E650) is not a valid handle of type k4a_capture_t

....(on and on for every capture)

Environment

  • OS: Windows 10.0, Build 17134
  • Python version: 3.6.8
  • Open3D version: 0.8.0.0
  • Is this remote workstation?: no
  • How did you install Open3D?: pip (I've also built from source to try to debug the c++ version, but the same error occurs)

It feels like this is something to do with the azure SDK, I've got v1.2.0 installed. I've tried reading mkvs that made with the kinect recorder supplied by microsoft but I get the same result.

possible bug sensors

Most helpful comment

experiencing the same issue

All 19 comments

stepping through the c++ version, it looks like the calls to k4a_plugin::k4a_capture_get_color_image in the AzureKinectSensor::DecompressCapture function are returning null. I think this is because they are being fed an invalid capture value, but I can't quite be sure. The result value when retrieving the capture says the retrieval succeeded and the capture appears to be set to a new, unique value.

experiencing the same issue

English sentences may be wrong, but please forgive.
I was suffering from the same problem.
Although it is not a beginner and I do not understand well, it is not a smart way, but I was able to output when started with spyder as follows.
Line 99: # required = True,
Line 105: args.input = 'filename.mkv'
Line 109: args.output = 'frames'

As a related trouble, when launching azure_kinect_recorder.py at the Anaconda prompt, it was not recognized even if --config and --output were specified.
This was also addressed by entering --config and --output in spyder.

I'm getting the same error with windows 10, Kinect SDK 1.2.0. Recorded an mkv with SDK k4arecorder.exe through command line, and am trying to read that mkv in python 3.6.8 by: python azure_kinect_mkv_reader.py --input path/filename.mkv --output path/output. Path/output is successfully created, but there is nothing In it and I get the error described in the original post. No trouble viewing the mkv in a media viewer.

The workaround suggested by @AOSZZ had no effect. Although it was for a different problem, I also tried the workaround suggested here by @theNded which also had no effect.

I also have windows 10, Kinect SDK 1.2.0.
It seems that the substitution values of "args.input" and "args.output" were not recognized, so I gave up running on the command line, entered the code directly, and ran the code with spyder, but it was output , Sometimes it works and sometimes it doesn't.
However, I have not been able to sort out what went well.
I will reply if it becomes clear.

I have tried reading in my mkv video with the official Kinect video reader example (which just prints out the timestamp of each frame) and it worked perfectly - indicating that my video file is fine (no invalid captures) and this is certainly an error in open3d's process.

Same issue here!

I also have this issue

There have been some successes in the past, but not recently.
If that doesn't work, the while statement is continued because nothing is written to rgbd with "rgbd = self.reader.next_frame ()".
Only the first color was generated, and an error occurred when generating depth, but the following error occurred.
`` TypeError: update_geometry (): incompatible function arguments.The following argument types are supported:

  1. (self: open3d.open3d.visualization.Visualizer)-> bool "

The issue with update_geometry() probably is a different one. This is due to the change in update_geometry() function which requires explicitly the geometries to be updated to be passed as it's argument, I think after version 0.9.0.

@yxlao could you please comment on this and take note of the problem?

I have the same problem on windows 10 too.
But it works with ubuntu. same code but doesn't work on windows.

Any update on this for windows? Same issue on v0.10.0 as well.

I also have this issue

@Masterpoda Having the same issue,is it solved?

Same issue here also...

Same issue as well! On Windows 10 version

Same issue on Windows 10 as well

Hi, experiencing the same issue
using windows 10, python 3.7, sdk 1.4.1 (tried 1.2.0 as well) and open3d 0.12.0 (tried 0.8.0 and 0.10.0 as well)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

taochenshh picture taochenshh  路  3Comments

hzxie picture hzxie  路  4Comments

mike239x picture mike239x  路  4Comments

samarth-robo picture samarth-robo  路  3Comments

lordlycastle picture lordlycastle  路  3Comments