AAC-LC in .m4a containers created by the Voice Memos app fail to play via Android "On This Mobile Device" or SMB1/2 Media Library


Recently discovered this little snag:

My mother has been recording books for our children using Voice Memos on her iPhone and emailing them to us. We’ve been playing them using AirPlay from our iPad, but wanted more flexibility so tried to a) Put them in our NAS-based SMB2 library and b) Play them from Android devices using the Sonos app (we use an iPad for FaceTime but both parents’ personal phones are Android).

What we’ve found is that .m4a files produced by Voice Memos fail to play using the Sonos App, reporting “Unable to play ‘Title’ - the song is not encoded correctly.” This is true both playing from “On This Mobile Device” on Android or from the Music Library share.

I’ve reproduced this with several test recordings on multiple iOS devices on iOS 15.x.

Salient ffprobe output:

ffprobe version 2022-06-30-git-03b2ed9a50-essentials_build-www.gyan.dev Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 27.100 / 57. 27.100
libavcodec 59. 34.100 / 59. 34.100
libavformat 59. 25.100 / 59. 25.100
libavdevice 59. 6.100 / 59. 6.100
libavfilter 8. 41.100 / 8. 41.100
libswscale 6. 6.100 / 6. 6.100
libswresample 4. 6.100 / 4. 6.100
libpostproc 56. 5.100 / 56. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '..\New Recording.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A isommp42
creation_time : 2022-07-02T16:38:46.000000Z
title : New Recording
voice-memo-uuid : 8CB78867-A07D-4A72-9F50-6916B231F9B3
encoder : com.apple.VoiceMemos (iPad (null))
Duration: 00:00:04.54, start: 0.000000, bitrate: 71 kb/s
Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2022-07-02T16:38:46.000000Z
handler_name : Core Media Audio
vendor_id : [0][0][0][0]
[stream]
index=0
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=1
channel_layout=mono
bits_per_sample=0
id=0x1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=202752
duration=4.597551
bit_rate=63880
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=198
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=2
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
TAG:creation_time=2022-07-02T16:38:46.000000Z
TAG:language=und
TAG:handler_name=Core Media Audio
TAG:vendor_id=[0][0][0][0]
[/stream]
[format]
filename=..\New Recording.m4a
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=4.538118
size=40398
bit_rate=71215
probe_score=100
TAG:major_brand=M4A
TAG:minor_version=0
TAG:compatible_brands=M4A isommp42
TAG:creation_time=2022-07-02T16:38:46.000000Z
TAG:title=New Recording
TAG:voice-memo-uuid=8CB78867-A07D-4A72-9F50-6916B231F9B3
TAG:encoder=com.apple.VoiceMemos (iPad (null))
[/format]

Running these files through ffmpeg with the -codec copy option fixes the issue, but is a pain. Doing so, despite using the copy option, changes the duration, size, bit_rate, minor_version, compatible_brands, and encoder (obviously) metadata tags, and deletes the voice-memo-uuid tag.

// Identical fields omitted

[format]
duration=4.598000
size=38343
bit_rate=66712
TAG:minor_version=512
TAG:compatible_brands=M4A isomiso2
TAG:encoder=Lavf59.25.100
[/format]

It’s all quite odd. No other application I’ve tried - Audacity, VLC, MPC-HC, native Android players, chromium-based browsers, etc. - have any issue with the original files. It’s unclear whether these former are not enforcing some standard strictly or whether there’s a bug in Sonos’ codec library. Naturally, no logs are available on the client side to diagnose.

Not a huge deal since there’s a straightforward workaround, but it’d certainly reduce friction if this “just worked” as it does in essentially every other player.


This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

2 replies

See this recent thread. AAC-LC could well be the issue.

 

See this recent thread. AAC-LC could well be the issue.

 

Thanks for the suggestion, but AAC-LC (profile=LC in the metadata) is vanilla AAC. The version of the file that I ran through ffmpeg that works is also AAC-LC, and I have lots of other files that are output from other apps (Echo, call recorders, etc.) that are also AAC-LC and work just fine. This is particular to the encoder in iOS or Voice Memos somehow.

LC is only used to differentiate it from the newer HE (high efficiency) profile that works better for some types of audio.