just_audio
just_audio copied to clipboard
Seek method is not working properly in ios
Which API doesn't behave as documented, and how does it misbehave? seek method is not working properly. When I seek greater than 20 secs in over 10 mins duration song, it suddenly stopped and play method was not working in ios. But it works fine with 6 mins duration song.
Minimal reproduction project Provide a link here using one of two options:
- Fork this repository and modify the example to reproduce the bug, then provide a link here.
- If the unmodified official example already reproduces the bug, just write "The example".
my github repository: https://github.com/joo6077/flutter_just_audio_test
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
- Seek to greater than 20 seconds
- PositionStream return value strangely and just stop
- I can't play back
- It's just fine when I seek between 0 10 seconds.
Error messages No error messages
If applicable, copy & paste error message here, within the triple quotes to preserve formatting.
flutter: 0:08:20.000304
flutter: 0:08:20.000000
flutter: 0:08:20.001572
flutter: 0:08:20.000000
// this is log after I execute seek method and then just stopped
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
https://user-images.githubusercontent.com/59814980/172897603-d6b9db2d-8c99-438b-abc2-db663bb93353.MOV
Smartphone (please complete the following information):
- Device: iPhone 11 pro
- OS: IOS 15.5
Flutter SDK version
insert output of "flutter doctor" here
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.67.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
• No issues found!
Additional context Add any other context about the problem here.
@ryanheise can you answer this issue?
I have only tested it on the iOS 15.5 simulator so far but the issue was not reproduced.
Just tested on an actual iPhone device with iOS 15.5 and it also worked correctly.
Edit: To clarify, my test device is an iPhone 7.
Thank you for replying, did you test with my repository code or example in your package?
I tested with simulator(iOS 15.5) iPhone 11 pro and iPhone 8. Both of them didn't work with my code.
This is my code.
import 'package:flutter/material.dart';
import 'package:just_audio/just_audio.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
late final AudioPlayer _audioPlayer;
final TextEditingController _controller = TextEditingController();
bool isPlaying = false;
@override
void initState() {
_audioPlayer = AudioPlayer();
// file name: shower(15mins), wake_up(5mins), new_york(15mins)
_audioPlayer.setAsset('assets/audio/shower.mp3');
_audioPlayer.positionStream.listen((event) {
print(event);
});
super.initState();
}
String _getTimeString(Duration time) {
final minutes =
time.inMinutes.remainder(Duration.minutesPerHour).toString();
final seconds = time.inSeconds
.remainder(Duration.secondsPerMinute)
.toString()
.padLeft(2, '0');
return time.inHours > 0
? "${time.inHours}:${minutes.padLeft(2, "0")}:$seconds"
: "$minutes:$seconds";
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Builder(builder: (context) {
return ListView(
children: [
const SizedBox(
height: 100,
),
TextField(
controller: _controller,
keyboardType: TextInputType.number,
),
const SizedBox(
height: 100,
),
ElevatedButton(
onPressed: () {
final seekDuration = Duration(
seconds: int.parse(_controller.text) == 0
? 1
: int.parse(_controller.text));
_audioPlayer.seek(seekDuration);
},
child: Text('seek to ${_controller.text} seconds')),
const SizedBox(
height: 100,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
StreamBuilder<Duration>(
builder: (_, snapshot) {
return Text(
_getTimeString(snapshot.data ?? Duration.zero));
},
stream: _audioPlayer.positionStream,
),
StreamBuilder<Duration?>(
builder: (_, snapshot) {
return Text(
_getTimeString(snapshot.data ?? Duration.zero));
},
stream: _audioPlayer.durationStream,
),
],
),
const SizedBox(
height: 100,
),
StreamBuilder<PlayerState>(
stream: _audioPlayer.playerStateStream,
initialData: PlayerState(false, ProcessingState.ready),
builder: (_, snapshot) {
final audioState = snapshot.data;
return ElevatedButton(
onPressed: () {
if (audioState!.playing) {
_audioPlayer.pause();
} else {
_audioPlayer.play();
}
},
child: Text(audioState!.playing ? 'pause' : 'play'));
}),
],
);
}),
),
);
}
}
I tested your reproduction project with your reproduction steps.
Since I can't reproduce it but you can, I may need to solve this with your help. Can you tell me, after the first time when it fails, what happens if you kill the app and re-launch the app so that it will be reading the asset from the asset cache. Does it succeed the second time? Also, does it also fail if you put the same file on your filesystem somewhere and make your app open that existing file? This will help me understand whether it's an asset loading/timing issue.
When I kill the app and re-launch it, it also caused the same issue.
I made new directory called audio in root directory but it didn't work as well.
I tried to add assets as full pah such as - assets/audio/new_york.mp3 in pubspec.yaml
and used async await for setAsset method.
None of those worked.
I just checked when I keep playing the music like til 3:00.00 in total duration 15:12.00, seeking to before 3:00.00 such as 1:20.00, 2:59.00 succeeded but after 3:01.00 failed to seek. So I guess it's loading/timing issue as your words, do you want me to check something else?
The timing issue I am thinking of is the timing between flushing I/O buffers from the Dart side and reading them from the native side. I can't do any further investigation on my own since I can't reproduce it, but I would still be interested to know on your end what happens if you try accessing the same file via different means. You've already tried setAsset
, but there is also setFilePath
and setUrl
, the last one would require hosting the file on a server.
I tested setFilePath
, it also failed. I also put delay between writeAsBytes
and setFilePath
.
I don't know what should I do more..
How about testing setUrl
hosting the file on a server?
I tested it with 8 mins duration url, it succeeded but I don't need server
I know you don't want to use a server, but the purpose is to understand the issue further. If you test with the long audio file on a server and it works, that means that there is nothing wrong with the encoding of the audio file and instead has to do with the nature of playing audio off a file.
In the case of setFilePath
, can you tell me more about what you did and what happened? For example, are you putting the file onto your phone in advance before running your app, and then getting your app to open that file, or are you trying to create the file within the app just in time? And when you run it, are you observing the same behaviour in your video where the audio does start playing but you can't seek to 20 seconds?
I put the file onto my phone in advance before running my app and then I tried to create the file within the app just in time.
Yeah it's happened with the same behaviour as my video.
Here is my code below.
var content = await rootBundle.load("assets/audio/$title.mp3");
final directory = await getApplicationDocumentsDirectory();
var file = File("${directory.path}/$title.mp3");
file.writeAsBytesSync(content.buffer.asUint8List());
await Future.delayed(Duration(seconds: 1));
await _audioPlayer.setFilePath(file.path);
Those weren't meant to be the same scenario, I meant as a separate test put the file on your device in advance and then pass it's path into audio player. This experiment should not do anything just in time, it should do things in advance only.
I tested what you said. I downloaded music file in my phone first, and then I used file_picker package to pick the file in my device. But it didn't work. I also tried pick and save in cache and write the file but also it didn't work.
I guess the issue would be caused by size of the file or the duration
It is still a complete mystery to me since you have found this minimal reproduction project fails on every device you've tested, and I've found your same code to work correctly on every device I've tested.
So it is not only the size of the file to consider but also our different environments (different devices, or different code or different audio files). Perhaps you could get someone additional to test it to see if you are the only person experiencing the issue.
I’m wondering should I set some preference in ios device or laptop??
I'm not sure what preferences could help, although to determine whether this is a bug, I still suggest getting confirmation from other people to make sure it's not just you who is experiencing it.
I can reproduce this issue with my iPhone 12 Pro Max (iOS 14.6). I first noticed this when using just_audio_background
where everything worked perfectly, only when seeking foreward the song would be skipped to the next item in the playlist. Small seeks sometimes work and backwords seems to not be a problem. (Didn't implement seeking until then)
I can also reproduce this with longer songs and calling player.seek(Duration(minutes: 10))
where it simply skips the song and plays the next one.
A few details to my usage:
Im playing mp4
(only audio so actually m4a
) files but rename them to the aac
extension because AVPlayerItem.seekableTimeRanges
reports the actual duration * 2 when using the mp4
extension which is annoying to say the least (especially when waiting for ProcessingState.completed
)(this is reproducable on MacOS with quicktime). I then load them into a ConcatenatingAudioSource
from the file system to play them.
EDIT: I can also partly reproduce this issue with your test repo @joo6077 flutter_just_audio_test after setting my provisioning profile.
The interesting thing is that different audio files give different results. The files I have for my app and those that were provided e.g. new_york.mp3
both failed to seek to 50s. I then tried an old audio file I had laying around and what do you know - it worked! I was am able to reproducably seek that one audio while two others fail. To help debug this here are the ffmpeg details:
Audio that works (Lounge 2.m4a
):
ffmpeg -i Lounge\ 2.m4a -f null -
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f7c05f05200] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Lounge 2.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 2017-08-14T10:11:04.000000Z
artist : Coronon
album : Coronons Album
date : 2017
composer : Coronon
title : Lounge
encoder : GarageBand for iOS 2.2.2
iTunSMPB : 00000000 00000840 0000027A 0000000000986546 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Duration: 00:03:46.53, start: 0.047889, bitrate: 270 kb/s
Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
creation_time : 2017-08-14T10:11:04.000000Z
vendor_id : [0][0][0][0]
Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 3024x3024 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn (attached pic)
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))
Stream #0:0 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
iTunSMPB : 00000000 00000840 0000027A 0000000000986546 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
artist : Coronon
album : Coronons Album
date : 2017
composer : Coronon
title : Lounge
encoder : Lavf59.16.100
Stream #0:0: Video: wrapped_avframe, yuvj420p(pc, bt470bg/unknown/unknown, progressive), 3024x3024 [SAR 72:72 DAR 1:1], q=2-31, 200 kb/s, 90k fps, 90k tbn (attached pic)
Metadata:
encoder : Lavc59.18.100 wrapped_avframe
Stream #0:1(eng): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
creation_time : 2017-08-14T10:11:04.000000Z
vendor_id : [0][0][0][0]
encoder : Lavc59.18.100 pcm_s16le
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:03:46.48 bitrate=N/A speed= 497x
video:0kB audio:39016kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Audio that fails (new_york.mp3
):
ffmpeg -i new_york.mp3 -f null -
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'new_york.mp3':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2019-11-09T09:09:33.000000Z
Duration: 00:15:12.06, start: 0.000000, bitrate: 129 kb/s
Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 1 kb/s (default)
Metadata:
creation_time : 2019-11-09T09:09:33.000000Z
handler_name : ISO Media file produced by Google Inc.
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
encoder : Lavf59.16.100
Stream #0:0(und): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
creation_time : 2019-11-09T09:09:33.000000Z
handler_name : ISO Media file produced by Google Inc.
vendor_id : [0][0][0][0]
encoder : Lavc59.18.100 pcm_s16le
size=N/A time=00:15:12.05 bitrate=N/A speed= 600x
video:0kB audio:157116kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
My own audio that fails (b70b5b4b-2e14-4a65-8644-fe07a3ba0391.aac
):
ffmpeg -i b70b5b4b-2e14-4a65-8644-fe07a3ba0391.aac -f null -
ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'b70b5b4b-2e14-4a65-8644-fe07a3ba0391.aac':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2020-02-10T12:14:28.000000Z
Duration: 00:42:21.19, start: 0.000000, bitrate: 129 kb/s
Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 0 kb/s (default)
Metadata:
creation_time : 2020-02-10T12:14:28.000000Z
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
encoder : Lavf59.16.100
Stream #0:0(eng): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default)
Metadata:
creation_time : 2020-02-10T12:14:28.000000Z
vendor_id : [0][0][0][0]
encoder : Lavc59.18.100 pcm_s16le
size=N/A time=00:42:21.19 bitrate=N/A speed= 592x
video:0kB audio:437760kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
I think I found the solution! Its really the audio format! After converting your new_york.mp3
DASH mp3
into a conventional m4a
using ffmpeg
: ffmpeg -i new_york.mp3 -c:a copy out.mp4
it works like a charm!!! (Just rename the output to m4a
)
More details on DASH -> conventional
So the problem is that we somehow can't handle the DASH container format very well.
Test File: new_york_fixed.m4a (If you can't directly download the file clone/download the whole repo as zip to get the file)
I really don't mean to spam but this may help others as well:
I found a simple solution to convert the DASH format to a 'usable' container format in flutter: ffmpeg_kit_flutter (Note this requires an iOS DeploymentTarget of at least 10.0 when using the LTS version see here)
You only need the base version (no additional packages as of writing this)
Conversion example:
/// Converts an audio file in the DASH container format to a conventional
/// container using FFMPEG
Future<File> convertDashToConventional(
File dashFile,
File convertedFile, {
bool deleteOld = false,
}) async {
// Note: you could also declare the convertedFile here using a path as argument instead.
// Declaring a file does not create it which is why I prefer this approach.
final converterCompleter = Completer<File>();
FFmpegKit.executeAsync(
'-i "${dashFile.path}" -c:a copy "${convertedFile.path}"',
(session) async {
// completeCallback
final returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
if (deleteOld) dashFile.delete();
converterCompleter.complete(convertedFile);
} else if (ReturnCode.isCancel(returnCode)) {
converterCompleter.completeError(
'FFMPEG cancled',
);
} else {
final logs =
(await session.getAllLogs()).map((e) => e.getMessage()).join('\n');
converterCompleter.completeError(
'FFMPEG cancled - logs: \n\n$logs',
);
}
},
(log) {
// logCallback
},
(stats) {
// statisticsCallback
},
);
return converterCompleter.future;
}
Running the same analysis on @joo6077 's file doesn't mention Dash:
$ ffmpeg -i wake_up.mp3 -f null -
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 13.0.0 (clang-1300.0.29.3)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4.1_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, mp3, from 'wake_up.mp3':
Metadata:
encoder : Lavf58.45.100
Duration: 00:06:10.94, start: 0.023021, bitrate: 160 kb/s
Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 160 kb/s
Metadata:
encoder : Lavc58.91
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc58.134.100 pcm_s16le
size=N/A time=00:06:10.89 bitrate=N/A speed= 674x
video:0kB audio:69544kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
However, @joo6077 you may try re-encoding your file in a different way to see if it helps. Apple is known to not support certain encodings, and if these are assets which are completely under your control, then the good news is that it is also within your power to experiment with the encoding.
@Coronon thank a lot! it works so well!! @ryanheise also thanks for replying to my message! I converted mp3 file to m4a. I found that Apple supports music file extension m4a.