gstreamer play mp3 problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gstreamer play mp3 problem

3,693 Views
Tony_Luo
Contributor II

Hi all,

    I want to play mp3 on sabrelite running LTIB using gstreamer,what i refer is "i.MX_6_Ubuntu_Multimedia_User_Guide.pdf", and the linux BSP version is "L3.0.35_4.0.0",I try two ways:


1) gst-launch filesrc location=test.mp3 typefind=true ! beepdec ! audioconvert  ! 'audio/x-raw-int, channels=2' ! alsasink

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

** (gst-launch-0.10:3249): CRITICAL **: gst_beepdec_chain: assertion `beepdec->handle' failed

ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error.

Additional debug info:

gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:

streaming task paused, reason not-negotiated (-4)

ERROR: pipeline doesn't want to preroll.

Setting pipeline to NULL ...

Freeing pipeline ...

crash and quit.

2) gst-launch playbin2 uri=file:///mnt/test.mp3 audio-sink="alsasink"

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

Beep: 3.0.7

Core: MP3 decoder Wrapper  build on Mar 15 2013 09:57:40

  mime: audio/mpeg, mpegversion = (int)1

  file: /usr/lib/imx-mm/audio-codec/wrap/lib_mp3d_wrap_arm12_elinux.so

CODEC: BLN_MAD-MMCODECS_MP3D_ARM_02.13.00_CORTEX-A8  build on Dec  5 2012 09:45:19.

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

New clock: GstAudioSinkClock


success.


Can someone tell me what wrong with the 1st way? Thanks!

0 Kudos
4 Replies

1,552 Views
LeonardoSandova
Specialist I

Probably the mp3 is a container, so you need a demuxer before decoding. You can see what elements are being instantiated by playbin2 with --gst-debug=GST_ELEMENT_FACTORY:3

Leo

0 Kudos

1,552 Views
Tony_Luo
Contributor II

thanks Leo,

    I add the params of "--gst-debug=GST_ELEMENT_FACTORY:3", and get the below message:

0:00:00.060519313  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "playbin2"
0:00:00.073615317  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "alsasink"
0:00:00.075104650  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "bin"

Setting pipeline to PAUSED ...

0:00:00.077509984  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "uridecodebin"
0:00:00.080884985  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "filesrc" named "source"
0:00:00.081628985  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "decodebin2"
0:00:00.082183985  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "typefind" named "typefind"
0:00:00.568129985  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "id3demux"
0:00:00.600694985  26540x17050 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "mpegaudioparse"

Pipeline is PREROLLING ...

0:00:00.606165651  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "beepdec.mp3"
0:00:00.609144652  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:375:gst_element_factory_create: creating element "input-selector"
0:00:00.610065652  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "tee" named "audiotee"
0:00:00.610972319  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "bin" named "abin"
0:00:00.611159985  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "queue" named "aqueue"
0:00:00.612864652  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "audioconvert" named "aconv"
0:00:00.614820318  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "audioresample" named "aresample"
0:00:00.617156318  26540x7d290 INFO GST_ELEMENT_FACTORY gstelementfactory.c:373:gst_element_factory_create: creating element "volume" named "volume"

Beep: 3.0.7

Core: MP3 decoder Wrapper  build on Mar 15 2013 09:57:40

  mime: audio/mpeg, mpegversion = (int)1

  file: /usr/lib/imx-mm/audio-codec/wrap/lib_mp3d_wrap_arm12_elinux.so

CODEC: BLN_MAD-MMCODECS_MP3D_ARM_02.13.00_CORTEX-A8  build on Dec  5 2012 09:45:19.

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

New clock: GstAudioSinkClock

But I don't know how to exactly create the pipeline, whould you give me some advise please?

0 Kudos

1,552 Views
LeonardoSandova
Specialist I

filesrc typefind=true ! id3demux ! mpegaudioparse ! beeddec ! audioconvert ! audioresample ! alsasink

*bin elements are element containers and playbin2 can be seen as a single element....

0 Kudos

1,552 Views
Tony_Luo
Contributor II

Hi Leon,

    Thanks for your help, I follow you advice and encounter the below problem:

root@freescale ~$ gst-launch filesrc location=/mnt/test.mp3 typefind=true ! id3demux ! mpegaudioparse ! beepdec ! audioconvert ! audioresample ! alsasink

Setting pipeline to PAUSED ...

Caught SIGSEGV accessing address (nil)

Spinning.  Please run 'gdb gst-launch 2636' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

0 Kudos