Recorder-Android | 为 Android 录制 MP3 或 AAC 音频的库。 | Audio Utils library
kandi X-RAY | Recorder-Android Summary
kandi X-RAY | Recorder-Android Summary
Recorder 通过 AudioRecord 或 MediaRecorder 录制 MP3 或 AAC 音频文件。. 因 Android 默认不支持MP3编码,所以库通过 Lame 编码生成 MP3 音频文件。. 录制 AAC 音频 导入 release 文件夹下 recorder-release.aar 即可;. 录制 MP3 音频还需导入 mp3lame-release.aar 文件。.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Recorder-Android
Recorder-Android Key Features
Recorder-Android Examples and Code Snippets
Community Discussions
Trending Discussions on Recorder-Android
QUESTION
Lately I was working with MediaRecorder to capture videos and handle them in the output. However as it turns out, there were security restrictions, which didn't allow me to catch the outputstream from the MediaRecorder (the problem presented in the link below):
"Seekable" file descriptor to use with MediaRecorder Android 6.0 (API 23)
So I had to elaborate another solution and decided to work with Camer API and and get the stream there. So the first way was to work with onPreviewFrame, catch the frames in a file and convert colors and formats (MediaCodec). Luckely the problem with color conversion could be circumvented by getting the video from the e.g SuraceTexture, as described e.g. in bigflakes project:
https://bigflake.com/mediacodec/CameraToMpegTest.java.txt
I am not a total newbie in Android Java, but this is really overwhelming me. I dont want a ready receipt for that and I am pretty okay with sitting and working the next whole week and cracking that code, but firstly my question is: how you guys got to understand MediaCodec taking the video from e.g. SurfaceTexture and later put it in MediaMuxer and secondly could you recommend some tutorials, where you begin with the simpliest project on that topic and then gradually expand the code?
I really try to work on bigflakes project, but I am helpless even because the onCreate method is missing.. and the best part begins when he begins to render the video.
...ANSWER
Answered 2019-May-25 at 08:25Bigflakes MediaCodec page contains mostly tests for MediaCodec
, if you still insist on using that as a reference then start from encodeCameraToMpeg()
in CameraToMpegTest, also take a look at EncodeAndMux to get an idea on how to set up the MediaCodec encoder
.
For a working video capture sample, take a look at taehwandev's MediaCodecExample. For an example on how to decode your recorded video, take a look at the BasicMediaDecode provided in the Google Samples repo.
The advantage of using MediaCodec along with Camera1
API would be that you'll be able to support devices with API level 18 and upwards. If you're only targeting API levels 21 and upwards, then Camera2
should work, here's a Android Camera2Video Sample for you to refer to if needed.
Finally, it might also be worthwhile to look at the new CameraX
API, although it shouldn't be used in production yet, that's the direction that android's camera API is moving towards. So it's probably worth taking a look at the official documentation and going through a guide or two (eg: Exploring CameraX) to get the basic idea ahead of time.
NOTE - Do not use CameraX API in production code yet, as the CameraX library is in alpha stage and its API surfaces aren't yet finalized. I merely provided it as an option for you keep tabs on for future reference.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Recorder-Android
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page