dpurgin / harbour-callrecorder

A call recorder for SailfishOS
GNU General Public License v3.0
24 stars 17 forks source link

Ability to reencode older recordings with other codec #5

Open Beeki00 opened 10 years ago

Beeki00 commented 10 years ago

Spacewise it might make sense to be able to re-encode older recordings with another codec.

Not really sure about ui, might be manual selection of recordings or select everything with (default encoder and cutoff date). Should be able to select the codec and it's settings.

Could be an automatic thing, possibly activated when some user-configurable amount of space is used by recordings.

dpurgin commented 10 years ago

Thanks for suggestion.

Meanwhile I was thinking about defaulting to lower quality encoding (it's redundandtly high now, 44.1kHz, 16 bit) and allowing user to set the desired encoding options.

Beeki00 commented 10 years ago

Default quality is quite ridiculous at the moment, much more than the base encoders.

Still there might be some value for "arcihve-quality" recodings.

misieck commented 8 years ago

Opus @ 24kbps encodes the recorded the 32kHz flacs with almost no loss of fidelity (i.e. telephone quality). This means 8-10 times less used space. In most of my recordings 16kbps was not significantly different from the original. Even at 8kbps the difference is clear, but the recording is still fully functional with voices being easily recognizable and intelligible. After all, it was designed for low bit-rate voip, which is exactly the use case here.

dpurgin commented 8 years ago

Thanks for suggestion but let me explain why FLAC is used in the first place.

FLAC was chosen back then because it is supported by default Sailfish Media player (more generally by gstreamer backend of QtMultimedia) and is playable on desktop PC as well, i.e. one doesn't need Call Recorder to listen to the recordings, and the corresponding playback implementation in Call Recorder itself was fairly straight-forward. There were also problems with encoding raw audio data with QtMultimedia in early versions of Sailfish when the Call Recorder was first implemented, that's why libFLAC was used for encoding.

Current encoder settings may be safely reduced to 8 kHz now as the newer version of gstreamer in Sailfish has fixed playback of low-rate FLAC files, this leads to much smaller recording files.

misieck commented 8 years ago

8khz will noticeably deteriorate the recording quality, compared to 16kbps opus recording, while reducing the file size only by factor 2 or so. You could bundle the opusenc binary with the app to give the option to the user. Even if the files won't be playable on the phone out of the box, the space savings and quality of recordings will surely be worth it to many users.

ghost commented 8 years ago

I'm not sure if "this application records your phone calls, but you can't actually listen to them" is a good selling point.

misieck commented 8 years ago
  1. I can listen to opus files with the Media app*. Opus is the way of the future and will became mainstream sooner or later.
  2. I propose an option to add opus to selectable codecs, not to replace flac.
  3. Supporting the state of the art codec for speech is a very good selling point.
  4. Even if you couldn't listen to it on the phone, you can still unload it to the pc. The quality and tiny file sizes are worth the effort for many people.

If you haven't tried it yet, you can do it by: opusenc -b 18 input.flac output.opus

*I'm not sure if support is native or did it help to install opus libs from the warehouse.