Android Question Record video without audio using Camera2

biometrics

Active Member
Licensed User
Longtime User
I want to record video without audio using the Camera2 library (and CamEx2 class) to save on the file size. How can I do this?

Reading some threads on Stackoverflow indicates that simply by not calling setAudioSource, audio won't be recorded. This must be in the library so I can't remove it.

I was thinking I might be able to call setAudioSource using MediaRecorder.RunMethod but I don't see an option to set the source to none.

References:
https://developer.android.com/reference/android/media/MediaRecorder.html#setAudioSource(int)
https://developer.android.com/reference/android/media/MediaRecorder.AudioSource
 

MarkusR

Well-Known Member
Licensed User
Longtime User
its possible to turn the input volume via app to zero? (its still with audio but maybe silence is ok for you)
 
Upvote 0

biometrics

Active Member
Licensed User
Longtime User
Have you made some tests to see whether the audio size actually matters?
Kind of hard to test as the recording takes place in moving vehicle.

Anyway I've found out the cameras don't have microphones so there won't be audio.

I just wanted to create the smallest files possible but I guess the audio data would be negligible vs the video data.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
You could use my ffmpegencoder to remove the audio.by post-processing the video ..
 
Upvote 0
Top