<br><br><div class="gmail_quote">On Fri, Apr 27, 2012 at 1:13 AM, Stefan Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000"><div><div class="h5">
    On 04/26/2012 07:53 PM, Sree Gowri wrote:
    <blockquote type="cite">
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Wed, Apr 25, 2012 at 12:19 PM, Sree
          Gowri <span dir="ltr">&lt;<a href="mailto:sreegowris@gmail.com" target="_blank">sreegowris@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div class="gmail_extra"><br>
              <br>
              <div class="gmail_quote">
                <div>
                  <div>On Tue, Apr 24, 2012 at 9:42 PM, Sree
                    Gowri <span dir="ltr">&lt;<a href="mailto:sreegowris@gmail.com" target="_blank">sreegowris@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div class="gmail_extra"><br>
                        <br>
                        <div class="gmail_quote">
                          <div>
                            <div>On Tue, Apr 24, 2012 at 5:46 PM, Stefan
                              Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>&gt;</span>
                              wrote:<br>
                              <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                <div bgcolor="#ffffff" text="#000000">
                                  <div>
                                    <div> On 04/24/2012 11:18 AM, Sree
                                      Gowri wrote:
                                      <blockquote type="cite">
                                        <div class="gmail_extra"><br>
                                          <br>
                                          <div class="gmail_quote">On
                                            Mon, Apr 16, 2012 at 12:53
                                            AM, Stefan Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>&gt;</span>
                                            wrote:<br>
                                            <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                              <div bgcolor="#ffffff" text="#000000">
                                                <div> On 04/12/2012
                                                  06:23 AM, Sree Gowri
                                                  wrote:
                                                  <blockquote type="cite"><font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">Hi,<br>
                                                      <br>
                                                      I am trying to
                                                      extract audio
                                                      metadata like
                                                      streamurl,streamtitle,artist,genre,album.However
                                                      I am not able to
                                                      extract the
                                                      metadata using
                                                      GstTagList. Below
                                                      is the snippet of
                                                      the code. Does
                                                      anyone suggest
                                                      what are the
                                                      additions to be
                                                      done in order to
                                                      extract the
                                                      metadata?<br>
                                                      <br>
                                                      Only the following
                                                      data has been
                                                      extracted.<br>
                                                                  
                                                      layer: 3<br>
                                                                   mode:
                                                      joint<br>
                                                                  
                                                      emphasis: none<br>
                                                                   audio
                                                      codec: MPEG-1
                                                      layer 3<br>
                                                                  
                                                      bitrate: 128000<br>
                                                      <br>
                                                      Pipeline is as
                                                      follows:<br>
                                                      <br>
                                                      [code]<br>
                                                      app-&gt;pipeline=
                                                      gst_parse_launch(&quot;appsrc

                                                      name=mysource !
                                                      audio/mpeg  ! mad
                                                      !  alsasink&quot;,
                                                      NULL);<br>
                                                      [/code]<br>
                                                    </font></blockquote>
                                                </div>
                                                <font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">&quot;appsrc name=mysource !
                                                  audio/mpeg  ! </font>mp3parse
                                                <font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">! mad !  alsasink&quot;<br>
                                                  or even better<br>
                                                </font><font face="Default Sans
                                                  Serif,Verdana,Arial,Helvetica,sans-serif">&quot;appsrc

                                                  name=mysource !
                                                  audio/mpeg  !
                                                  decodebin2</font><font face="Default Sans
                                                  Serif,Verdana,Arial,Helvetica,sans-serif">
                                                  !  alsasink&quot;</font><br>
                                                <br>
                                                Stefan<br>
                                                <br>
                                                <blockquote type="cite">
                                                  <div>
                                                    <div><font face="Default
                                                        Sans
                                                        Serif,Verdana,Arial,Helvetica,sans-serif"><br>
                                                        Audio data fed
                                                        to the appsrc
                                                        element<br>
                                                        <br>
                                                        [code]<br>
                                                        buf =( GstBuffer
                                                        *)
                                                        gst_app_buffer_new
                                                        (data, READBUF,
                                                        g_free, data);<br>
                                                        g_signal_emit_by_name
                                                        (GST_APP_SRC
                                                        (app-&gt;appsrc),
                                                        &quot;push-buffer&quot;,
                                                        buf, &amp;ret);<br>
                                                        [/code]<br>
                                                        <br>
                                                        Bus message<br>
                                                        <br>
                                                        [code]<br>
                                                        case
                                                        GST_MESSAGE_TAG:<br>
                                                        {<br>
                                                            GstTagList
                                                        *tags = NULL;<br>
                                                                char
                                                        *artist;<br>
                                                               
                                                        gst_message_parse_tag
                                                        (message,
                                                        &amp;tags);<br>
                                                                g_print
                                                        (&quot;Got tags from
                                                        element %s:\n&quot;,
                                                        GST_OBJECT_NAME
(message-&gt;src));<br>
                                                                if
                                                        (gst_tag_list_get_string
                                                        (tags,
                                                        GST_TAG_ARTIST,
                                                        &amp;artist))<br>
                                                                {<br>
                                                                  
                                                        printf(&quot;got
                                                        artist:
                                                        %s\n&quot;,artist);<br>
                                                                }<br>
                                                                else<br>
                                                                {<br>
                                                                 
                                                        printf(&quot;no
                                                        artist!! \n&quot;);<br>
                                                                }<br>
                                                               
                                                        gst_tag_list_foreach
                                                        (tags,
                                                        print_tag,
                                                        NULL);<br>
                                                                g_print
                                                        (&quot;\n&quot;);<br>
                                                               
                                                        gst_tag_list_free
                                                        (tags);<br>
                                                                break;<br>
                                                        [/code]<br>
                                                        <br>
                                                        print_tag
                                                        function code<br>
                                                        [code]<br>
                                                        static void
                                                        print_tag (const
                                                        GstTagList *
                                                        list, const
                                                        gchar * tag,
                                                        gpointer unused)<br>
                                                        {<br>
                                                          gint i, count;<br>
                                                          count =
                                                        gst_tag_list_get_tag_size
                                                        (list, tag);<br>
                                                          for (i = 0; i
                                                        &lt; count; i++)
                                                        {<br>
                                                            gchar *str;<br>
                                                            if
                                                        (gst_tag_get_type
                                                        (tag) ==
                                                        G_TYPE_STRING) {<br>
                                                              if
                                                        (!gst_tag_list_get_string_index
                                                        (list, tag, i,
                                                        &amp;str))<br>
                                                               
                                                        g_assert_not_reached
                                                        ();<br>
                                                         <br>
                                                            } else {<br>
                                                              str =<br>
                                                                 
                                                        g_strdup_value_contents
                                                        (gst_tag_list_get_value_index
                                                        (list, tag, i));<br>
                                                            }<br>
                                                            if (i == 0)
                                                        {<br>
                                                              g_print
                                                        (&quot;  %15s: %s\n&quot;,
                                                        gst_tag_get_nick
                                                        (tag), str);<br>
                                                            } else {<br>
                                                              g_print
                                                        (&quot;                
                                                        : %s\n&quot;, str);<br>
                                                            }<br>
                                                            g_free
                                                        (str); <br>
                                                          }<br>
                                                        }<br>
                                                        [/code]<br>
                                                        <br>
                                                        Thanks and
                                                        Regards,<br>
                                                        Sree Gowri<br>
                                                      </font></div>
                                                  </div>
                                                </blockquote>
                                              </div>
                                            </blockquote>
                                            <div>      Hi stephan,<br>
                                              <br>
                                                    First would like to
                                              thank you for the input
                                              you provided.<br>
                                                  <br>
                                                    I tried both the
                                              pipelines that you have
                                              mentioned,however meta
                                              data has not been   
                                              extracted.<br>
                                                <br>
                                                   Kindly request you to
                                              let me know if there are
                                              any other changes that
                                              needs to be done.<br>
                                            </div>
                                          </div>
                                        </div>
                                      </blockquote>
                                      <br>
                                    </div>
                                  </div>
                                  Are you sure the stream you are
                                  looking at is tagged with such
                                  metadata? Try gst-launch-0.10 -t
                                  playbin2 uri=...<span><font color="#888888"><br>
                                      <br>
                                      Stefan</font></span></div>
                              </blockquote>
                            </div>
                          </div>
                          <div><br>
                               Yes the stream contains the metadata like
                            streamTitle, streamUrl. In order to check
                            does the stream really has metadata, appsrc
                            buffer is written to a file and checked
                            using hexedit and I can find the
                            metadata.Sure will try your suggestion
                            tomorrow and update you. Thankyou. <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <div> <br>
                      Regards,<br>
                      Sree Gowri <br>
                    </div>
                  </div>
                </div>
                <div><br>
                       Hi Stephan,<br>
                  <br>
                        gst-launch-0.10 -t playbin2 uri=.... is also not
                  extracting the metadata.<br>
                  <br>
                        Actually I am streaming the shoutcast
                  stream.Audio stream data is feed to the appsrc
                  element.<br>
                      Following is the header that is received<br>
                  <br>
                  ICY 200 OK^M<br>
                  icy-notice1:&lt;BR&gt;This stream requires &lt;a
                  href=&quot;<a href="http://www.winamp.com/" target="_blank">http://www.winamp.com/</a>&quot;&gt;Winamp&lt;/a&gt;&lt;BR&gt;^M<br>
                  icy-notice2:SHOUTcast Distributed Network Audio
                  Server/win32 v1.9.8&lt;BR&gt;^M<br>
                  icy-name:Radio Afsana Online 24/7 Radio - New - Remix:
                  Non-Stop^M<br>
                  icy-genre:Desi, Hindi , Bollywood, Fiji, Indian^M<br>
                  icy-url:<a href="http://www.radioafsana.com" target="_blank">http://www.radioafsana.com</a>^M<br>
                  content-type:audio/mpeg^M<br>
                  icy-pub:1^M<br>
                  icy-metaint:8192^M<br>
                  icy-br:128^M<br>
                  <br>
                  Metadata is available as &quot;StreamTitle=&#39;Aditi Singh
                  Sharma - Luv Ka The End - LUV KA THE END.&quot;<br>
                  However I am not able to extract the same.<br>
                  <br>
                  Also not able to extract the metadata for the
                  downloaded mp3 file using the following pipelines.
                  However the above command that you mentioned will
                  extract the metadata for the downloaded mp3 file
                  <div><br>
                    <br>
                    appsrc name=mysource ! audio/mpeg  ! mad !  alsasink<br>
                  </div>
                  <div>
                    appsrc name=mysource ! audio/mpeg  ! mp3parse ! mad
                    !  alsasink<br>
                  </div>
                  <div>appsrc name=mysource ! audio/mpeg  !
                    decodebin2 !  alsasink<br>
                    <br>
                  </div>
                  Your input would be of great help.<br>
                  <br>
                  Regards,<br>
                  Sree Gowri.<br>
                   </div>
                <div>
                  <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                    <div class="gmail_extra">
                      <div class="gmail_quote">
                        <div>
                          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                            <div bgcolor="#ffffff" text="#000000">
                              <div> <br>
                                <blockquote type="cite">
                                  <div class="gmail_extra">
                                    <div class="gmail_quote">
                                      <div> <br>
                                        <br>
                                         </div>
                                      <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                                        <div bgcolor="#ffffff" text="#000000">
                                          <blockquote type="cite">
                                            <div>
                                              <div><font face="Default
                                                  Sans
                                                  Serif,Verdana,Arial,Helvetica,sans-serif">
                                                </font> </div>
                                            </div>
                                            <pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
                                          </blockquote>
                                          <br>
                                        </div>
                                        <br>
_______________________________________________<br>
                                        gstreamer-devel mailing list<br>
                                        <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                                        <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                                        <br>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                  <pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                            <br>
_______________________________________________<br>
                            gstreamer-devel mailing list<br>
                            <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
                            <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
                            <br>
                          </blockquote>
                        </div>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                </div>
              </div>
              Hi Stephan,<br>
            </div>
          </blockquote>
          <div><br>
            I am still stuck with metadata parsing as mentioned earlier.
            Could you please help me.<br>
            <br>
            Thanks and Regards,<br>
            Sree Gowri <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    Just tried te winamp stream from <a href="http://www.radioafsana.com" target="_blank">http://www.radioafsana.com</a>
    and it works fine (use the uri from inside the listen.pls).<br>
    <br>
    Stefan<br>
    <br>
    gst-launch -t playbin2 uri=<a href="http://208.186.112.40:8000/" target="_blank">http://208.186.112.40:8000/</a><br>
    Setting pipeline to PAUSED ...<br>
    Pipeline is PREROLLING ...<br>
    FOUND TAG      : found by element &quot;source&quot;.<br>
        organization: Radio Afsana Online 24/7 Radio - New - Remix:
    Non-Stop<br>
               genre: Desi, Hindi , Bollywood, Fiji, Indian<br>
            location: <a href="http://www.radioafsana.com" target="_blank">http://www.radioafsana.com</a><br>
    FOUND TAG      : found by element &quot;icydemux0&quot;.<br>
        organization: Radio Afsana Online 24/7 Radio - New - Remix:
    Non-Stop<br>
               genre: Desi, Hindi , Bollywood, Fiji, Indian<br>
            location: <a href="http://www.radioafsana.com" target="_blank">http://www.radioafsana.com</a><br>
    FOUND TAG      : found by element &quot;mpegaudioparse0&quot;.<br>
         audio codec: MPEG 2 Audio, Layer 3 (MP3)<br>
     nominal bitrate: 24000<br>
    FOUND TAG      : found by element &quot;mpegaudioparse0&quot;.<br>
             has crc: FALSE<br>
        channel mode: mono<br>
    FOUND TAG      : found by element &quot;mad0&quot;.<br>
         audio codec: MPEG-1 Layer 3 (MP3)<br>
    FOUND TAG      : found by element &quot;mpegaudioparse0&quot;.<br>
     minimum bitrate: 24193<br>
             bitrate: 24010<br>
     maximum bitrate: 24193<br>
    FOUND TAG      : found by element &quot;mpegaudioparse0&quot;.<br>
     minimum bitrate: 23887<br>
    Prerolled, waiting for buffering to finish...<br>
    Pipeline is PREROLLED ...<br>
    Setting pipeline to PLAYING ...<br>
    New clock: GstPulseSinkClock<br>
    FOUND TAG      : found by element &quot;icydemux0&quot;.<br>
               title: Shahid Mallya - Rabba Main Toh Mar Gaya Oye -
    MAUSAM [2011]<div class="im"><blockquote type="cite"><pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote><br></div></div>______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>Hi Stephan,<br><br>Using http request along with gstreamer is working fine along with the metadata.<br><br>However I would like to extract the metadata from the buffer that is fed to the appsrc element.<br>
<br>Encountered the following error using the pipelines where downloading and feeding data is happening parallely<br><br>&quot;appsrc name=mysource ! audio/mpeg  ! decodebin2 !  alsasink&quot;<br>&quot;appsrc name=mysource ! audio/mpeg  ! mp3parse ! mad !  alsasink&quot;<br>
<br>####<br>ERROR from element mpegaudioparse0: Failed to parse stream<br>Debugging info: gstbaseparse.c(2140): gst_base_parse_check_sync (): /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstMpegAudioParse:mpegaudioparse0<br>
ERROR from element mysource: Internal data flow error.<br>Debugging info: gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstAppSrc:mysource:<br>streaming task paused, reason error (-5)<br>ERROR from element mpegaudioparse0: Failed to parse stream<br>
Debugging info: gstbaseparse.c(2140): gst_base_parse_check_sync (): /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstMpegAudioParse:mpegaudioparse0<br>ERROR from element mpegaudioparse0: No valid frames found before end of stream<br>
Debugging info: gstbaseparse.c(1037): gst_base_parse_sink_eventfunc (): /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstMpegAudioParse:mpegaudioparse0<br>ERROR from element decodebin20: GStreamer encountered a general stream error.<br>
Debugging info: gstdecodebin2.c(3239): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin2:decodebin20:<br>all streams without buffers<br>* About to connect() to <a href="http://scfire-dtc-aa03.stream.aol.com">scfire-dtc-aa03.stream.aol.com</a> port 80 (#0)<br>
*   Trying 205.188.234.3... * connected<br>* Connected to <a href="http://scfire-dtc-aa03.stream.aol.com">scfire-dtc-aa03.stream.aol.com</a> (205.188.234.3) port 80 (#0)<br>&gt; GET /stream/1013 HTTP/1.1<br>Host: <a href="http://scfire-dtc-aa03.stream.aol.com">scfire-dtc-aa03.stream.aol.com</a><br>
Accept: */*<br>####<br><br>Request your kind inputs on this. <br><br>Thanks and Reards,<br>Sree Gowri<br>