Tau: IOS recorded files does not play when uploaded to a server.

Created on 30 Sep 2019  路  6Comments  路  Source: Canardoux/tau

Version of flutter_sound

^1.4.5

flutter doctor

[鉁揮 Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.5 18F132, locale
en-LK)
[鉁揮 Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[鉁揮 Xcode - develop for iOS and macOS (Xcode 10.2.1)
[鉁揮 Android Studio (version 3.4)
[鉁揮 VS Code (version 1.34.0)
[鉁揮 Connected device (1 available)

Platforms you faced the error (IOS or Android or both?)

IOS

Expected behavior

sound is recorded on IOS(m4a) and Android(mp3) devices. These recorded files are uploaded to a server using flutter http library. Then these audio files should play.

Actual behavior

The uploaded files from Android(mp3) play. But the recorded files in IOS(m4a) does not play. Files seem to have less information than required.

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

  1. Record sound in IOS device.
  2. Send them to a server using flutter http library.
  3. Then try to listen to that uploaded sound file.

I have confirmed that this is not an issue with the backend by uploading a m4a file directly using Postman.

help wanted

Most helpful comment

I have exactly the same problem.
for example:
I recorded the sound with Android device (where everything working OK) then I will send it to server, then on Android is playing as expected but on iOS the player not working, on iPod 6th. gen. the player not started, when I am using emulator, the behavior is same as on iPod and in log I have this message:
MP4Parser_PacketProvider->GetASBD() failed

All 6 comments

How is your uri looks like on ios before uploading?

uri: /var/mobile/Containers/Data/Application/854F8FAE-E9A3-4537-8E52-BC577723D7EC/Library/Caches/1569843224360.m4a

I create the path before start recording using the below code.

if (Platform.isAndroid) { path = join((await getTemporaryDirectory()).path, '${DateTime.now().millisecondsSinceEpoch.toString()}.mp3'); } else if (Platform.isIOS) { path = join((await getTemporaryDirectory()).path, '${DateTime.now().millisecondsSinceEpoch.toString()}.m4a'); }

I am able to play the audio file after recording. But after uploading it to the server using http request it doesn't work.

@TharinduNM File.uri

I have exactly the same problem.
for example:
I recorded the sound with Android device (where everything working OK) then I will send it to server, then on Android is playing as expected but on iOS the player not working, on iPod 6th. gen. the player not started, when I am using emulator, the behavior is same as on iPod and in log I have this message:
MP4Parser_PacketProvider->GetASBD() failed

This issue is stale because it has been open 30 days with no activity. Leave a comment or this will be closed in 5 days.

I have exactly the same problem.
for example:
I recorded the sound with Android device (where everything working OK) then I will send it to server, then on Android is playing as expected but on iOS the player not working, on iPod 6th. gen. the player not started, when I am using emulator, the behavior is same as on iPod and in log I have this message:
MP4Parser_PacketProvider->GetASBD() failed

Do you get any solution on this?

Was this page helpful?
0 / 5 - 0 ratings