[jokosher-devel] Pipeline clock problems



One of the most common problems being reported with 0.9 is a gstreamer
error 'pipeline cannot operate with selected clock' when trying to
record. This doesn't happen to me on my box using Feisty. However when
running Jokosher on opensuse under vmware recording does fail with
this error message. I think there are possibly multiple reasons for
this failure but this is how this particular error under these
circumstances resolves.

If you run jokosher in a console with a -d flag then the pipeline
string for the recording bin that is passed to gst.parse_launch is
displayed. If you paste this to the command line and run it with
gst-launch (in Feisty this will be gst-launch-0.10) then it fails with
a slightly more meaningful list of messages.

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /pipeline0/alsasrc0: Could not get/set settings
from/on resource.
Additional debug info:
gstalsasrc.c(428): set_hwparams (): /pipeline0/alsasrc0:
Rate doesn't match (requested 44100Hz, get 0Hz)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

You can also pass gst debug params to gst-launch so as to finish up
with this line:

gst-launch --gst-debug=3,python:5,gnl*:5 alsasrc device=hw:0 ! audio/x-raw-int,r
ate=44100 ! audioconvert ! level name=recordlevel interval=10000000 ! audioconve
rt ! vorbisenc ! oggmux ! filesink location=/home/john/jokosher-tests/test03/aud
io/Acoustic\ Guitar_0_1181664702.ogg > log 2>&1

and digging in the log to the interesting bits

0:00:00.266523000 26312 0x804f070 INFO                  alsa
gstalsasrc.c:327:gst_alsasrc_getcaps:<alsasrc0> returning caps
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)[ 4000, 48000 ],
channels=(int)[ 1, 2 ]; audio/x-raw-int, signed=(boolean)false,
width=(int)8, depth=(int)8, rate=(int)[ 4000, 48000 ], channels=(int)[
1, 2 ]
0:00:00.272167000 26312 0x804f070 WARN                  alsa
gstalsasrc.c:428:set_hwparams:<alsasrc0> error: Rate doesn't match
(requested 44100Hz, get 0Hz)
0:00:00.272521000 26312 0x804f070 INFO      GST_ERROR_SYSTEM
gstelement.c:1590:gst_element_message_full:<alsasrc0> posting message:
Could not get/set settings from/on resource.
0:00:00.272606000 26312 0x804f070 INFO      GST_ERROR_SYSTEM
gstelement.c:1613:gst_element_message_full:<alsasrc0> posted error
message: Could not get/set settings from/on resource.
0:00:00.272699000 26312 0x804f070 WARN                  alsa
gstalsasrc.c:649:gst_alsasrc_prepare:<alsasrc0> error: Setting of
hwparams failed: Invalid argument


So the sound driver that vmware uses doesn't seem to like a sample
rate of 44100. Changing that to 48000 in Jokosher prefs solves the
problem and I can now record fine with no errors. (I had to restart
Jokosher after changing the prefs to get it to work but that's
probably another issue.)

This may be an issue for 'real' cards rather than vmware setups so we
probably need to check out card capabilities somehow. I'm not a gst
expert but I'm assuming the rate reported in the getcaps line in the
log is a range and 44100 is within that range but it still doesn't
work. Will it be better to build the pipeline with gst functions
rather than gst.parse_launch? I don't know if that would give us the
ability to test if the pipeline will work before we start play.

Hope this helps debugging on other setups.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]