如何使用特定的声音编程android系统中的视频记录? [英] How to video record with specific sound programmatically in android?

查看:230
本文介绍了如何使用特定的声音编程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

If you want to working with video then you have to use FFMPEG library

这可能是你可以用视频工作。

That can be you can work with Video.

这对我已经给出答案的如何在Android Studio中使用的ffmpeg?看到<一个href=\"http://stackoverflow.com/questions/36443086/ffmpeg-error-showing-while-complile-for-android/36443219#36443219\">LINK.通过在peoj一步,进口走一步看

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 peoj

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

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