[gst-devel] audio parsing error: Vol 38, Issue 7

sreerenj b bsreerenj at gmail.com
Mon Jul 6 09:09:25 CEST 2009


On Fri, Jul 3, 2009 at 10:10 PM, <
gstreamer-devel-request at lists.sourceforge.net> wrote:

> Send gstreamer-devel mailing list submissions to
>        gstreamer-devel at lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> or, via email, send a message with subject or body 'help' to
>        gstreamer-devel-request at lists.sourceforge.net
>
> You can reach the person managing the list at
>        gstreamer-devel-owner at lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gstreamer-devel digest..."
>
>
> Today's Topics:
>
>   1. low framerate with udp (Mehta, Neel)
>   2. Re: analogue of gst-launch with caps (Tim-Philipp M?ller)
>   3. Re: analogue of gst-launch with caps (Tim-Philipp M?ller)
>   4. Re: Need help with first gstreamer program. (Ognen Bezanov)
>   5. A question regarding to dynamic pipeline change (Zheng, Huan)
>   6. Re: Save a stream to different file every hour (Juraj Kubelka)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 3 Jul 2009 16:52:29 +0530
> From: "Mehta, Neel" <x0112149 at ti.com>
> Subject: [gst-devel] low framerate with udp
> To: Discussion of the development of GStreamer
>        <gstreamer-devel at lists.sourceforge.net>
> Message-ID:
>        <E0D41E29EB0DAC4E9F3FF173962E9E94024ED84AE4 at dbde02.ent.ti.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi
>
> I am currently streaming MPEG4 video via UDP (resolution 720P/30 fps).
> Currently using the Live555, and RTSP, the video can be played at 30 fps.
> Using Gstreamer, I am able to get only 21 fps via UDP (for VGA, I do get 30
> fps). I am using gstreamer for transmission only. The encoding process is
> same. I am using appsrc to get the encoded data from application buffer. I
> am attaching the code that I am using currently for transmission using
> Gstreamer. Please help me out to increase the framerate.
>
> The pipeline is basically: appsrc is-live=true name=source caps="
> video/mpeg, mpegversion=(int)4, framerate=(fraction)1001/30000,
> width=(int)1280, height=(int)720" ! rtpmp4vpay send-config=TRUE ! udpsink
> host=172.24.136.232 port=5000
>
> Note: I am using UDP instead of rtsp, as I am unable to write the code
> completely between appsrc and gst-rtsp-server. I have posted on this forum
> for help titled "appsrc and gst-rtsp-server" on 29th June, Monday, but I
> haven't received a help yet. Someone please help me out with this too.
>
> Please fell free to ask for more information.
>
> Thanks in advance.
>
> Regards,
> Neel.
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: appsrc-udp.txt
>
> ------------------------------
>
> Message: 2
> Date: Fri, 03 Jul 2009 12:30:24 +0100
> From: Tim-Philipp M?ller <t.i.m at zen.co.uk>
> Subject: Re: [gst-devel] analogue of gst-launch with caps
> To: gstreamer-devel at lists.sourceforge.net
> Message-ID: <1246620624.5472.2.camel at zingle>
> Content-Type: text/plain; charset="UTF-8"
>
> On Thu, 2009-07-02 at 17:52 +0530, Mehta, Neel wrote:
>
> > Can anyone suggest a substitute of gst_parse_launch (string, NULL), so
> > that I have the negotiated caps as the part of the output.
> >
> > i.e. I want an analogue of gst-launch-0.10 ?v.
>
> A quick look at gst-launch.c reveals that -v boils down to:
>
>  g_signal_connect (pipeline, "deep-notify",
>      G_CALLBACK (gst_object_default_deep_notify), NULL);
>
>  Cheers
>  -Tim
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 03 Jul 2009 12:31:34 +0100
> From: Tim-Philipp M?ller <t.i.m at zen.co.uk>
> Subject: Re: [gst-devel] analogue of gst-launch with caps
> To: gstreamer-devel at lists.sourceforge.net
> Message-ID: <1246620694.5472.3.camel at zingle>
> Content-Type: text/plain; charset="UTF-8"
>
> On Thu, 2009-07-02 at 17:52 +0530, Mehta, Neel wrote:
>
> > Can anyone suggest a substitute of gst_parse_launch (string, NULL), so
> > that I have the negotiated caps as the part of the output.
> >
> > i.e. I want an analogue of gst-launch-0.10 ?v.
>
> A quick look at gst-launch.c reveals that -v boils down to:
>
>  g_signal_connect (pipeline, "deep-notify",
>      G_CALLBACK (gst_object_default_deep_notify), NULL);
>
>  Cheers
>  -Tim
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 03 Jul 2009 13:00:29 +0100
> From: Ognen Bezanov <ognen.bezanov at wai.co.uk>
> Subject: Re: [gst-devel] Need help with first gstreamer program.
> To: gstreamer-devel at lists.sourceforge.net
> Message-ID: <1246622429.9434.17.camel at PC133>
> Content-Type: text/plain
>
> No-one has any idea?
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 1 Jul 2009 16:20:44 +0800
> From: "Zheng, Huan" <huan.zheng at intel.com>
> Subject: [gst-devel] A question regarding to dynamic pipeline change
> To: gstreamer-devel <gstreamer-devel at lists.sourceforge.net>
> Message-ID:
>        <
> BB1F052FCDB1EA468BD99786C8B1ED2C05870A1A07 at PDSMSX501.ccr.corp.intel.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi, dear developers
> If I dynamically replace one element inside the pipeline, will the
> negotiation of the *whole pipeline* be performed again when the pipeline
> restarted next time?
> Thanks a lot for your answering!
>
>
> Best Regards, Zheng, Huan(ZBT)
>
> OTC/SSD/SSG
>
> Intel Asia-Pacific Research & Developement Ltd
>
> Tel: 021-6116 6435
>
> Inet: 8821 6435
>
> Cub: 3W035
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 6
> Date: Fri, 3 Jul 2009 18:40:21 +0200
> From: Juraj Kubelka <juraj.kubelka at googlemail.com>
> Subject: Re: [gst-devel] Save a stream to different file every hour
> To: Discussion of the development of GStreamer
>        <gstreamer-devel at lists.sourceforge.net>
> Message-ID:
>        <f54511ec0907030940r4db3acf6k41015c82ee931f91 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hopefully I got it and my piece of code works :) So, if anyone is
> interested
> in saving a stream to a new file every hour, download here
> http://files.getdropbox.com/u/710942/audio-2009-07-03_18-32.tar.gz
>
> Best regards,
> Jura
>
> On Fri, Jul 3, 2009 at 11:42 AM, Juraj Kubelka <
> juraj.kubelka at googlemail.com
> > wrote:
>
> > Hi!
> >
> > As I have played with it, it seams it does not work properly all the
> time.
> > Can you, please, check my source code in Python? There are TODOs which
> tag
> > lines with possible wrong gstreamer handling (as I suppose). I will
> > appreciate any suggestions.
> >
> > the file (pipelineholder.py): http://cesta.pastebin.com/m3b0c7ad
> > other two files witch work together: http://cesta.pastebin.com/m46860962
> > http://cesta.pastebin.com/m5afca033
> > full sourcecode (3 files, run ./pipelinemanager.py, pipelineholder.py is
> > the main one): http://files.getdropbox.com/u/710942/audio.tar.gz
> >
> > Thank you in advance.
> > Jura
> >
> >
> > On Tue, Jun 23, 2009 at 4:34 PM, Juraj Kubelka <
> > juraj.kubelka at googlemail.com> wrote:
> >
> >> On Thu, Jun 18, 2009 at 8:46 AM, Arnout Vandecappelle <arnout at mind.be
> >wrote:
> >>
> >>> On Wednesday 17 June 2009 10:29:43 Viraj Karandikar wrote:
> >>> > And after every hour you will have to: pause the pipeline, create new
> >>> > filesink, disconnect old filesink, connect new filesink and close old
> >>> > filesink.
> >>>
> >>>  Actually, no.  Pausing the pipeline will not (immediately) stop the
> >>> threads
> >>> in the source and queues.  In addition, once it's paused any new data
> >>> coming
> >>> in on the live source will be dropped until it plays again, which
> >>> probably is
> >>> not the intention.
> >>>
> >>>  Instead, you have to use blocking.  Below there's a piece of code that
> I
> >>> use.
> >>> See also docs/design/part-block.txt.  There should be high-level API
> for
> >>> that, but nobody has bothered up to now to write it.
> >>>
> >>>  You need to replace the decoder and muxer as well, so the proper
> headers
> >>> are
> >>> created in the new file.  To simplify all that I put it in a bin (which
> >>> can
> >>> be unreffed as a whole).
> >>>
> >>> > You can do above things in another independent thread which will
> >>> > just wait till 1 hour is complete.
> >>>
> >>>  Or you can use g_timeout_add_seconds (3600, ...) in your main loop.
> >>>
> >>>  Regards,
> >>>  Arnout
> >>>
> >>> --
> >>>
> >>> static gboolean destroy_bin_cb (gpointer user_data)
> >>> {
> >>>    GstElement *oldbin = user_data;
> >>>
> >>>    log_message("Destroying old bin.\n");
> >>>    if (pipeline)
> >>>    {
> >>>        gst_element_set_state (oldbin, GST_STATE_NULL);
> >>>        gst_bin_remove (GST_BIN(pipeline), oldbin);
> >>>    }
> >>>    return FALSE;
> >>> }
> >>>
> >>>
> >>> static void replace_filesink_blocked_cb (GstPad *pad, gboolean blocked,
> >>> gpointer user_data)
> >>> {
> >>>    if (blocked)
> >>>    {
> >>>        GstElement *oldbin;
> >>>        GstPad *sinkpad;
> >>>
> >>>        log_message("Blocked filesink queue.\n");
> >>>        g_static_rec_mutex_lock(&mutex);
> >>>        log_message("Locked.\n");
> >>>        oldbin = filesinkbin;
> >>>        sinkpad = gst_element_get_static_pad(oldbin, "sink");
> >>>        if (!sinkpad)
> >>>        {
> >>>            log_message("replace_filesink_blocked_cb: oldbin doesn't
> have
> >>> sink
> >>> pad.\n");
> >>>            goto fail;
> >>>        }
> >>>        gst_pad_unlink(queuesrcpad, sinkpad);
> >>>        log_message("Unlinked.\n");
> >>>
> >>>        /* Finalize the old tail. */
> >>>        /* Sending EOS should be done from here (we're in the queue
> >>> thread).
> >>> */
> >>>        gst_pad_send_event(sinkpad, gst_event_new_eos());
> >>>        log_message("Sent event.\n");
> >>>
> >>>        log_message("Checked sinks.\n");
> >>>        /* Setting state should be done from the main thread. Do it
> before
> >>> the
> >>>           pipeline has been set to PLAYING - implicitly, because that
> is
> >>> also
> >>>           done in an idle callback, but one that is started after this
> >>> one.
> >>>        */
> >>>        g_idle_add(destroy_bin_cb, oldbin);
> >>>
> >>>        create_filesink_tail();
> >>>        log_message("Created filesink.\n");
> >>>        g_static_rec_mutex_unlock(&mutex);
> >>>        log_message("Unlocked mutex.\n");
> >>>
> >>>        /* And unblock again. */
> >>>        gst_pad_set_blocked_async(queuesrcpad, FALSE,
> >>> replace_filesink_blocked_cb, NULL);
> >>>
> >>>        log_message("Done replacing filesink.\n");
> >>>    }
> >>>    else
> >>>    {
> >>>        log_message("Unblocked filesink queue.\n");
> >>>    }
> >>>    return;
> >>>
> >>> fail:
> >>>    pipeline_terminate_async();
> >>>    g_static_rec_mutex_unlock(&mutex);
> >>> }
> >>>
> >>> static void replace_filesink()
> >>> {
> >>>    if (queuesrcpad == NULL)
> >>>        log_message("replace_filesink while no queuesrcpad yet, waiting
> >>> for it
> >>> to appear.\n");
> >>>    else
> >>>        gst_pad_set_blocked_async(queuesrcpad, TRUE,
> >>> replace_filesink_blocked_cb, NULL);
> >>> }
> >>>
> >>>
> >> Hi,
> >>
> >> thank you a lot for your help. I did it in Python and it seams it works.
> >> Source code is on pastebin: http://pastebin.com/f3a80ed09
> >> (pipelineholder.py <http://pastebin.com/f3a80ed09%28pipelineholder.py>)
> >> and http://pastebin.com/f4ee27d6d (pipelinemanager). Any comments are
> >> appreciated.
> >>
> >> Best regards,
> >> Jura
> >>
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
>
>
> ------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> End of gstreamer-devel Digest, Vol 38, Issue 7
> **********************************************
>

hi

I recorded the audio and video with out any encoding and decoding.Video is
coming from the camera as mpeg4 and audio in the format of aac.My pipeline
looks like this,

 gst-launch -e   rtspsrc location="rtsp://
user:carinov123 at 10.0.0.104/live.sdp" name=rtsp  !  rtpmp4vdepay  !
mpeg4videoparse ! qtmux name=qt  !  filesink location=a.mp4 rtsp. !
rtpmp4gdepay ! aacparse !  qt.


But when i tried to play it with mplayer,i got the video only, the out put
of "mplayer a.mp4 " is,



libavformat file format detected.
[lavf] Audio stream found, -aid 0
[lavf] Video stream found, -vid 1
VIDEO:  [mp4v]  320x240  24bpp  30.333 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 32000 Hz, 2 ch, s16le, 128.0 kbit/12.50% (ratio: 16000->128000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource
busy
AO: [alsa] 32000Hz 2ch s16le (2 bytes per sample)
Starting playback...
FAAD: Failed to decode frame: Maximum number of scalefactor bands exceeded





-- 
Sreerenj B
http://sreerenj.livejournal.com
bsreerenj at gmail.com
mob: +91 9995377714
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090706/917c328b/attachment.htm>


More information about the gstreamer-devel mailing list