Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default audio_format to wave and Add device arg to sample audio_video_recorder #1790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kanazawanaoaki
Copy link
Contributor

Related to #1789
This PR changes the default auido_format of sample_audio_video_recorder.launch to wave format from mp3 so that it can be run by default, and adds audio_device argument so that a device can be specified.

@knorth55
Copy link
Member

knorth55 commented Aug 31, 2023

the format is defined in audio_playaudio_capture node.
audio_playaudio_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.

@knorth55
Copy link
Member

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

@Kanazawanaoaki
Copy link
Contributor Author

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.

@knorth55
Copy link
Member

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?

@Kanazawanaoaki
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants