[gst-devel] Playing avi - a newbie question

Štěpán stepan1117 at atlas.cz
Sun Oct 12 19:19:40 CEST 2008


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?

    Again, thanks for your valuable help,
       Stepan


Felipe Contreras napsal(a):
> On Sun, Oct 12, 2008 at 7:04 PM, Štěpán <stepan1117 at atlas.cz> wrote:
>   
>> Thanks for your answer, I added
>>
>> adconvert = gst_element_factory_make ("audioconvert", "audioconvert");
>>
>> and changed linking to
>>
>> gst_element_link (decad, adconvert);
>> gst_element_link (adconvert, adqueue);
>> gst_element_link (adqueue, adsink);
>>
>> but still the same problem (gstavidemux.c(4115): gst_avi_demux_loop ():
>> /GstPipeline:media-player/GstAviDemux:avi-demuxer:
>> streaming stopped, reason not-negotiated).
>>
>> I still cannot find what "not-negotiated" stand for. Does this means,
>> that the avidemux and ffmpeg cannot cope because of video format? Or is
>> this something else?
>>     
>
> It meas the caps of two elements didn't match.
>
> Take a look at what you are doing:
> gst-launch-0.10 filesrc ! avidemux name=d d. ! ffdec_mpeg4 ! queue !
> autovideosink d. ! mad ! audioconvert ! queue ! alsasink
>
> Does that look right?
>
>   




More information about the gstreamer-devel mailing list