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

add audio_video_recorder in jsk_common #1672

Merged
merged 10 commits into from
Sep 26, 2021

Conversation

knorth55
Copy link
Member

@knorth55 knorth55 commented Dec 25, 2020

add audio_video_recorder package in jsk_common
orginally developed in https://github.com/knorth55/audio_video_recorder

pr2_audio_video_recorder.mp4

Full video on Google Drive

cc. @nakaotatsuya

@knorth55
Copy link
Member Author

knorth55 commented Jan 7, 2021

@k-okada can you review and merge this PR?

audio_video_recorder/README.md Show resolved Hide resolved
audio_video_recorder/README.md Outdated Show resolved Hide resolved
audio_video_recorder/README.md Outdated Show resolved Hide resolved
audio_video_recorder/README.md Show resolved Hide resolved
audio_video_recorder/README.md Show resolved Hide resolved
Copy link
Member

@k-okada k-okada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, I think we need sample launch file .
plan A)

  1. launch file to convert recorded data to bag file
  2. sample launch file to play back these bag file so that we can confirm video and auto are recorded synchronously

plan B)

  1. launch file to sample file to play back these avi and mp3 file so that we can confirm video and auto are recorded synchronously
  2. sample launch file to store there data into bag file so that other people can use stored data

@k-okada
Copy link
Member

k-okada commented May 26, 2021

@Kanazawanaoaki can you use this program to store audio and video data from your experiments? and you can use @708yamaguchi or @nakaotatsuya program to find Mozart and/or Beethoven sound. You can submit that results to https://ac.rsj-web.org/2021/

@knorth55
Copy link
Member Author

@k-okada thank you for your review. I update this PR.
I already have a sample file to record audio-visual file (AVI file) sample_audio_video_recorder.launch,
but you think we need to try this package with rosbag file?
If you have a laptop with microphone and camera, you can simply run the sample_audio_video_recorder.launch and get the output file in /tmp/test.avi.

@k-okada
Copy link
Member

k-okada commented May 27, 2021

hummm, what is the role of this package in the context to jsk_lifelog system. Are expecting people store video and audio file into bag file? data base? then convert to avi file? for presentation? Or are you plan to use avi file for stored log data?

@knorth55
Copy link
Member Author

knorth55 commented May 27, 2021

The role of this package in jsk_lifelog is storing audio-visual data in AVI format as a database.
I searched for database which can record audio-visual data in high frequrency, but I could not find out good solution with mongodb or influxdb.
Therefore, I decided to record audio-visual data in files and upload to google drive automatically.
Now, I always record audio-visual data of PR1040, Fetch15 and Fetch1075 with this package and upload the AVI files google drive sometimes.
PR1040: https://drive.google.com/drive/folders/1mYcJ3zNp1VmBB1GO6AnDwyRMShXVhpG6
Fetch15: https://drive.google.com/drive/folders/1JEum3b-gBaCCcAYJ2RNylJZUHTKjk9bV
Fetch1075: https://drive.google.com/drive/folders/1JEum3b-gBaCCcAYJ2RNylJZUHTKjk9bV

I run these systemctl process on my computer to record audio-visual file.
PR1040: https://github.com/knorth55/jsk_database/blob/main/jsk_database_scripts/gdrive_recorder/systemd/jsk-pr1040-gdrive-recorder.service
Fetch15: https://github.com/knorth55/jsk_database/blob/main/jsk_database_scripts/gdrive_recorder/systemd/jsk-fetch15-gdrive-recorder.service
Fetch1075: https://github.com/knorth55/jsk_database/blob/main/jsk_database_scripts/gdrive_recorder/systemd/jsk-fetch1075-gdrive-recorder.service

Another role of this package is to record audi-visual data in app_manager app
I also use this package to record audio-visual data during the apps (Fetch go_to_kitchen demo and PR2 fridge demo), upload the file and send it after the app finished.
https://github.com/knorth55/jsk_robot/blob/fetch15/jsk_fetch_robot/jsk_fetch_startup/apps/go_to_kitchen/go_to_kitchen.app#L9-L22
https://github.com/knorth55/jsk_demos/blob/pr1040/detect_cans_in_fridge_201202/apps/pick_object/pick_object.app#L8-L22

The plugin to record audio-visual file for app_manager is written here:
https://github.com/knorth55/app_manager_utils/tree/master/app_recorder#app_recorderaudio_video_recorder_plugin-audio-video-recorder-plugin

The reason why I use AVI file is to compress the file size (the file is compressed in x264 format)

@knorth55 knorth55 force-pushed the audio-video-recorder branch 2 times, most recently from 10926fc to 8a48007 Compare May 27, 2021 07:10
@k-okada
Copy link
Member

k-okada commented May 27, 2021

I see, I believe all data/modules/packages are designed for robots, more precisely, action of robots.
So, I suggest to add launch file to publish image and audio from avi file, so that robot can utilize stored avi data.

@knorth55 knorth55 force-pushed the audio-video-recorder branch from 5dd30ee to fb86ae4 Compare August 24, 2021 09:40
@k-okada k-okada merged commit 119da8c into jsk-ros-pkg:master Sep 26, 2021
@knorth55 knorth55 deleted the audio-video-recorder branch September 26, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants