0

我们需要一个可以从相机录制实时视频并将其保存到文件的 android 应用程序。该应用程序将检测手机的纵向/横向模式,并将绘制一个矩形作为覆盖在相机的实时视频上。此矩形将始终以横向模式绘制,并且具有 16:9 的纵横比。只需要记录矩形内的内容。是否可以只记录矩形内的内容

问候萨巴里什

4

1 回答 1

0

What you can do is record the video as the camera on the device will give it to you and you process it afterwards: either using a library on the device (might cost you a lot of battery) or off-device, on a server the app connects to. On the server you crop the video using one of the many tools out there: Virtualdub, AVI Demux, AVISynth, Xvid4PSP up to Vegas, Premiere and FCP.

"Cropping" a video means decode, and re-encode.

I have only worked with audio and maybe you find something similar to the audio APIs where you have:

  • high-level API MediaRecorder which does almost all the job for you (you can only change a few recording and encoding parameters)
  • low-level API AudioRecord which allows live processing of the audio stream while recording.

这个答案解释了差异。

也许您会在视频世界中找到类似的东西。

于 2013-07-03T19:15:04.510 回答