-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom string with the api #20
Comments
From reading the forum, it looks like you're using the WebAPI from inside the plugin. This is what is in the forum
|
@iFieldSmart-Tech @codetricity I am sorry for our late checking for your issue. I read the post too, and we need to say that Theta X plugin does not support WebAPI to start/stop video recording. I am sorry that this spec difference between Theta Z1 and X is came from the difference of plugin architecture. If you want to do video recording in plugin, using the Camera API is strongly recommended. This repository is showing how to use Camera API to execute take picture and start/stop video recording. Best regards, |
@DaisukeHohjoh oh, this is interesting information. I tried for many days to use Flutter with the webAPI to start/stop the video inside the plugin. I had assumed it was a limitation of the Flutter architecture. Do you know of other restrictions with the webAPI used in the THETA X plugin? https://github.com/ricohapi/theta-api-specs/blob/main/ricoh-theta-plugin/web-api.md Is there an example of how @iFieldSmart-Tech can get the file location of the video file using the camera api and then feed that into another method to process the file (such as append metadata to the notes field). Maybe this needs to be set? theta-plugin-camera-api-sample-x/app/src/main/java/com/theta360/sample/camera/MainActivity.kt Line 52 in 5115c7f
There's an example here that may be related to getting the file path? |
Mainly video recording feature / video related Options are unavailable for Theta X. As you said, RIcoh need to add description about this limitation to https://github.com/ricohapi/theta-api-specs/blob/main/ricoh-theta-plugin/web-api.md . If plugin use Camera API / MediaRecorder API to do video recording, you need to specify the file name yourself. theta-plugin-camera-api-sample-x/app/src/main/java/com/theta360/sample/camera/MainActivity.kt Line 469 in 5115c7f
I am sorry for NOT my sharing this information in public. Best regards, |
So using camera api is suggested, but the main reason for using the web api is to send a string with the plugin's webapi which needs to be inserted in the output video's exif data. We cannot do it with the camera api, right? In order to send a string along with the api, we have no choice but to use a web api that triggers the camera api, right? Or is there any other way to achieve our use case? The end goal is just to pass a string along with the video recording start api. This api will be called from our mobile app and the plugin will in turn start the recording and update the video exif data once the file is ready. |
@iFieldSmart-Tech when you setOutputFile(mFilepath), you know where the video file is going to be. If you search on google, there seems to be many solutions to read/write metadata of the mp4 container. i have not tried any. However, this one looks like it can do it. https://github.com/sannies/mp4parser |
@DaisukeHohjoh If i try another way; is it possible to fetch the video metadata without having to use a plugin in between? Is it possible using only the camera and its api? |
Theta Plugin Library maybe able to do it but I think I need to understand correctly your requirement. I read this post and my understanding and questions are following.
My question #1 : What kind of Exif metadata do you need ? My question #2 : Based on this your comment, you hope to insert? add? overwrite? some kind of information to Exif in captured photo / video, correct ? Can you tell more detail about this requirement ? For example,
Best regards, |
@DaisukeHohjoh As we were failing at inserting the data for video files we thought as a workaround maybe we try reading all the exif data and save the whole data in our db which can later be used for mapping. But regardless, yesterday we were able to get it to work without the plugin. We can get list of files directly using the camera api, so we decided to ditch the plugin for videos. We are now using the camera api to start and stop recording and then get the filename once the recording stops and the file is created. We will rely on the filename for the mapping. |
@iFieldSmart-Tech So.. does following my understanding match your direction ?
This is just for your information, if you develop plugin to capture photo and/or video with using Camera API, you can insert
With this setting, photo and/or video will have Best regards, |
Thank you for the detailed explanation. However, we went ahead and did it without the plugin and using only the camera api. We use to camera api to start and stop capture, then stop capture returns the filename, we save that filename and the timestamp to our database. When user uploads the file later, we use the filename and the exif data timestamp to map the two. This still leaves an issue where in case if the user changed the filename before uploading the video, but for now, we need to live with that issue and request the user to not change the file names. |
@DaisukeHohjoh I needed help with something else too. The ricoh desktop app has the option to perform stitching as well as top bottom correction on videos. We figured out the stitching part but not sure how to do the topbottom correction at our end. Is there any api that can do that? It does not have to be done on the camera, we can do it on our server after the user uploads the video. But is there any way to programmatically figure out which video needs correction and how to do it? |
I understood your direction. Thank you.
Theta X Theta Z1
Yes MP4 file has such Ricoh specified metadata but it is not disclosed now. If you need such information, I think Ricoh can discuss about it. Best regards, |
Our use case is we have a plugin that acts as a bridge for communication between our mobile app and the camera. For images, we call the plugin's api which has a parameter that accepts a string, the plugin calls the camera's api to take picture and once done, update the resulting image's exif data with the string received with the api. We tried the same with the video, but after the camera's stop recording api is called, it exits, we do not receive any response from the camera. The recording stops, but we do not get to update the video's exif data with the string received in the plugin's api. We also tried adding a 15-20 seconds wait, but even after waiting it does nothing, the code exits, no breakpoints are hit.
Can you please help us with understanding what we are doing wrong?
or any other way to pass a custom string with the start or stop recording api calls?
The text was updated successfully, but these errors were encountered: