Bug 224518 - net-im/telegram-desktop: recording sound does not work
Summary: net-im/telegram-desktop: recording sound does not work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-22 14:18 UTC by Lapo Luchini
Modified: 2018-02-26 10:18 UTC (History)
1 user (show)

See Also:


Attachments
patch to enable opus (909 bytes, patch)
2018-02-06 04:19 UTC, Henry Hu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lapo Luchini 2017-12-22 14:18:17 UTC
In the console this error shows up each time the "mic" icon is pressed:

  [opus @ 0x82146e600] The encoder 'opus' is experimental but experimental codecs 
  are not enabled, add '-strict -2' if you want to use it.
  Average Intensity Stereo band: 0,0
  Dual Stereo used: nan%

Sound playback, on the other hand, works out of the box, no configuration needed.

PS: I'm so happy to have the native version available!
This is just a minor hiccup.
Comment 1 Henry Hu 2018-02-06 04:19:27 UTC
Created attachment 190353 [details]
patch to enable opus

I have a patch to enable opus (lower the strictness). However, at my side, with this patch telegram crashes in the opus encoder when recording audio. I'm investigating the problem. You may try the patch.
Comment 2 Henry Hu 2018-02-06 04:41:23 UTC
Okay, recording works if OPUS option is selected in port ffmpeg. In this case, libopus is used for opus encoding/decoding. On the other hand, internal implementation of ffmpeg is used by default, which seems to be buggy or incompatible with telegram-desktop.
By default, OPUS is not enabled. As a result, internal opus encoder is used, which does not work with telegram-desktop.
When OPUS is enabled, the above patch is not needed, because libopus's encoder is not considered experimental.
So there are 2 options:
1. fix internal encoder of opus in ffmpeg to work with telegram-desktop
2. enable OPUS in ffmpeg

I suggest the 2nd option. Before the opus encoder is fixed, the above patch is not useful.
Comment 3 Henry Hu 2018-02-06 04:50:44 UTC
Okay, it seems like that very recently OPUS is enabled by default in PR 225511. The recording should now work with default options. Please have a try.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-24 05:20:35 UTC
Henry, Lapo,

Is this still an issue? Should the patch be committed, or it isn't needed?

Yuri
Comment 5 Henry Hu 2018-02-24 06:26:18 UTC
(In reply to Yuri Victorovich from comment #4)
I think that it should be resolved now, but I'm still waiting for reporter's reply.
Comment 6 Lapo Luchini 2018-02-26 10:14:56 UTC
I just tried it again, and it seems to be working correctly.

It's sending a "mute" audio, but I guess that's my mic line's configuration to blame. (unfortunately, I don't have time to check in deeper right now)