Skip to content

media: send voice notes and audio to LINE as m4a - #276

Merged
iFixRobots merged 2 commits into
mainfrom
iFixRobots/voice-notes-as-m4a
Oct 25, 2026
Merged

iFixRobots merged 2 commits into
mainfrom
iFixRobots/voice-notes-as-m4a

Conversation

@iFixRobots

Copy link
Copy Markdown
Contributor

Voice notes sent from Beeper to LINE arrive on the other side but can't be played.

Beeper Android and Desktop record voice notes as Ogg/Opus, and the bridge uploads whatever bytes it gets as a LINE audio message. LINE audio is m4a or mp3 (the Messaging API audio message accepts only those, and audio from LINE clients is m4a, which is why inbound audio is bridged as audio/mp4). In Letter Sealing chats the file is end-to-end encrypted, so LINE can't transcode it either. A 130 s Android voice note:

"msg_content_type":3,"msg_metadata":{"AUDLEN":"130634","DURATION":"130634",...,"FILE_SIZE":"961774",...,"SID":"ema"

That's the Ogg file as sent (~59 kbps Opus).

Audio that isn't already m4a or mp3 now goes through ffmpeg to AAC in m4a before upload, the same way mautrix/meta (to-whatsapp.go) and mautrix/signal convert voice notes for networks that don't take Opus. A 130 s Opus clip converts in about 1.5 s. iOS voice notes (already m4a) and mp3 files are sent untouched.

Before After
Android/Desktop voice note Ogg/Opus, won't play in LINE AAC m4a
iOS voice note, mp3 file unchanged unchanged

Before / after: not run yet. It needs two LINE accounts: send a voice note from Beeper Android to a LINE account and play it in the LINE app, on main and on this branch.

View in Indent
Tag @indent to continue the conversation here.

@indent

indent Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Issues

All clear! No issues remaining. 🎉

1 issue already resolved
  • Audio files with embedded cover art (e.g. FLAC) get a video stream in the converted m4a because the ffmpeg args lack -vn. Add -vn to the output args so only audio is kept. (fixed by commit 9e42b56)
    Found by Indent Review Agent

CI Checks

All CI checks passed on 9e42b56.

Review agents

Select any unchecked box below to run or rerun that agent.

Passed (1)
  • Indent Review Agent · No issues found
Full results

Indent Review Agent

  • Summary: No issues found
  • Last ran on commit: 9e42b565
  • Latest result
    {
      "summary": "No issues found",
      "findings": []
    }

Comment thread pkg/connector/send_message.go Outdated
@iFixRobots
iFixRobots requested a review from highesttt October 25, 2026 00:19
@iFixRobots
iFixRobots merged commit 6f7f92b into main Oct 25, 2026
9 checks passed
@iFixRobots
iFixRobots deleted the iFixRobots/voice-notes-as-m4a branch October 25, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants