Forum

Author Topic: Problem running importVideo()  (Read 397 times)

jhm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Problem running importVideo()
« on: August 31, 2022, 01:24:02 PM »
Hi,
I'm having trouble running the importVideo() function - i have a running Docker Image for v1.7.3 and while the script/function call works on Windows (apparently it doesn't in any newer Metashape Versions) I can't seem to get it running in the Image:
It'll start but then stop there and not do anything more (Log with QT_DEBUG_PLUGINS=1):
Quote
Code: [Select]
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/metashape-pro/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/local/metashape-pro/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/metashape-pro/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/local/metashape-pro/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/platforms" ...
loaded library "/usr/local/metashape-pro/plugins/platforms/libqoffscreen.so"
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/platformthemes" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/platformthemes" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/iconengines" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/iconengines" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/imageformats" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/metashape-pro/plugins/imageformats/libqjpeg.so"
Found metadata in lib /usr/local/metashape-pro/plugins/imageformats/libqjpeg.so, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "jpg",
            "jpeg"
        ],
        "MimeTypes": [
            "image/jpeg",
            "image/jpeg"
        ]
    },
    "archreq": 0,
    "className": "QJpegPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("jpg", "jpeg")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/imageformats" ...
loaded library "/usr/local/metashape-pro/plugins/imageformats/libqjpeg.so"
Agisoft Metashape Professional Version: 1.7.3 build 12473 (64 bit)
Platform: Linux
CPU: Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz (server)
CPU family: 6 model: 79 signature: 406F1h
RAM: 220.2 GB
Folder output_dir already exists
Can't load OpenCL library
Found 2 GPUs in 0.06091 sec (CUDA: 0.060301 sec, OpenCL: 0.000576 sec)
Can't load OpenCL library
Found 2 GPUs in 0.000692 sec (CUDA: 0.000413 sec, OpenCL: 0.00027 sec)
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/mediaservice" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/metashape-pro/plugins/mediaservice/libgstmediaplayer.so"
Found metadata in lib /usr/local/metashape-pro/plugins/mediaservice/libgstmediaplayer.so, metadata=
{
    "IID": "org.qt-project.qt.mediaserviceproviderfactory/5.0",
    "MetaData": {
        "Keys": [
            "gstreamermediaplayer"
        ],
        "Services": [
            "org.qt-project.qt.mediaplayer"
        ]
    },
    "archreq": 0,
    "className": "QGstreamerPlayerServicePlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("gstreamermediaplayer")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/mediaservice" ...
Cannot load library /usr/local/metashape-pro/plugins/mediaservice/libgstmediaplayer.so: (libQt5MultimediaGstTools.so.5: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/usr/local/metashape-pro/plugins/mediaservice/libgstmediaplayer.so" : "Cannot load library /usr/local/metashape-pro/plugins/mediaservice/libgstmediaplayer.so: (libQt5MultimediaGstTools.so.5: cannot open shared object file: No such file or directory)"
QMediaPluginLoader: loaded plugins for key "org.qt-project.qt.mediaplayer" : ("gstreamermediaplayer")
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/metashape-pro/accessible" ...
Importing video...
This plugin does not support propagateSizeHints()
Error: The QMediaPlayer object does not have a valid service
This plugin does not support propagateSizeHints()

Does anyone have any ideas what additional dependencies I'm missing? On top of all the dependencies that were enough to run everything else (essentially addPhotos, alignCameras, optimizeCameras, buildDepthMap, buildDenseCloud, buildOrthoMosaic and various exports) I added the following but they still weren't enough:
Code: [Select]
libqt5multimedia5-plugins ubuntu-restricted-extras gst123 gstreamer1.0-tools qtgstreamer-plugins-qt5 libqt5gui5
the image is based on nvidia/cuda:10.0-base-ubuntu18.04, and the entrypoint-script is running with
Code: [Select]
LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libgmp.so.10'
« Last Edit: August 31, 2022, 01:55:43 PM by jhm »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13993
    • View Profile
Re: Problem running importVideo()
« Reply #1 on: August 31, 2022, 02:34:36 PM »
Hello jhm,

Can you please try the later version of Metashape (1.7.5 or 1.8.4)? The issue that caused the reported problem should have been fixed in the version 1.7.4 already.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jhm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem running importVideo()
« Reply #2 on: August 31, 2022, 04:30:25 PM »
I got it running (obviously after trying everything for hours and deciding to finally ask for help...) by switching to nvidia/cuda:11.7.1-base-ubuntu20.04 as my base image and adding the dependencies
Code: [Select]
libqt5multimediagsttools5 qtgstreamer-plugins-qt5(libqt5multimediagsttools5 does not exist for Ubuntu 18.04) however various colleagues reported problems running importVideo on any newer Versions.

I've also encountered a different Problem which stopped me from using any 1.8.x versions (1.8.4 in particular):
Code: [Select]
chunk.exportRaster(os.path.join(results_dir, "tiles.zip"), format=Metashape.RasterFormat.RasterFormatTMS, image_format=Metashape.ImageFormat.ImageFormatPNG, source_data=Metashape.DataSource.OrthomosaicData, white_background=True, min_zoom_level=14, max_zoom_level=24, tile_width=256, tile_height=256, clip_to_boundary=True)

will somehow try to export zoom levels 0..7 (14..24 in 1.7.3) and fail with Vertical Datum out of range - not sure what that is about

jhm

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem running importVideo()
« Reply #3 on: August 31, 2022, 04:55:17 PM »
And now that it ran though okay while exporting jpg it's having problems doing the same with pngs and even entirely hangs up:

Code: [Select]
2022-08-31T13:45:46.875485808Z Importing video...
2022-08-31T13:45:46.959321113Z ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2022-08-31T13:45:46.959343512Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
2022-08-31T13:45:46.959349912Z ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2022-08-31T13:45:46.959355612Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
2022-08-31T13:45:46.959360012Z ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2022-08-31T13:45:46.959364912Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
2022-08-31T13:45:46.959369912Z ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
2022-08-31T13:45:46.959374311Z ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
2022-08-31T13:45:46.959378811Z AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
2022-08-31T13:45:47.209111076Z This plugin does not support propagateSizeHints()
2022-08-31T13:45:47.212143893Z Warning: "Failed to connect: Connection refused"
2022-08-31T13:45:49.711570672Z This plugin does not support propagateSizeHints()
2022-08-31T13:45:51.941507432Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:18.978273384Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:21.238167175Z 1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1 saved 47 frames in 34.3624 sec
2022-08-31T13:46:21.284619911Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:21.285043799Z Loading photos...
2022-08-31T13:46:21.357625824Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:21.782333649Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:23.121961543Z Finished processing in 1.83717 sec (exit code 1)
2022-08-31T13:46:23.139706958Z ## imported /mnt/12345678-aaaa-bbbb-cccc-ddddeeeeffff/VID_20220803_123016_00_007.mp4 in: 0:00:36.748086
2022-08-31T13:46:23.139795456Z ## importing video /mnt/12345678-aaaa-bbbb-cccc-ddddeeeeffff/VID_20220803_123025_00_005.mp4
2022-08-31T13:46:23.146291878Z Importing video...
2022-08-31T13:46:23.218839996Z Cannot connect to server socket err = No such file or directory
2022-08-31T13:46:23.218872895Z Cannot connect to server request channel
2022-08-31T13:46:23.220892940Z jack server is not running or cannot be started
2022-08-31T13:46:23.220967138Z JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-31T13:46:23.220994237Z JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-31T13:46:23.221426725Z ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2022-08-31T13:46:23.221451325Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
2022-08-31T13:46:23.221458624Z ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2022-08-31T13:46:23.221464724Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
2022-08-31T13:46:23.221469824Z ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2022-08-31T13:46:23.221474724Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
2022-08-31T13:46:23.221479824Z ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
2022-08-31T13:46:23.221484724Z ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
2022-08-31T13:46:23.221489524Z AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
2022-08-31T13:46:23.255489894Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:23.257133150Z Warning: "Failed to connect: Connection refused"
2022-08-31T13:46:25.211267352Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:27.687575587Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:29.903115340Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:46:32.127911091Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:46:45.308807393Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:46:46.251052607Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:46:55.490188332Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:57.737939608Z 1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1 saved 52 frames in 34.5914 sec
2022-08-31T13:46:57.789370700Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:57.789847887Z Loading photos...
2022-08-31T13:46:57.819189984Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:57.969182578Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:59.591910262Z Finished processing in 1.80274 sec (exit code 1)
2022-08-31T13:46:59.610438555Z ## imported /mnt/12345678-aaaa-bbbb-cccc-ddddeeeeffff/VID_20220803_123025_00_005.mp4 in: 0:00:36.470335
2022-08-31T13:46:59.610596950Z ## importing video /mnt/12345678-aaaa-bbbb-cccc-ddddeeeeffff/VID_20220803_123526_00_009.mp4
2022-08-31T13:46:59.616919777Z Importing video...
2022-08-31T13:46:59.723551659Z Cannot connect to server socket err = No such file or directory
2022-08-31T13:46:59.723590657Z Cannot connect to server request channel
2022-08-31T13:46:59.725641801Z jack server is not running or cannot be started
2022-08-31T13:46:59.725691100Z JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-31T13:46:59.725704800Z JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-31T13:46:59.726084489Z ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2022-08-31T13:46:59.726117388Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
2022-08-31T13:46:59.726135088Z ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2022-08-31T13:46:59.726141888Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
2022-08-31T13:46:59.726147287Z ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2022-08-31T13:46:59.726188486Z ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
2022-08-31T13:46:59.726211186Z ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
2022-08-31T13:46:59.726255984Z ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
2022-08-31T13:46:59.726269884Z AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
2022-08-31T13:46:59.759130685Z This plugin does not support propagateSizeHints()
2022-08-31T13:46:59.760732241Z Warning: "Failed to connect: Connection refused"
2022-08-31T13:47:01.786321497Z This plugin does not support propagateSizeHints()
2022-08-31T13:47:09.672714419Z This plugin does not support propagateSizeHints()
2022-08-31T13:47:14.025227410Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:47:42.355668224Z Warning: "A lot of buffers are being dropped."
2022-08-31T13:47:54.018565371Z Error: Internal data stream error.
The ALSA Errors are somewhat expected
is there a way to make it fail hard?

Code: [Select]
Finished processing in 1.80274 sec (exit code 1)suggests it should have entirely failed there and it completely hangs up/freezes (no CPU usage anymore) after the output
Code: [Select]
Error: Internal data stream error.