ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It looks like https://github.com/ros-drivers/audio_common/blob/hydro-devel/audio_capture/src/audio_capture.cpp is a thin wrapper around GStreamer, which is very flexible, but the wrapper itself is mostly hardcoded. The source is set to alsasrc
(when you would want it to be filesrc
, unless you can play your file into alsasrc), and the only parameter is for bitrate, but that is mp3 bitrate.
The encoder is set to lame, which I think means only mp3:
_encode = gst_element_factory_make("lame", "encoder");
It might be a learning curve to use the gstreamer api but maybe not too hard to hack the existing audio_capture to do what you want (and maybe there are gstreamer experts on stackoverflow)- or even better extend it and push the changes back into the public repo.