I am attempting to add a mp4 video to an Oriented Imagery Catalog (v2.7) in Pro (2.8.3) using an external csv table for metadata. This is mostly blank other than these key fields.
Is this even possible or do I need the image analyst extension and then follow the Full Motion Video (FMV)/multiplex documentation?
I'm following the OrientedImageryCatalogManagement_UserGuide.pdf but there is very little info about how to do what I am trying to do.
Note: I am currently getting this error: Log attached, Metadata File attached.
Error in processing images. name 'log' is not defined
note: i've been able to add images OK.
Looking at your .CSV there is not enough infomation in the columns to proces the video. My understanding is that all columns need to be populated as in my example from PH4
what is PH4?
There is an example from a Garmin Virb here. Are you thinking that data from a Virb has all that metadata?
I guess I'm not sure if it's possible to load Video from a consumer grade camera (GoPro + GPX string) into an OIC or if you HAVE to have other metadata from your sensor.
I wonder if you can just fudge all those values if they haven't been captured from your device?
First of all apologies for the late reply. But the issue you are facing has been fixed. I had a look at the csv file you have given... and you need to have values in those empty columns.
PlatformHeading is used to for the heading of the camera. (If there is a gimbal mount you would also have a value for SensorRelativeAzimuth. But since you dont, you can just remove this column.
PlatformRoll along with SensorRelativeRoll (if gimbal mounted) is used to calculate the Roll.
You seem to have a Pitch value. SensorRelativeElevation (if gimbal mounted) is also used to calulate the Pitch.
HorizontalFOV and VerticalFOV is used to calculate the coverage area of the video.
These values are required. Normally we would allow you to use default values but because of the complexity of the requirements it was skipped for this initial version. So my suggestion is that you will the default values in the empty fields in your CSV and run it with the updated code.
The updated code can be found in Github. If you are not familiar with github follow these steps,
2. Download the repository. See screen below. highlighted in yellow.
3. from downloaded zip Extract GeospatialVideo.py & GeospatialVideo.oitype files
4. Copy extracted files to c:\Image_Mgmt_Workflows\OrientedImagery\Types folder.
5. If you have Pro open.. Make sure to close it before using the updated oitype.
Let me know how it goes.
Thanks @RandallRebello . I put some dummy values in the csv and it now doesn't have that log error.
However it is only creating one Exposure Point. My csv has 135 rows and spans 12 minutes. I've tried Imagerytype=GeospatialVideo_Defaults (not mentioned in documentation) and also Imagerytype=Terrestrial Video.
python command line copy for reference
arcpy.ManageOrientedImagery.AddImagesToOrientedImagery("OIC_5", "GeospatialVideo", None, None, '', "https://elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer", "None", r"'Metadata File' D:\SANDBOX\vidsample\TrainFilm2\oic_ready_table_from_gpx.csv;'Video File' D:\SANDBOX\vidsample\vid\tc.mp4;'Frames Step (In Seconds)' 2", "Terrestrial Video", "Video", "0", "90", "0", "0", '', "1.8", "2", "30", "50", "0")
Just putting dummy values will not work. Each record in the input file should correspond to a location of where the camera is and at what time in the video. Ideally the metadata file will have a record for each frame or frame interval, which has the X and Y coordinates, the camera heading, pitch, roll, and the unixtimestamp. The unixtimestamp helps when adding it to the OIC (It reads the time stamp, and based on the input interval figures out which record has to go into the OIC.) This data would not be so easy to fake.
I would like to help you out, so if you can give me a better understanding of the source of this video file. What software you use to capture/process it. That would help. I can get one of my colleagues who is more proficient in drone imagery to help you out.
Try setting the 'Frames Step (In Seconds)' to 0. I had the same problem where only one Exposure Point was being created when I tried both 1 and 2 seconds. Then when I tried 0 seconds, all the Exposure Point's were present.
I am using the OIC in ArcGIS Pro though, not ArcPy.
Yes this is part of my question. Can I achieve an OIC video (like the Garmin Virb motorbike example) with what I have.
mp4 captured from a PTZ camera and;
a separate gpx string captured from a mobile device.
What do I have to do to make this work or is it possible?
My current csv is built from the gpx file with: UnixTimeStamp (every 5 or 6 seconds) SensorLatitude SensorLongitude SensorEllipsoidHeigh
My plan was to ignore heading, FOV, HOV for now by just using dummy values because I actually don't really need these (a moving dot on the map is fine with no FOV really needed) so can work them out later if i get part this first step. I realize this might be the wrong approach.
My video has timestamp data of some sort in the EXIF metadata (i think)
In short, steps to marry up a gpx with an mp4 and push to an OIC like the Garmin Virb example.
I will DM you a link to the files too.
If you can provide me samples of the data I can have a look. And like I said I will forward you query to a colleague of mine and see how we can come with a solution for you.