LINUX.ORG.RU

gstreamer-1.0 mp3

 ,


1

1

Имею CentOS release 6.4 (Final) 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Собрал gstreamer 1.2 и плагины

  • gst-plugins-ugly
  • gst-plugins-bad
  • gst-plugins-good
  • gst-plugins-base
  • gst-libav
gst-inspect-1.0 | grep mp3
libav:  avdec_mp3: libav MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3float: libav MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3adu: libav ADU (Application Data Unit) MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3adufloat: libav ADU (Application Data Unit) MP3 (MPEG audio layer 3) decoder
libav:  avdec_mp3on4: libav MP3onMP4 decoder
libav:  avdec_mp3on4float: libav MP3onMP4 decoder
libav:  avmux_mp3: libav MP3 (MPEG audio layer 3) formatter (not recommended, use id3v2mux instead)
typefindfunctions: application/x-id3v2: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: application/x-id3v1: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: application/x-apetag: mp3, ape, mpc, wv
typefindfunctions: audio/mpeg: mp3, mp2, mp1, mpga

Но чего то не хватает

gst-launch-1.0 filesrc location="dance.mp3" ! decodebin ! audioconvert ! audioresample ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: MPEG-1 Layer 3 (MP3) decoder
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(3896): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:
no suitable plugins found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Подскажите, что я забыл ?

gst-inspect-1.0 avdec_mp3 will show you that it has a rank of 0, which means playbin and decodebin won't consider it for autoplugging. This is mostly for historical reasons, we should probably retest and reconsider this and give this element a rank.

You need to install either the 'mad' element/plugin from gst-plugins-ugly (note: GPL run-time license), or the mpg123audiodec element from gst-plugins-bad. Or change the gst-libav source code to give avdec_mp3 a rank of GST_RANK_SECONDARY or so.

http://gstreamer-devel.966125.n4.nabble.com/Problem-with-playbin-and-quot-Mis... Гуглится же.

Krieger_Od ★★
()
Ответ на: комментарий от Krieger_Od
gst-inspect avdec_mp3
Factory Details:                                                                      
  Rank                     secondary (128)                                            
  Long-name                libav MP3 (MPEG audio layer 3) decoder                     
  Klass                    Codec/Decoder/Audio                                        
  Description              libav mp3 decoder                                          
  Author                   Wim Taymans <wim.taymans@gmail.com>, Ronald Bultje <rbultje@ronald.bitfreak.net>, Edward Hervey <bilboed@bilboed.com>

Plugin Details:
  Name                     libav
  Description              All libav codecs and formats (local snapshot)
  Filename                 /usr/lib/gstreamer-1.0/libgstlibav.so        
  Version                  1.2.0                                        
  License                  GPL                                          
  Source module            gst-libav                                    
  Binary package           libav                                        
  Origin URL               http://www.libav.org                         

GObject
 +----GInitiallyUnowned
       +----GstObject  
             +----GstElement
                   +----GstAudioDecoder
                         +----avdec_mp3

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      audio/x-raw
                 layout: interleaved
                 format: { S16LE, S16LE }

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      audio/mpeg
            mpegversion: 1
                  layer: [ 1, 3 ]


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_audio_decoder_change_state

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Implementation:
      Has chainfunc(): gst_audio_decoder_chain
      Has custom eventfunc(): gst_audio_decoder_sink_event
      Has custom queryfunc(): gst_audio_decoder_sink_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'sink'
  SRC: 'src'
    Implementation:
      Has custom eventfunc(): gst_audio_decoder_src_event
      Has custom queryfunc(): gst_audio_decoder_src_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "avdec_mp3-0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  min-latency         : Aggregate output data to a minimum of latency time (ns)
                        flags: readable, writable
                        Integer64. Range: 0 - 9223372036854775807 Default: 0
  tolerance           : Perfect ts while timestamp jitter/imperfection within tolerance (ns)
                        flags: readable, writable
                        Integer64. Range: 0 - 9223372036854775807 Default: 0
  plc                 : Perform packet loss concealment (if supported)
                        flags: readable, writable
                        Boolean. Default: false
gst-launch-1.0 filesrc location="dance.mp3" ! decodebin ! audioconvert ! audioresample ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

