如何在android中以编程方式录制特定声音的视频? [英] How to video record with specific sound programmatically in android?

查看:26
本文介绍了如何在android中以编程方式录制特定声音的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了在我的应用中录制视频的功能.

I have created functionality to record video in my app.

当我播放一首歌曲时,该歌曲会与视频一起录制并创建一个视频文件,类似于 dubshmash 应用程序.

When I play a song, that song is recorded with video and a video file is created, similar to a dubshmash application.

现在我面临的问题是其他声音(例如附近的声音)也会被记录下来.歌曲文件记录在视频录制屏幕中,我在视频录制活动启动时播放歌曲.

Now the problem that I am facing is that other voices such as near by sounds also get recorded. The song file is recorded in the video record screen and I play the song when video recording activity launches.

如何让我的应用程序只录制带有视频的歌曲?

How can I have my application record only song with video?

 mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
  mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
  mediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));

音频源设置为扬声器有什么解决方案,因为歌曲声音通过扬声器?如果有其他可能的方式请回复我.

Is there any solution in audio source set as a speaker , because song sound going through a speaker? if is it another possible way please reply me.

推荐答案

如果你想处理视频,那么你必须使用FFMPEG

那可以是您可以使用视频.

That can be you can work with Video.

因为我已经回答了如何在 android studio 中使用 ffmpeg? 看到这个 链接.一步一步导入你的项目

That for i have already give answer to How to use ffmpeg in android studio? see this LINK. Go step by step and import in your project

这篇关于如何在android中以编程方式录制特定声音的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