Uploading audio file doesn't work

Screenshot 2022-09-29 210209

I am trying to upload an audio file mp4 that is 2 min long and It isn't working can anyone explain why??

  1. Refresh Browser / AI2 web app / Companion
  2. Audio file size, type ?
  3. Network/Internet connection issues ?

I have a 37mb mp4 and no connection issues

Max file size is 5MB for the assets and the max size for the aia is 30MB.

so that's why I gotta compress it

thank you

But you can use http://code.appinventor.mit.edu/ (which allows 50MB for the aia) and upload the MP4 file via WinZip / WinRAR to the assets.

Search the forum, I made some tutorials / posts on this topic.

Hello PEIHENG

mp4 is a multimedia format, so if yours only contains audio, just changing the file format should reduce the file size. You can use a free audio file handler like 'Audacity' to change the format to mp3 for example.

What does the mp4 file contain? Music? A sound effect? The track could potentially be shortened to make the file even smaller.

Compressing the file (each format already has a certain amount of bespoke compression) is not a good choice because it will need to be decompressed in memory in order to play.

audio only and a black screen

i got it to work with a compressor and it became a 2 mb file and I could run the audio without any problem

It would nevertheless be best to use the correct file format for the media. Is your App going to be distributed to other Users? Not every Smartphone is necessarily going to be able to decompress that file successfully (it has to be decompressed to be played), yet it seems as though the audio data itself is not so large.

Alright I'll do this next time, but I am just doing this for my school project for computer science. Thanks for the information, and the game won't be released publicly

1 Like

I just tested the thing about correct video format and I made multiple 3mb mp3 players with a converter and the chromebook provided by the school I am in can't seem to run the mp3 for more than 5 seconds

My guess is, you are using the sound component, which is for short sound snippets. .
use the player component instead...
And next time what about posting a screenshot of your relevant blocks, so we do not have to guess?
Taifun

1 Like



oh sorry about that, and yeah I am using the sound component. Plus if sound only does short snippets then why on an ipad or phone it plays the whole 2 minutes. Also thanks ill try the player component now

Also thanks, I tried player and it works now :grinning: :grinning: :pray:

See here:

@Susan_Lane

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.