#1008840 linphone: Recording does not work due to lack of mkv support

#1008840#5
Date:
2022-04-02 14:23:34 UTC
From:
To:
Dear Maintainer,

as a side note, even though reportbug reports that there is a newer version of linphone (4.4.21-2) for stable, I cannot install it. apt does not find it, rmadison has even two entries:

rd@h370:~$ apt-cache policy linphone
linphone:
  Installiert:           4.2.5-3
  Installationskandidat: 4.2.5-3
  Versionstabelle:
 *** 4.2.5-3 500
        500 http://ftp-stud.hs-esslingen.de/debian bullseye/main amd64 Packages
        500 http://ftp-stud.hs-esslingen.de/debian bullseye/main i386 Packages
        100 http://deb.debian.org/debian sid/main amd64 Packages
        100 http://deb.debian.org/debian sid/main i386 Packages
        105 http://deb.debian.org/debian bookworm/main amd64 Packages
        105 http://deb.debian.org/debian bookworm/main i386 Packages
        100 /var/lib/dpkg/status
rd@h370:~$ rmadison linphone
linphone   | 3.6.1-2.4     | oldoldoldstable | source
linphone   | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel, armhf, i386
linphone   | 3.6.1-3       | oldoldstable    | source, amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone   | 3.12.0-3      | oldstable       | source, amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone   | 4.2.5-3       | stable          | all
linphone   | 4.2.5-3       | testing         | all
linphone   | 4.2.5-3       | unstable        | all
linphone   | 4.4.21-2      | stable          | source
linphone   | 4.4.21-2      | testing         | source
linphone   | 4.4.21-2      | unstable        | source
linphone   | 4.4.21-2      | unstable-debug  | source
rd@h370:~$

But the real problem is that linphone's recording feature pretends that it works normally, but if I checked the destination folder it is empty.

If I run with --verbose, I get

[Error]Core:linphone: Cannot record in mkv format, not supported in this build.

which suggests that linphone was built w/o mkv support.

Can you confirm that?

Previously the recording were in wav format. Is it possible to switch back to wav, if mkv is troublesome?

At least the user should get a warning that the recording does not work.

Thanks
Rainer

#1008840#10
Date:
2022-04-02 16:18:09 UTC
From:
To:
X-Debbugs-CC: Rainer Dorsch <ml@bokomoko.de>

This is most likely due to a package renaming.  Can you try running?:

  rmadison -S linphone

The CLI version is now in "linphone-cli" and the Qt version (which was
formerly in "linphone") is now in "linphone-desktop".  "linphone" from
now on only exists as a source package name.  But the 4.2.5-3
"linphone" transitional package should still show up under bullseye.
The versioning is confusing because the desktop app and the core
libraries (of which the CLI version is a component) are not versioned
according to the same scheme.

Yes.  Version 4.3.2 of linphone-desktop and its dependencies have been
packaged already in Salsa, are waiting for an upload and are planned
to ship with Matroska support.

You can try to record in WAV by supplying a file name that ends in
".wav".  If that does not work then I don't know what can be done
besides waiting.

Regards.

#1008840#15
Date:
2022-04-02 18:27:19 UTC
From:
To:
Many thanks for the super fast reply.

Am Samstag, 2. April 2022, 18:18:09 CEST schrieben Sie:

Ok, that makes sense.

