Open Kanazawanaoaki opened 1 year ago
the format is defined in audio_play
audio_capture
node.
audio_play
audio_capture
node now publish the audio_info
topic, and the topic format is written in the topic.
I haven't implemented it, but we can dynamically change the audio format and other params by audio_info
.
the default format of audio_common
's audio_capture
is mp3
, so I think it is better to keep the default format as mp3
.
but what do you think?
https://github.com/ros-drivers/audio_common/blob/836aa62522764ee7b8e4925b87ec7d84cfdd552c/audio_capture/src/audio_capture.cpp#L24
I see.
Ideally, it would be better to read audio_info
and specify parameters such as format from it.
From my tests, it seems that the audio_video_recorder
does not save videos well for mp3 format audio topics, so if this is the case, I think it would be better to change the default so that the sample can be run with the default. If that is not the case, it may be OK to leave the mp3 as it is.
Sorry for the lack of debugging and understanding.
I think I implmented to support mp3, too, but I'm not pretty sure.
can you give me the rosbag file which you tried and paste the arecord
output for parameters?
I will try it when I have time.
but anyway, I think it is OK to change the default value to wave
.
But in that case, can you add a note in README.md
that default format of audio_video_recorder
and audio_capture
are different?
I understand that mp3 is also supported, then I felt that mp3 should be the default.
This is the rosbag from sample_audio_video_recorder.launch in default mp3 format.
https://drive.google.com/file/d/1--dAIJb97ch9ctBDqAP4Akb7bEWT0Img/view?usp=sharing
I tried it and it seems that audio_play
can be saved to a file.
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Related to https://github.com/jsk-ros-pkg/jsk_common/issues/1789 This PR changes the default
auido_format
ofsample_audio_video_recorder.launch
to wave format from mp3 so that it can be run by default, and addsaudio_device
argument so that a device can be specified.