usdzaudioimport

Ok finally usdzconvert 0.64 brings usdzaudioimport tool that seems to be working!


I can actually embed MP3 into usdz easily. However, when I import it into Reality Composer, the USDZ does not seem to recognize any audio embedded.


I wonder what's the purpose of the MP3 embed for USDZ? Is it only for sharing AR asset with audio? Wouldn't it be more useful if each USDZ with audio can be seen inside Reality Composer and assigned behaviour?

Keep getting error like this when directly using usdz output:

Warning: in _AssetLocalizer at line 698 of /Users/sergei/repos/USD/pxr/usd/lib/usdUtils/dependencies.cpp -- Failed to resolve reference @gumpop.mp3@ with computed asset path @gumpop.mp3@ found in layer @/tmp/usdzupdate/assetB/assetB.usdc@.

bash-3.2$ usdzaudioimport /Users/jimmygunawan/Desktop/assetA.usdz /Users/jimmygunawan/Desktop/assetAX.usdz --audio /Users/jimmygunawan/Desktop flush.caf -auralMode spatial

Input file: /Users/jimmygunawan/Desktop/assetA.usdz

Output file: /Users/jimmygunawan/Desktop/assetAX.usdz

Warning: in _AssetLocalizer at line 698 of /Users/sergei/repos/USD/pxr/usd/lib/usdUtils/dependencies.cpp -- Failed to resolve reference @flush.caf@ with computed asset path @flush.caf@ found in layer @/tmp/usdzupdate/assetA/assetA.usdc@.

bash-3.2$ usdzaudioimport /Users/jimmygunawan/Desktop/assetA.usdz /Users/jimmygunawan/Desktop/assetAX.usda --audio /Users/jimmygunawan/Desktop flush.caf -auralMode spatial -v

my solution is to output as usda, then convert to usdz, then it works..


maybe the audio import does not like slash

And still the embedded audio is not showing on Reality Composer, however it does playback on ARQuickLook, in loop.

Hello Guys, I cannot get through this "Error: unexpected parameter -auralMode for argument --audio"
The argument passed in terminal shell "usdzaudioimport 04.usdz 05.usda -a music.mp3 -auralMode notSpatial"

Anything I'm missing here please let me know.

Thank You
After --audio you gotta specify PATH and FILENAME, not just FILENAME.

usdzaudioimport /Users/MrX/Desktop/test/monkeyhead.usdz /Users/MrX/Desktop/test/monkeyheadx.usda --audio /Users/MrX/Desktop/test flush.caf -auralMode spatial -playbackMode onceFromStart

And so far it works for me if I use USDA, then convert to USDZ.

Unfortunately Reality Composer does not seem to read the embedded sound. But however, XCode might be able to load the sound ?
usdzaudioimport 04.usdz 05.usdc --audio /Users/varunsaini/Desktop music.mp3 -auralMode notSpatial
Input file: 04.usdz
Output file: 05.usdc
Traceback (most recent call last):
 File "/Applications/usdpython/usdzconvert/usdzaudioimport", line 328, in <module>
  os.makedirs(outputDir)
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
  mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''

I just try adding path in audio as shown in the example but still get some error any solution for this?
Thank you @yojimboMaster
I successfully added sound like this:

Code Block
usdzaudioimport Desktop/talking-man.usdz Desktop/talking-man-3.usdz --audio /Users/luka/Desktop tom.wav -auralMode notSpatial

but when I want to convert .usda file back to .usdz I get the following error:

Code Block bash-3.2$ usdzconvert Desktop/talking-man.usda Desktop/talking-man-2.usdz
Input file: Desktop/talking-man.usda
Warning: can't find Desktop/0/texgen_0.png
Warning: can't find Desktop/0/texgen_1.png
Warning: in _AssetLocalizer at line 698 of /Users/sergei/repos/USD/pxr/usd/lib/usdUtils/dependencies.cpp -- Failed to resolve reference @0/texgen_1.png@ with computed asset path @0/texgen_1.png@ found in layer @/Users/luka/Desktop/talking-man-2.usdc@.
Warning: in _AssetLocalizer at line 698 of /Users/sergei/repos/USD/pxr/usd/lib/usdUtils/dependencies.cpp -- Failed to resolve reference @0/texgen_0.png@ with computed asset path @0/texgen_0.png@ found in layer @/Users/luka/Desktop/talking-man-2.usdc@.
Output file: Desktop/talking-man-2.usdz
usdARKitChecker: [Fail] Desktop/talking-man-2.usdz

File is converted to .usdz but it loses textures. Does anyone know what is a problem?

usdzaudioimport
 
 
Q