After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598028 - support weird wav/adpcm files in a ".REC" format
support weird wav/adpcm files in a ".REC" format
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: dont know
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-10 17:45 UTC by Jean-François Fortin Tam
Modified: 2018-05-04 09:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample recording (633.06 KB, application/octet-stream)
2009-10-10 18:43 UTC, Jean-François Fortin Tam
Details

Description Jean-François Fortin Tam 2009-10-10 17:45:35 UTC
I have a trusty old iRiver IFP-180T, which I use as a voice recorder.

It creates some weird .REC files, which I so far used to convert with a binary called "ifprecconv", part of http://ifpgui.sf.net (docs here? http://ifpgui.sourcearchive.com/documentation/0.12.0-1/files.html), which uses sox, it seems.

Playing the .rec files in a gstreamer app such as totem yields audible but garbled sound, which gives me some hope that maybe it could be handled by gstreamer. I'm in no position to provide a patch, but filing this in the hope that perhaps gstreamer could support those files natively, which would be real nice.
Comment 1 Jean-François Fortin Tam 2009-10-10 17:50:30 UTC
Also, if it can be of help, sox gave this hint:

jeff@kusanagi:~/lala$ ./../ifprecconv VOICE000.REC 
I'm going to run 'play -r 32000 -c 1 -t raw -f s -w /dev/stdin'
Comment 2 Tim-Philipp Müller 2009-10-10 18:16:47 UTC
Could you provide a sample file?
Comment 3 Jean-François Fortin Tam 2009-10-10 18:43:08 UTC
Created attachment 145223 [details]
sample recording

Well damn, I thought I had attached it with the initial report. Here it is :) bugzilla probably freaked out on the mimetype, so I'm uploading it as "application/octet-stream".
Comment 4 Edward Hervey 2009-10-14 17:20:46 UTC
detected as : 

/data/sample.REC: RIFF (little-endian) data, WAVE audio, IMA ADPCM, mono 32000 Hz

gstreamer, mplayer and xine all play it garbled.
Comment 5 Edward Hervey 2009-10-14 17:25:37 UTC
Looks like ifpgui does some processing on the files:

http://ifpgui.cvs.sourceforge.net/viewvc/ifpgui/ifp_gui/src/ifprecconv/ifprecconv.c?revision=1.1.1.1&view=markup
Comment 6 Sebastian Dröge (slomo) 2009-10-15 04:06:47 UTC
Yes, not sure how we could automatically detect this though...
Comment 7 Jean-François Fortin Tam 2011-10-27 17:26:44 UTC
Just a note: sox's -w argument has been deprecated, the command should now be:

sox -r 32000 -c 1 -t raw -s -b 16 - foo.wav
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-19 09:11:03 UTC
We're now detecting this as "audio codec: DVI ADPCM audio", but it still sounds the same across gstreamer, mplayer, avplay and vlc. Also the sox command is just to play the decoded file.

I think the interesting part would be to compare
http://ifpgui.cvs.sourceforge.net/viewvc/ifpgui/ifp_gui/src/ifprecconv/adpcm.c?view=markup
with the code in gst-plugins-bad - adpcmdec
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2015-01-19 09:18:54 UTC
I found some sites [1] stating
"""
However, iRiver does not follow this standard exactly, so standard libraries (e.g. libsndfile) will not decode it correctly. On Windows, you can use the iRiver software to convert to a standard PCM WAV file. On Linux, you can use another open source project, ifprecconv.
"""
So, we'd need to implement this adpcm  variant in adpcmdec/enc, define a caps variant and we'd need to be able to somehow detect it. However I don't see any metadata in the file that we could use for detection :/ Shall we close this as WONTFIX?

[1] http://projects.csail.mit.edu/cgi-bin/wiki/view/SLS/IRiver
Comment 10 Edward Hervey 2018-05-04 09:05:57 UTC
Will this would be nice to support, it hasn't seen any activity in 3 years. And seems like a very particular use-case. If someone can provide a patch to properly detect and handle this, re-open this bug and provide patches.