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 618098 - [rmdemux] Add descrambling for Sipro codec
[rmdemux] Add descrambling for Sipro codec
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal blocker
: 0.10.15
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-08 10:49 UTC by أحمد المحمودي (Ahmed El-Mahmoudy)
Modified: 2010-05-26 07:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
additional improvement (5.58 KB, patch)
2010-05-14 14:11 UTC, Wim Taymans
committed Details | Review

Description أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-08 10:49:55 UTC
Hello,

  I have several RealMedia files that use Sipro codec, but gstreamer fails to play those files. I tried to play using the following command:

gst-launch playbin uri=file:///home/ant1/Audio/othaymeen/aa0101-1a.rm

I got the following error:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstRMDemux:rmdemux0: GStreamer encountered a general stream error.
Additional debug info:
rmdemux.c(942): gst_rmdemux_loop (): /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstRMDemux:rmdemux0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

A sample file can be found on : 
http://www.binothaimeen.com/sound/snd/a0101/a0101-1a.rm
Comment 1 Edward Hervey 2010-05-08 11:47:01 UTC
This requires descrambling support for Sipro in rmdemux.
Comment 2 michel.memeteau 2010-05-12 10:23:32 UTC
hello, i'm also Surprised that ubuntu Lucid Gstreamer does not decode Sipr as it's in FFmpeg for few months.

is this a DeMux problem oor a codec issue ? 

gstreamer0.10-plugins-ugly (0.10.14-1)
Comment 3 Wim Taymans 2010-05-13 11:20:15 UTC
(In reply to comment #2)
> hello, i'm also Surprised that ubuntu Lucid Gstreamer does not decode Sipr as
> it's in FFmpeg for few months.
> 
> is this a DeMux problem oor a codec issue ? 
Probably both.

The sipr codec was not hooked up in gst-ffmpeg in the latest release. This will be fixed in the next release with this commit:

commit 0fb014fdbee3723db0ae5134aba97498c972c385
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Sat May 8 13:24:47 2010 +0200

    ffmpegcodecmap: Add mapping for SIPR

> 
> gstreamer0.10-plugins-ugly (0.10.14-1)

If Comment #1 is correct, then this is going to require 0.10.15 of -ugly. I'll investigate next.
Comment 4 Edward Hervey 2010-05-13 11:29:35 UTC
FWIW, The realaudio plugin (wrapping the Real binary codecs) should also handle SIPR once the stream is unscrambled.
Comment 5 أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-13 12:54:53 UTC
Does that mean that git tip of -ugly already does the descrambling ? And hence can play SIPR codecs ?
Comment 6 Wim Taymans 2010-05-13 14:10:52 UTC
(In reply to comment #5)
> Does that mean that git tip of -ugly already does the descrambling ? And hence
> can play SIPR codecs ?

no, this bug will be closed when git handles the file completely.
Comment 7 Wim Taymans 2010-05-13 15:59:47 UTC
plays fine after this commit:

commit a68951f0bbd2f7ff34b7c83c93adc29166ad08df
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Thu May 13 17:57:57 2010 +0200

    rmdemux: descramble SIPR before pushing out
    
    Collect and descramble the SIPR packets before pushing.
    Descramble ATRAC audio.
    
    Fixes #618098
Comment 8 أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-14 05:07:01 UTC
Hello,

  I just got the git tip of gst-plugins-ugly & common. Built & tried it, and I still have the same error (except that the error now comes from line 940 instead of 942).
Comment 9 Wim Taymans 2010-05-14 14:09:31 UTC
(In reply to comment #8)
> Hello,
> 
>   I just got the git tip of gst-plugins-ugly & common. Built & tried it, and I
> still have the same error (except that the error now comes from line 940
> instead of 942).

Did you update gst-ffmpeg too?
Comment 10 Wim Taymans 2010-05-14 14:11:33 UTC
Created attachment 161057 [details] [review]
additional improvement

Previous patch contained some ffmpeg code without proper attribution. This patch contains rewritten nibble swap code that should also be much faster. Contains a little test unit too.
Comment 11 Wim Taymans 2010-05-14 14:15:56 UTC
commit 4044046ac178fa3a34bc08fa32816b9e10b63d2f
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri May 14 16:02:47 2010 +0200

    rmdemux: add better sipr nibble swap routine
Comment 12 أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-14 14:22:41 UTC
Yes, I did build git tip of ffmpeg too (using the same method done for -ugly), and the problem still persists.

I will try your patch now.
Comment 13 أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-14 15:26:42 UTC
Ok, so my problem was that -ffmpeg was built using --with-system-ffmpeg. So I disabled that option, and now the file plays using the following command:
gst-launch  filesrc location=/home/ant1/Audio/othaymeen/sharh_momte3/01/a0101-1a.rm   ! rmdemux ! ffdec_sipr ! pulsesink

But if I play using playbin (or playbin2):
gst-launch playbin2 uri=file:///home/ant1/Audio/othaymeen/sharh_momte3/01/a0101-1a.rm

I still get the same error:
ERROR: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstRMDemux:rmdemux0: GStreamer encountered a general stream error.
Additional debug info:
rmdemux.c(942): gst_rmdemux_loop (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstRMDemux:rmdemux0:
stream stopped, reason not-negotiated
Comment 14 أحمد المحمودي (Ahmed El-Mahmoudy) 2010-05-26 07:18:36 UTC
Hello,

  My problem turned out to be because realaudiodec (in -bad) had same rank as ffdec_sipr. That got fixed by Tim-Philipp Müller in commit dc2efe2d24f48e70dbbc8e27568d1187111324fc . Thanks !