AVPlayer implementation does not play sound

Product

Streams

Question

Recently we’ve moved some of our to video resources bitmovin.
We use AVPlayer implementation.
Unfortunately, the video does not play sound - the native iOS player doesn’t show the sound button on top right corner, like there were no sound at all.
The videos from our other resources that use h264 are working correctly.
When I play the video on Browser/VLC it is fine.
Is there any additional implementation for the sound?
As in bitmovin example, im setting the AVAudioSesson like below.
do {
try AVAudioSession.sharedInstance().setCategory(.playback)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print(error.localizedDescription)
}

Maybe there’s somewith wrong with configuration?

Input #0, hls, from ‘[URL]’:
Duration: 00:05:17.27, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 930914
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
compatible_brands: iso8isommp41dashcmfc
handler_name : Bitmovin Sound Handler
vendor_id : [0][0][0][0]
major_brand : mp41
minor_version : 0
comment : audio_1.m3u8
Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 798 kb/s, 30 fps, 30 tbr, 30k tbn (default)
Metadata:
variant_bitrate : 930914
handler_name : Bitmovin Video Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
major_brand : mp41
minor_version : 0
compatible_brands: iso8isommp41dashavc1cmfc
Program 1
Metadata:
variant_bitrate : 1535446
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
compatible_brands: iso8isommp41dashcmfc
handler_name : Bitmovin Sound Handler
vendor_id : [0][0][0][0]
major_brand : mp41
minor_version : 0
comment : audio_1.m3u8
Stream #0:2(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 1402 kb/s, 30 fps, 30 tbr, 30k tbn (default)
Metadata:
variant_bitrate : 1535446
handler_name : Bitmovin Video Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
major_brand : mp41
minor_version : 0
compatible_brands: iso8isommp41dashavc1cmfc
Program 2
Metadata:
variant_bitrate : 610552
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
compatible_brands: iso8isommp41dashcmfc
handler_name : Bitmovin Sound Handler
vendor_id : [0][0][0][0]
major_brand : mp41
minor_version : 0
comment : audio_1.m3u8
Stream #0:3(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 810x1440 [SAR 1:1 DAR 9:16], 477 kb/s, 30 fps, 30 tbr, 30k tbn (default)
Metadata:
variant_bitrate : 610552
handler_name : Bitmovin Video Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
major_brand : mp41
minor_version : 0
compatible_brands: iso8isommp41dashavc1cmfc
Program 3
Metadata:
variant_bitrate : 2408380
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
compatible_brands: iso8isommp41dashcmfc
handler_name : Bitmovin Sound Handler
vendor_id : [0][0][0][0]
major_brand : mp41
minor_version : 0
comment : audio_1.m3u8
Stream #0:4(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 2275 kb/s, 30 fps, 30 tbr, 30k tbn (default)
Metadata:
variant_bitrate : 2408380
handler_name : Bitmovin Video Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
major_brand : mp41
minor_version : 0
compatible_brands: iso8isommp41dashavc1cmfc

Hi @karol.korzen,

is it possible for you to share the Multivariant Playlist (m3u8)? Either the link to it or its content? That might help us to identify the issue.

BR, David

Hi, @davidsteinacher

I’ve found the issue.
The streams you provide are not compliant with HLS specification for apple.
The “und” language that you provide with your streams is unrecognized by AVPlayer, and as a result is omited.
Please check Media Stream Validator

Pasting an example stream
https://streams.bitmovin.com/cratab9mvfs7grirh510/manifest.m3u8

1 Like

Thanks for sharing the insights. I’ll delegate this information internally.