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 155163 - [qtdemux] don't know audio FOURCC samr (from mobiles/3GPP files)
[qtdemux] don't know audio FOURCC samr (from mobiles/3GPP files)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.5
Other Linux
: Normal normal
: 0.8.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 163286 (view as bug list)
Depends on:
Blocks: 138435
 
 
Reported: 2004-10-12 09:32 UTC by Ross Burton
Modified: 2005-01-28 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Hello Fluendo! (16.35 KB, application/octet-stream)
2005-01-13 12:22 UTC, Ross Burton
  Details
patch (13.10 KB, patch)
2005-01-27 19:56 UTC, Ronald Bultje
none Details | Review
additional qtdemux patch (2.62 KB, patch)
2005-01-28 00:27 UTC, Ronald Bultje
none Details | Review

Description Ross Burton 2004-10-12 09:32:00 UTC
3GP movies from new mobile phones are H.263 video and AMR audio, and don't play
in GStreamer.  I tried and got this:

don't know how to handle video/x-gst-fourcc-s263, width=(int)176,
height=(int)144, framerate=(double)2.8089888095855713

don't know how to handle audio/x-gst-fourcc-samr, rate=(int)8000, channels=(int)2

http://bugzilla.gnome.org/show_bug.cgi?id=142385 contains some references to
Xine fixes and a sample file.  I can provide more samples on demand.
Comment 1 Stephane Loeuillet 2004-12-13 00:12:46 UTC
s323 decoding should work : ffdec_h263[i] should do the trick
it just looks like the "s263" FOURCC should be added in avidemux to video/x-h263

-----------------------------------------------------------

for audio ("samr"), gst-ffmpeg has this 'CODEC_ID_AMR_NB'

    case CODEC_ID_AMR_NB:
    case CODEC_ID_AMR_WB:
      /* what's this? ffmpeg uses external libs here that we don't include
       * so there's no point in defining those. Still, I want to know what
       * it actually is... */
      break;

so, good news for ronald, we know what it is, some mobile specific audio format
Comment 2 Stephane Loeuillet 2004-12-13 00:25:46 UTC
adding the 's323' => 'video/x-h323' mapping in gst-plugins avidemux/libriff now

AFAIK, AMR support in mplayer comes from a windows driver/dll
Comment 3 Stephane Loeuillet 2004-12-13 00:53:18 UTC
added it to qtdemux too
Comment 4 Stephane Loeuillet 2004-12-13 00:55:15 UTC
changing title as this file was played using qtdemux
Comment 5 Stephane Loeuillet 2004-12-13 01:14:15 UTC
bad news, adding s323 => video/x-h323 wasn't enought

ERROR (0x84be1c8 - 306361:25:55.308763000)          ffmpeg( 3593) (0):: Intel
H263 free format not supported
ERROR (0x84be1c8 - 306361:25:55.308922000)          ffmpeg( 3593) (0):: header
damaged
ERROR (0x84be1c8 - 306361:25:55.309080000)         default( 3593)
gstffmpegdec.c(481):gst_ffmpegdec_chain:<ffdec_h263i0> ffdec_h263i: decoding error

plus it complains for the following :
ERROR (0x84be1c8 - 306361:25:54.922253000)         qtdemux( 3593)
qtdemux.c(1396):qtdemux_type_get: unknown QuickTime node type iods/s263/sarm

someone would have to finish this
Comment 6 David Schleef 2004-12-13 18:13:36 UTC
AVI and Quicktime don't necessarily use the same fourcc values.
Comment 7 Ronald Bultje 2004-12-19 23:44:57 UTC
ffdec_h263 can play the stream. FFMpeg has two h263 decoders, however,
ffdec_h263 and ffdec_h263. Don't know how the other is different. I've removed
the rank from ffdec_h263i in gst-ffmpeg so video plays now.

For audio, there's some reference code available to play AMR audio. I'll see if
I can build a plugin sometime. See 3gpp.org for the reference code (note that
they've got millions of .zip files, see ffmpeg's configure file for the files
containing the actual reference sources).

Fun though, the caps claims channels=2, although the specs only allow mono sound.
Comment 8 Ronald Bultje 2004-12-23 22:21:12 UTC
I have a working plugin, or well, let's say that it compiles and decodes
audio... However, I hear absolutely nothing. I get silence, mere silence,
nothing more. Can you provide me with a sample that has sound and plays sound in
some other media player?
Comment 9 Christian Fredrik Kalager Schaller 2005-01-13 12:03:27 UTC
Ross, do you have a sample file for us? In your opened hand?
Comment 10 Ross Burton 2005-01-13 12:21:32 UTC
Boom boom...

Attaching a 3GP file just recorded on my Sony Ericsson K700i.
Comment 11 Ross Burton 2005-01-13 12:22:01 UTC
Created attachment 35946 [details]
Hello Fluendo!
Comment 12 Ronald Bultje 2005-01-27 13:59:05 UTC
*** Bug 163286 has been marked as a duplicate of this bug. ***
Comment 13 Ronald Bultje 2005-01-27 13:59:40 UTC
Bug #163286 contains a first attempt at an AMR decoder of mine. Needs work...
Comment 14 Ronald Bultje 2005-01-27 19:56:49 UTC
Created attachment 36611 [details] [review]
patch

This patch implements a working AMR-narrowband decoder. It depends on the
reference library, which I've packaged in .tar.gz and .src.rpm on by website:
http://ronald.bitfreak.net/priv/amrnb-0.0.1.tar.gz
http://ronald.bitfreak.net/priv/amrnb-0.0.1-1.src.rpm

Using this plugin and the pipeline "gst-launch filesrc
location=/home/rbultje/Media/bugs/155163.3gp ! ffdemux_mov_mp4_m4a_3gp name=d {
d. ! queue ! ffdec_h263 ! ffmpegcolorspace ! xvimagesink } { d. ! queue !
amrnbdec ! audioconvert ! osssink }", I get sound. Now, there's a lot of buts:
* alsasink validly skips all data because the timestamps are messed up, so you
need osssink to hear anything.
* qtdemux spews out 200-byte chunks instead of 1600-byte chunks, which makes it
not work, therefore you need the ffmpeg qt demuxer.
I'll look at qtdemux later, I'm tired right now and very annoyed that it took
so long to get it working.
Comment 15 Ronald Bultje 2005-01-28 00:27:00 UTC
Created attachment 36631 [details] [review]
additional qtdemux patch

This patch needs to be applied to qtdemux.c, and fixes #140141 and #143555,
too. Timestamps are apparently not valid for AMR, so they're disabled. Weird
format...

Waiting for some peer review before I apply.
Comment 16 Ronald Bultje 2005-01-28 10:35:37 UTC
Applied.