2011-01-17 2 views
2

이것은 내 문제입니다. 저는 카메라와 녹화 비디오를 사용하는 소프트웨어를 개발 중입니다. 모든 것이 작동하지만 설정을 관리하는 방법을 알 수 없습니다. 예를 들어 삼성 은하 S가 있습니다. 1280 * 720에서 비디오를 녹화,하지만 난이 해상도를 설정하면 수 있습니다카메라 MediaRecorder/캠코더 프로필

01-17 14:22:28.706: WARN/AuthorDriver(2782): Intended video encoding frame width (1280) is too large and will be set to (128849019680) 

01-17 14:22:28.706: WARN/AuthorDriver(2782): Intended video encoding frame height (720) is too large and will be set to (1078895784755680) 

및 매개 변수가 자동으로 800로 조정됩니다 :

CamcorderProfile profile; 
profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH); 
profile.videoFrameWidth = 1280; 
profile.videoFrameHeight = 720; 
profile.videoFrameRate = 30; 
recorder.setProfile(profile); 

로그 캣을 이러한 메시지를 보여줍니다 x480

답변

2

CamcorderProfile을 사용하는 이유를 정확히 알지 못하는데 안드로이드 박사는 이것이 읽기 전용이라고 언급합니다.

당신이 다음

  • 카메라 매개 변수에서 지원되는 비디오 크기의 목록을 가져옵니다 1280 * 720으로 비디오 녹화 크기를 설정하려면 설정하고자하는 크기가 지원됩니다 CHK (단지 확인하기 장치) - 미디어 레코더

    public List<Camera.Size> getSupportedVideoSizes() 
    
  • 그렇다면 호 설정 동영상 크기 -

    public void setVideoSize (int width, int height)