[gst-devel] Playing avi - a newbie question

Felipe Contreras felipe.contreras at gmail.com
Sun Oct 12 19:30:52 CEST 2008


On Sun, Oct 12, 2008 at 8:19 PM, Štěpán <stepan1117 at atlas.cz> wrote:
> Ah, thank you. I am now able to run the program without errors,
> "ffmpegcolorspace" was missing. So, my code is following:
>
> ...
> pipeline = gst_pipeline_new ("media-player");
> source = gst_element_factory_make ("filesrc", "file-source");
> demuxer = gst_element_factory_make ("avidemux", "avi-demuxer");
> decvd = gst_element_factory_make ("ffdec_mpeg4", "video-decoder");
> vcolorspace = gst_element_factory_make ("ffmpegcolorspace", "color-space");
>
> decad = gst_element_factory_make ("mad", "mp3-decoder");
> vdsink = gst_element_factory_make ("autovideosink", "video-sink");
> vdqueue = gst_element_factory_make ("queue", "video-queue");
>
> adqueue = gst_element_factory_make ("queue", "audio-queue");
> adconvert = gst_element_factory_make ("audioconvert", "audioconvert");
> adsink = gst_element_factory_make ("alsasink", "audio-sink");
> ...
> gst_element_link (source, demuxer);
>
> gst_element_link (decvd, vcolorspace);
> gst_element_link (vcolorspace, vdqueue);
> gst_element_link (vdqueue, vdsink);
>
> gst_element_link (decad, adconvert);
> gst_element_link (adconvert, adqueue);
> gst_element_link (adqueue, adsink);
>
> g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), NULL);
>
> The (hopefully last) problem I have now is that I cannot see and hear
> anything. More precisely, If I remove the part for video, then I can
> hear the audio. If I remove the part for audio, I can see the video -
> but I cannot hear and see both. Is there something I forgot about?

Take a closer look, your queues are in the wrong places.

-- 
Felipe Contreras


More information about the gstreamer-devel mailing list