[gst-devel] Gstreamer pipeline to convert from avi to mp4 format

Stefan Kost ensonic at hora-obscura.de
Sat Oct 3 12:14:03 CEST 2009


Balakrishnan Natarajan schrieb:
>> Hi Aurelin and All
>>
> 
>     Thanks for your reply. I am replying on behalf of Pawan
> 
> The output of gst-launch is as below.
> 
> balakrishnan at bglldtw126:~/Bala/Work$ gst-launch-0.10 filesrc
> location=test_h264_aac.avi ! avidemux name=demux { qtmux name=mux ! filesink
> location=output.mp4 } { demux. ! queue ! audiopass ! mux. } { demux. !
> queue ! videopass ! mux. }

There is not need fo { } - thats 0.8 syntax.
> 
> (gst-launch-0.10:18379): GLib-GObject-WARNING **: cannot register existing
> type `GstSignalProcessor'
> 
> (gst-launch-0.10:18379): GLib-CRITICAL **: g_once_init_leave: assertion
> `initialization_value != 0' failed
> 
> (gst-launch-0.10:18379): GLib-GObject-WARNING **: cannot retrieve class for

You have some cruft installed. Probably you just need to reinstall
gst-plugins-bad to fix that - its related to ladspa,lv2 plugins.

> invalid (unclassed) type `<invalid>'
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> Setting CapsSetting CapsPipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> So the pipeline goes into playing mode and is stuck in there.

This could e.g. if the streams are badly muxed and one of the queues is full.
You could use multiqueue.

gst-launch-0.10 filesrc location=test_h264_aac.avi ! avidemux name=demux qtmux
name=mux ! filesink location=output.mp4 } { .demux multiqueue name=mq !
audiopass ! mux. demux. ! mq. mq. ! videopass ! mux.

(untested)

Stefan

> 
> So at this instant the output.mp4 is 0 bytes in size
> However when i forcefully (ctrl C)  terminate the pipeline
> the output.mp4 ( find attached with the mail) is 317 bytes in size which is
> of course not playable.
> 
> I have  attached the logs with the following option
> GST_DEBUG=qtmux:5,filesink:5,queue:5
> 
> Looking att that i feel the pipeline is somewhere stuck in the queue.
> 
> the avidmux continuously runs with out any problems  so have not taken the
> same.
> 
> I have also attached the sources for audiopass and the videopass elements
> mentioned below.
> 
> Please see the same and do let me know your observations
> 
> Thanks
> Bala
> 
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Thu, 17 Sep 2009 09:27:59 +0200
>> From: Aurelien Grimaud <gstelzz at yahoo.fr>
>> Subject: Re: [gst-devel] Gstreamer pipeline to convert from avi to mp4
>>        format !!
>> To: Discussion of the development of GStreamer
>>        <gstreamer-devel at lists.sourceforge.net>
>> Message-ID: <4AB1E4FF.3070909 at yahoo.fr>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> Could you post the output of your gst-launch ? What does "does not write
>> out any data" means ? Stuck in preroll ?, not negotiated ?
>> Did you try to GST_DEBUG it ?
>> Should give hints on what happens ...
>>
>> Aurelien
>>
>> Kumar, Pawan a ?crit :
>>> Hi All,
>>>
>>>      I am looking for a Gstreamer pipeline to convert from avi to mp4
>>> format. Here mp4 should contain the same the elementary Audio and
>>> Video streams as stored in avi.
>>>
>>>     test_h264_aac.avi : (Video.h264, Audio.aac) ----------->
>>> output_h264_aac.mp4 : (Video.h264, Audio.aac)
>>>
>>>     So I do not want to decode the elementary streams and again encode
>>> it back before mux-ing with the MP4
>>>
>>>    I tried with the below pipeline.
>>>
>>>     gst-launch-0.10 filesrc location=test_h264_aac.avi ! avidemux
>>> name=demux { qtmux name=mux ! filesink location=output.mp4 } { demux.
>>> ! queue ! audiopass ! mux. } { demux. ! queue ! videopass ! mux. }
>>>
>>>      Here audiopass, and videopass  are gstreamer plugins, which pass
>>> through the audio and video elementary streams as it. These elements
>>> are used only for caps negotiation of  the audio and video src pads of
>>> AVI demuxer with the audio and video sink pads of the MP4 muxer.
>>>
>>>       This pipeline does not write out any Data.
>>>
>>>      Can somebody please suggest me a pipeline to do the conversion
>>> mentioned above ?
>>>
>>>
>>> Thanks,
>>> /Pawan
>>>
>>> ------------------------------------------------------------------------
>>>
>>>




More information about the gstreamer-devel mailing list