[gst-devel] Convert ASF to MPEG-2 transport stream using asfdemux & mpegtsmux

Raymond Tam rtam at 2wire.com
Mon Apr 6 08:36:32 CEST 2009


Looks like by experimenting with the property settings of 'multiqueue', my pipeline is now able to run all the way to the end.

-Raymond


-----Original Message-----
From: Raymond Tam
Sent: Sun 4/5/2009 7:50 AM
To: gstreamer-devel at lists.sourceforge.net
Subject: Convert ASF to MPEG-2 transport stream using asfdemux & mpegtsmux
 
Hi all,

I'm trying convert a ASF stream file (video: wmv, audio:wma) to MPEG-2 transport stream file.

I understand that 'mpgegtsmux' currently does not support wmv/wma elementary. So I made small changes to 'mpegtsmux' to support wmv/wma (in sink pad cap and in mpegtsmux_create_stream()).

Afterwards, I'm able to successfully execute the following 2 pipelines:
gst-launch filesrc location=myfile.asf ! asfdemux name=demux demux.audio_00 ! multiqueue ! mpegtsmux name=mux ! filesink location=myfile.mpg.audio
gst-launch filesrc location=myfile.asf ! asfdemux name=demux demux.video_00 ! multiqueue ! mpegtsmux name=mux ! filesink location=myfile.mpg.video
In other words, I'm able to convert a ASF file to audio-only or video-only MPEG-2 transport stream.

However, there's problem when converting the same ASF file into a single audio/video MPEG-2 transport stream, i.e.:

gst-launch filesrc location=myfile.wmv ! asfdemux name=demux demux.video_00 ! multiqueue ! mpegtsmux name=mux ! filesink location=myfile.mpg demux.audio_00 ! multiqueue ! mux.

The execution gets stuck soon after started. After some investigation, I found that 'gst_pad_push()' (inside 'gst_asf_demux_push_buffer()' of gstasfdemux.c) never returns. Furthermore, in gstdataqueue.c, both of the functions 'gst_data_queue_push()' and 'gst_data_queue_pop()' get stuck in g_cond_wait():

gboolean
gst_data_queue_push (GstDataQueue * queue, GstDataQueueItem * item)
{
    ......
    while (gst_data_queue_locked_is_full (queue)) {
      g_cond_wait (queue->item_del, queue->qlock); //<--never returns
    ......
}

It looks like the queue between asfdemux and mpegtsmux is full when I convert both audio&video together.
I would very much appreciate it if someone can give me some idea what might be the problem, or some suggestions on how to further debug the problem.

Here's the gstreamer versions I'm using:
gstreamer-0.10.22, gst-plugins-bad-0.10.10, gst-plugins-ugly-0.10.10

Thanks in advance.

-Raymond








More information about the gstreamer-devel mailing list