Selecting Audio and Video Streams from gnlfilesource

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Selecting Audio and Video Streams from gnlfilesource

Sandeep Prakash
Hi All,

I am writing a Simple Non Linear editing application using GNonLin gstreamer plugins and
I have a query on the gnlfilesource/gnlcomposition:

I have an mp4 file which has both audio and video (Say MPEG-4 Video and AAC Audio) and
I need to extract only the audio stream from it for further processing (Say for adding 2 audio
streams together). How do I achieve this using gnlfilesource. I have tried setting the gnlfilesource
location property to the mp4 file but the pad-added signal is emitted always for the video stream
present in the stream. I have also tried setting the caps of gnlcomposition to audio/x-raw-int
as follows
comp = gst_element_factory_make("gnlcomposition", "mycomposition");
audio1 = gst_element_factory_make("gnlfilesource", "audio1");
gst_bin_add (GST_BIN (comp), audio1);
g_object_set (comp, "caps", gst_caps_from_string ("audio/x-raw-int"), NULL);

In this case the pipeline is hanging.

Plz help me out with alternatives and options.

Thanks in advance
Sandeep
Reply | Threaded
Open this post in threaded view
|

Re: Selecting Audio and Video Streams from gnlfilesource

Luciana Fujii Pontello
On Thu, 2010-06-24 at 01:57 -0700, Sandeep Prakash wrote:

> Hi All,
>
> I am writing a Simple Non Linear editing application using GNonLin gstreamer
> plugins and
> I have a query on the gnlfilesource/gnlcomposition:
>
> I have an mp4 file which has both audio and video (Say MPEG-4 Video and AAC
> Audio) and
> I need to extract only the audio stream from it for further processing (Say
> for adding 2 audio
> streams together). How do I achieve this using gnlfilesource. I have tried
> setting the gnlfilesource
> location property to the mp4 file but the pad-added signal is emitted always
> for the video stream
> present in the stream.

Doesn't it also emit a pad-added signal for the audio stream? If so, I
think it would be enough if you just ignored the video stream and linked
the pad when you get the pad-added signal with the audio stream.

Regards,

Luciana Fujii

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Selecting Audio and Video Streams from gnlfilesource

Sandeep Prakash
No actually. The pad-added signal is being emitted only one and if we check the caps it from the video stream and not the audio stream.

Regards
sandeep