studio icon indicating copy to clipboard operation
studio copied to clipboard

Exception UnsupportedAudioFileException: Stream of unsupported format

Open reyur opened this issue 4 years ago • 2 comments

Describe the bug I try to convert a .pack to zip archive, but it failed.

To Reproduce Steps to reproduce the behavior:

  1. Go to web ui
  2. Click on 'Convert this story pack to archive format'

Logs 2020-10-26 23:06:54,937 [WARN ] [s.w.s.LibraryService]: Pack is in binary format. Converting to archive format and storing in temporary file: C:\Users\XXXXX\AppData\Local\Temp\Joyeux_noel-e54ff749-6044-4d98-a781-a69e48002df9.pack8005677452159945993.zip 2020-10-26 23:06:54,938 [WARN ] [s.w.s.LibraryService]: Reading binary format pack 2020-10-26 23:06:55,720 [WARN ] [s.w.s.LibraryService]: Compressing pack assets javax.sound.sampled.UnsupportedAudioFileException: Stream of unsupported format at java.desktop/javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1014) at studio.core.v1.utils.AudioConversion.waveToOgg(AudioConversion.java:74) at studio.core.v1.utils.PackAssetsCompression.withCompressedAssets(PackAssetsCompression.java:62) at studio.webui.service.LibraryService.getArchivePackFile(LibraryService.java:173) at studio.webui.api.LibraryController$1.run(LibraryController.java:87) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) 2020-10-26 23:07:44,265 [ERROR] [s.w.s.LibraryService]: Failed to convert binary format pack to archive format java.io.IOException: Unsupported audio format at studio.core.v1.utils.AudioConversion.waveToOgg(AudioConversion.java:91) at studio.core.v1.utils.PackAssetsCompression.withCompressedAssets(PackAssetsCompression.java:62) at studio.webui.service.LibraryService.getArchivePackFile(LibraryService.java:173) at studio.webui.api.LibraryController$1.run(LibraryController.java:87) at java.base/java.util.TimerThread.mainLoop(Timer.java:556) at java.base/java.util.TimerThread.run(Timer.java:506) Caused by: javax.sound.sampled.UnsupportedAudioFileException: Stream of unsupported format at java.desktop/javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1014) at studio.core.v1.utils.AudioConversion.waveToOgg(AudioConversion.java:74) ... 5 more 2020-10-26 23:07:44,272 [ERROR] [s.w.a.LibraryController]: Failed to read or convert pack 2020-10-26 23:07:44,275 [ERROR] [s.w.MainVerticle]: Exception thrown io.vertx.core.impl.NoStackTraceThrowable: Failed to read or convert pack

Desktop and environment (please complete the following information):

  • OS: Win64
  • Browser : Chrome
  • Java version: openJDK 15.0.1
  • Maven version: /
  • STUdio application version: 0.2.0

Thank you.

reyur avatar Oct 26 '20 22:10 reyur

Hi. Thanks for the feedback. The error indicates that the WAV audio file somehow cannot be read by the java library. Does the binary pack read correctly on your device? How did you generate it?

marian-m12l avatar Nov 05 '20 20:11 marian-m12l

Similar error here:

2021-12-28 15:18:36,045 [INFO ] [s.w.s.LibraryService]: Reading archive format pack
2021-12-28 15:18:36,366 [INFO ] [s.w.s.LibraryService]: Converting assets if necessary
2021-12-28 15:18:36,430 [ERROR] [s.w.s.LibraryService]: Failed to convert archive format pack to FS format
javax.sound.sampled.UnsupportedAudioFileException: Stream of unsupported format
	at java.desktop/javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:928)
	at studio.core.v1.utils.PackAssetsCompression.withPreparedAssetsFirmware2dot4(PackAssetsCompression.java:182)
	at studio.webui.service.LibraryService.addConvertedFsPackFile(LibraryService.java:318)
	at studio.webui.api.LibraryController$2.run(LibraryController.java:102)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)
Exception in thread "Timer-0" java.lang.RuntimeException: Failed to convert archive format pack to FS format
	at studio.webui.service.LibraryService.addConvertedFsPackFile(LibraryService.java:332)
	at studio.webui.api.LibraryController$2.run(LibraryController.java:102)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)
Caused by: javax.sound.sampled.UnsupportedAudioFileException: Stream of unsupported format
	at java.desktop/javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:928)
	at studio.core.v1.utils.PackAssetsCompression.withPreparedAssetsFirmware2dot4(PackAssetsCompression.java:182)
	at studio.webui.service.LibraryService.addConvertedFsPackFile(LibraryService.java:318)
	... 3 more

Juke34 avatar Dec 28 '21 14:12 Juke34