Confusion with Filters

Ian Davidson id012c3076 at blueyonder.co.uk
Sat Dec 1 11:00:12 PST 2012


I am confused by 'filters'.

I think that I understand that a filter is any element which is not a 
source or a sink and that a filter 'does something' to the data being 
passed through it.

For some filters, I can find information by looking at the 'GStreamer 
Good Plugins 1.0 Plugins Reference Manual' -- but some, I am not sure 
what to look for.

I am trying to record audio/video -- but it appears that I am not 
getting the video content I want.

I initially had the command

gst-launch-1.0 v4l2src ! 
'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' 
! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 
'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux ! 
filesink location=test.avi

and I got the result (including terminating with a Control-C)

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstAudioSrcClock

^CCaught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 6006542779 ns.

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

A test.avi file was created and it contained the audio, but the video 
was evidently not there (all I saw when I played the avi was a filmstrip 
large icon).


I thought that the failure to record any video could be a) the hardware 
of my capture card, b) the v4l2src plugin or c) one of the other plugins 
up to the filesink -- so I attempted to use videotestsrc to see if I got 
any video.

I tried

gst-launch -v videotestsrc num-buffers=25 ! 
'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' 
! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 
'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux ! 
filesink location=test.avi

but I got

WARNING: erroneous pipeline: could not link videotestsrc0 to queue0

I didn't expect it to help, but I removed the 'filter'

video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1

to leave

gst-launch -v videotestsrc num-buffers=25 ! queue ! mux. alsasrc 
num-buffers=440 ! audioconvert ! 'audio/x-raw,rate=44100,channels=2' ! 
queue ! mux. avimux name=mux ! filesink location=test.avi

which resulted in

WARNING: erroneous pipeline: could not link audioconvert0 to queue1

So, I removed the 'audio/x-raw ...' filter and it now worked -- insofar 
as I now had test video with some recorded audio.

I had assumed that the 2 'filters' were supposed to determine the nature 
of the video and audio that I captured -- but this only works without 
them, so how can I configure how I record?

I do not know what to try to read regarding these filters.  I cannot see 
'video' or 'video/x-raw' or 'audio' or 'audio/x-raw' in the 
documentation of plug-ins I have looked at. I am probably looking in the 
wrong place.



As to my video, here is a section of the output of dmesg

[ 6.790578] bttv: driver version 0.9.19 loaded

[ 6.790580] bttv: using 8 buffers with 2080k (520 pages) each for capture

[ 6.790613] bttv: Bt8xx card found (0)

[ 6.790630] bttv: 0: Bt848 (rev 18) at 0000:03:02.0, irq: 23, latency: 
32, mmio: 0xfdfff000

[ 6.790644] bttv: 0: using: *** UNKNOWN/GENERIC *** [card=0,autodetected]

[ 6.791304] tveeprom 6-0050: Huh, no eeprom present (err=-6)?

[ 6.791305] bttv: 0: tuner type unset

[ 6.791423] bttv: 0: registered device video0

[ 6.791471] bttv: 0: registered device vbi0

So Linux has seen the video card but I notice that there my be a problem 
with a missing eeprom, although I do have a /dev/video0. Could this 
explain the lack of video?

-- 
--
Ian Davidson
/239 Streetsbrook Road, Solihull, West Midlands, B91 1HE/
--
Facts used in this message may or may not reflect an underlying 
objective reality. Facts are supplied for personal use only.
Recipients quoting supplied information do so at their own risk. Facts 
supplied may vary in whole or part from widely accepted standards.
While painstakingly researched, facts may or may not be indicative of 
actually occurring events or natural phenomena.
The author accepts no responsibility for personal loss or injury 
resulting from memorisation and subsequent use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121201/4eeb5363/attachment-0001.html>


More information about the gstreamer-devel mailing list