** (gst-launch-1.0:7890): CRITICAL **: gst_audio_decoder_finish_frame: assertion 'buf == NULL || GST_AUDIO_INFO_IS_VALID (&ctx->info)' failed
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/avdec_mp3:avdec_mp3-0: GStreamer error: negotiation problem.
Additional debug info:
gstavauddec.c(443): gst_ffmpegauddec_negotiate (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/avdec_mp3:avdec_mp3-0:
Could not set caps for libav decoder (mp3), not fixed?
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Caught SIGSEGV
#0  0x0000003cc720e054 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x0000003cc72093a3 in _L_lock_892 () from /lib64/libpthread.so.0
#2  0x0000003cc7209287 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00007f5d8d1ac4a8 in post_activate (pad=0x7f5d8000c4f0, mode=GST_PAD_MODE_PUSH, active=0) at gstpad.c:904
#4  gst_pad_activate_mode (pad=0x7f5d8000c4f0, mode=GST_PAD_MODE_PUSH, active=0) at gstpad.c:1088
#5  0x00007f5d8d1acd0d in gst_pad_set_active (pad=0x7f5d8000c4f0, active=0) at gstpad.c:967
#6  0x00007f5d8d192ad4 in activate_pads (vpad=<value optimized out>, ret=0x7fff74275750, active=0x7fff742757bc) at gstelement.c:2687
#7  0x00007f5d8d19d6cc in gst_iterator_fold (it=0x20f13c0, func=0x7f5d8d192ab0 <activate_pads>, ret=0x7fff74275750, user_data=0x7fff742757bc) at gstiterator.c:614
#8  0x00007f5d8d1925e6 in iterator_activate_fold_with_resync (iter=0x20f13c0, func=0x7f5d8d192ab0 <activate_pads>, user_data=0x7fff742757bc) at gstelement.c:2707
#9  0x00007f5d8d19273d in gst_element_pads_activate (element=0x7f5d7404eb10, active=0) at gstelement.c:2752
#10 0x00007f5d8d192a9c in gst_element_change_state_func (element=0x7f5d7404eb10, transition=<value optimized out>) at gstelement.c:2815
#11 0x00007f5d8bc5e8c4 in gst_audio_decoder_change_state (element=0x7f5d7404eb10, transition=GST_STATE_CHANGE_PAUSED_TO_READY) at gstaudiodecoder.c:2471
#12 0x00007f5d8d18e9dc in gst_element_change_state (element=<value optimized out>, transition=<value optimized out>) at gstelement.c:2602
#13 0x00007f5d8d1918c0 in gst_element_set_state_func (element=0x7f5d7404eb10, state=GST_STATE_NULL) at gstelement.c:2558
#14 0x00007f5d8d177865 in gst_bin_element_set_state (element=0x20ea0e0, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:2325
#15 gst_bin_change_state_func (element=0x20ea0e0, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:2648
#16 0x00007f5d8c0b5163 in gst_decode_bin_change_state (element=0x20ea0e0, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstdecodebin2.c:4473
#17 0x00007f5d8d18e9dc in gst_element_change_state (element=<value optimized out>, transition=<value optimized out>) at gstelement.c:2602
#18 0x00007f5d8d1918c0 in gst_element_set_state_func (element=0x20ea0e0, state=GST_STATE_NULL) at gstelement.c:2558
#19 0x00007f5d8d177865 in gst_bin_element_set_state (element=0x2102050, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:2325
#20 gst_bin_change_state_func (element=0x2102050, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstbin.c:2648
#21 0x00007f5d8d1b1694 in gst_pipeline_change_state (element=0x2102050, transition=GST_STATE_CHANGE_READY_TO_NULL) at gstpipeline.c:471
#22 0x00007f5d8d18e9dc in gst_element_change_state (element=<value optimized out>, transition=<value optimized out>) at gstelement.c:2602
#23 0x00007f5d8d1918c0 in gst_element_set_state_func (element=0x2102050, state=GST_STATE_NULL) at gstelement.c:2558
#24 0x0000000000404767 in main (argc=11, argv=0x7fff742762a8) at gst-launch.c:1148
Spinning.  Please run 'gdb gst-launch-1.0 7890' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
^\Выход
shadowmaster63
() автор топика

Собрать libav с поддержкой mp3?

В redhat mp3 нет.

Покажи вывод avconv -codecs.

fopen ★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.