rd@h370:~$ rmadison -S linphone
liblinphone++10        | 4.4.21-2      | stable          | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++10        | 4.4.21-2      | testing         | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++10        | 4.4.21-2      | unstable        | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++10-dbgsym | 4.4.21-2      | stable-debug    | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++10-dbgsym | 4.4.21-2      | testing-debug   | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++10-dbgsym | 4.4.21-2      | unstable-debug  | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone++9         | 3.12.0-3      | oldstable       | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone++9-dbgsym  | 3.12.0-3      | oldstable-debug | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone-dev        | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
liblinphone-dev        | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone-dev        | 3.12.0-3      | oldstable       | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone-dev        | 4.4.21-2      | stable          | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone-dev        | 4.4.21-2      | testing         | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone-dev        | 4.4.21-2      | unstable        | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10          | 4.4.21-2      | stable          | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10          | 4.4.21-2      | testing         | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10          | 4.4.21-2      | unstable        | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10-dbgsym   | 4.4.21-2      | stable-debug    | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10-dbgsym   | 4.4.21-2      | testing-debug   | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone10-dbgsym   | 4.4.21-2      | unstable-debug  | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
liblinphone5           | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
liblinphone5           | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone9           | 3.12.0-3      | oldstable       | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
liblinphone9-dbgsym    | 3.12.0-3      | oldstable-debug | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
libmediastreamer-base3 | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
libmediastreamer-base3 | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
libmediastreamer-dev   | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
libmediastreamer-dev   | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
libortp-dev            | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
libortp-dev            | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
libortp9               | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
libortp9               | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone               | 3.6.1-2.4     | oldoldoldstable | source
linphone               | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
linphone               | 3.6.1-3       | oldoldstable    | source, amd64,
arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone               | 3.12.0-3      | oldstable       | source, amd64,
arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone               | 4.2.5-3       | stable          | all
linphone               | 4.2.5-3       | testing         | all
linphone               | 4.2.5-3       | unstable        | all
linphone               | 4.4.21-2      | stable          | source
linphone               | 4.4.21-2      | testing         | source
linphone               | 4.4.21-2      | unstable        | source
linphone               | 4.4.21-2      | unstable-debug  | source
linphone-cli           | 4.4.21-2      | stable          | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-cli           | 4.4.21-2      | testing         | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-cli           | 4.4.21-2      | unstable        | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-cli-dbgsym    | 4.4.21-2      | stable-debug    | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-cli-dbgsym    | 4.4.21-2      | testing-debug   | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-cli-dbgsym    | 4.4.21-2      | unstable-debug  | amd64, arm64,
armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
linphone-common        | 3.6.1-2.4     | oldoldoldstable | all
linphone-common        | 3.6.1-3       | oldoldstable    | all
linphone-common        | 3.12.0-3      | oldstable       | all
linphone-common        | 4.4.21-2      | stable          | all
linphone-common        | 4.4.21-2      | testing         | all
linphone-common        | 4.4.21-2      | unstable        | all
linphone-dbg           | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
linphone-dbg           | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone-dbgsym        | 3.12.0-3      | oldstable-debug | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone-nogtk         | 3.6.1-2.4+b1  | oldoldoldstable | amd64, armel,
armhf, i386
linphone-nogtk         | 3.6.1-3       | oldoldstable    | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone-nogtk         | 3.12.0-3      | oldstable       | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
linphone-nogtk         | 4.4.21-2      | stable          | all
linphone-nogtk         | 4.4.21-2      | testing         | all
linphone-nogtk         | 4.4.21-2      | unstable        | all
linphone-nogtk-dbgsym  | 3.12.0-3      | oldstable-debug | amd64, arm64,
armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
rd@h370:~$

Do you think 4.3.2 builds also on bullseye or does it have dependencies, which
are not in bullseye?

Hmm....I just configured the path for in Settings->User Interface. Can you tell
where I can configure the file name?

Many thanks again
Rainer

#1008840#20
Date:
2022-04-02 19:54:03 UTC
From:
To:
X-Debbugs-CC: Rainer Dorsch <ml@bokomoko.de>

I just looked at the code and the ".mkv" suffix is hard-coded in the
Qt version, so currently there is no way to record in WAV despite
Mediastreamer2 supporting it.  The command line version ("linphonec")
still supports it with the "record" command.  I'll add this to the
list of things to bring up once I get around to discussing bugs with
the upstream developers.

A work-around can be to record straight from the Pulseaudio monitor of
an on-going call (oggenc is part of vorbis-tools):

  pacmd list-sink-inputs # the index for Linphone was 58
  parec --monitor-stream=58 | oggenc -o /tmp/linphone.ogg --raw -

The volume may need to be cranked up quite high.  Working with
Pulseaudio like this can also get somewhat finicky.

Regards

#1008840#25
Date:
2022-04-02 20:11:20 UTC
From:
To:
Oops, forgot something:

It should work and a backport is planned.

Regards.

#1008840#30
Date:
2022-04-02 20:24:49 UTC
From:
To:
Am Samstag, 2. April 2022, 21:54:03 CEST schrieben Sie:


Thanks for the analysis. Do you think it would be sufficient to replace the .mkv
with .wav in ./linphone-app/src/components/call/CallModel.cpp

void CallModel::setRecordFile (const shared_ptr<linphone::CallParams>
&callParams) {
  callParams->setRecordFile(Utils::appStringToCoreString(
    CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
      .append(generateSavedFilename())
      .append(".mkv")     // <=== replace by .wav????
  ));
}

void CallModel::setRecordFile (const shared_ptr<linphone::CallParams>
&callParams, const QString &to) {
  const QString from(
    QString::fromStdString(
      CoreManager::getInstance()->getAccountSettingsModel()-
    )
  );

  callParams->setRecordFile(Utils::appStringToCoreString(
    CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
      .append(generateSavedFilename(from, to))
      .append(".mkv")     // <=== replace by .wav????
  ));
}

and rebuild the Debian package?

Thanks
Rainer

#1008840#35
Date:
2022-04-02 21:17:27 UTC
From:
To:
X-Debbugs-CC: Rainer Dorsch <ml@bokomoko.de>

You'll have to find out by trying.  From my cursory reading
Mediastreamer2 determines the backend from the extension, so the
chances are somewhat high that it will work.  But I cannot say if
something else in linphone-desktop won't break, e.g. when trying to
append to an existing recording.

Regards.

#1008840#40
Date:
2022-04-03 15:50:35 UTC
From:
To:
I attempted to build with this patch:

rd@h370:~/tmp.nobackup/Debian/linphone-desktop-4.2.5$ cat debian/patches/0003-
wav_patch.patch
Description: Recording of calls does not work
 The default mkv format is not properly supported. Therefore wwitching back to
.wav files. See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008840
Author: Rainer Dorsch <dev@bokomoko.de>
Origin: other
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: linphone-desktop-4.2.5/linphone-app/src/components/call/CallModel.cpp
===================================================================
--- linphone-desktop-4.2.5.orig/linphone-app/src/components/call/CallModel.cpp
+++ linphone-desktop-4.2.5/linphone-app/src/components/call/CallModel.cpp
@@ -106,7 +106,7 @@ void CallModel::setRecordFile (const sha
   callParams->setRecordFile(Utils::appStringToCoreString(
     CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
       .append(generateSavedFilename())
-      .append(".mkv")
+      .append(".wav")
   ));
 }

@@ -120,7 +120,7 @@ void CallModel::setRecordFile (const sha
   callParams->setRecordFile(Utils::appStringToCoreString(
     CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
       .append(generateSavedFilename(from, to))
-      .append(".mkv")
+      .append(".wav")
   ));
 }

rd@h370:~/tmp.nobackup/Debian/linphone-desktop-4.2.5$

At least the basic recording feature works with this patch, something else I
have not tested (since I do not know the other features).

Just in case the package with the patch is useful for somebody else, you can
download it here:

http://bokomoko.de/~rd/Debian/linphone-desktop_4.2.5-3rdo1_amd64.deb

Many thanks.

Rainer

#1008840#45
Date:
2023-04-08 16:17:42 UTC
From:
To:
mediastreamer2 is built with bcmatroska2 from 1:5.0.37+dfsg-1 on. If
your use case still does not work in bookworm, please open a bug on one
of those packages.