Giter VIP home page Giter VIP logo

bzmedia's People

Contributors

bookzhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bzmedia's Issues

请问如何调整比例?

以下是我调整比例的代码,发现需要调用两次才能重置视频预览。
请大佬指点一下。感谢!
bz_camera2_view.setPreviewTargetSize(480, 480);
ViewGroup.LayoutParams params = bz_camera2_view.getLayoutParams();
params.height = ScreenUtils.getWidthPixels(RecordActivity.this);
bz_camera2_view.setLayoutParams(params);
bz_camera2_view.startPreview();

预览旋转90度

横屏下手动调用 switchCamera2ID( ) 后预览旋转了90度, 设置旋转90度 也只是预览角度正常,两侧空白的,录制结果还是旋转了90度,该怎么调整呢,Camera 实例貌似也没有api 接口获取

bz_camera_view.switchCamera2ID(getCameraId());
bz_camera_view.setRotation(90f);

部分设备无法正常开始录制

   if (videoRecorderNative != null) {
                videoRecorderNative.stopRecord();
                videoRecorderNative = null;
            }
            videoRecordParams = new VideoRecordParams();
            videoRecordParams.setOutputPath(videoPath);
            videoRecordParams.setHasAudio(false);
            videoRecordParams.setVideoFrameRate(30);
            videoRecordParams.setBitRate(250000000);
            videoRecordParams.setRecordSpeed(1.0f); // 视频录制速度

            videoRecorderNative = new VideoRecorderNative();
    public void start(int width, int height) throws Exception {
        if (initialized)
            return;

        try {
            videoFormatWidth = width;
            videoFormatHeight = height;
            if (videoFormatWidth <= 0 || videoFormatHeight <= 0) {
                throw new Exception("视频宽高非法");
            }
            videoRecordParams.setInputWidth(videoFormatWidth);
            videoRecordParams.setInputHeight(videoFormatHeight);
            videoRecordParams.setTargetWidth(videoFormatWidth);
            videoRecordParams.setTargetHeight(videoFormatHeight);
            int ret = videoRecorderNative.startRecord(videoRecordParams);
            if (ret < 0) {
                MyLogUtil.e("startRecord fail000");
                videoRecorderNative.stopRecord();
                videoRecorderNative = null;
            }
            initialized = true;
        } catch (Exception e) {
            MyLogUtil.e("startRecord fail:"+e.getMessage());
        }
    }

bz_ cn.xymind.D output_path=/sdcard/xyVideos/video_1702290053634raven.mp4
bz_ cn.xymind.D inputWidth=300
bz_ cn.xymind.D inputHeight=300
bz_ cn.xymind.D targetWidth=288
bz_ cn.xymind.D targetHeight=288
bz_ cn.xymind.D videoFrameRate=30
bz_ cn.xymind.D nbSamples=1024
bz_ cn.xymind.D sampleRate=44100
bz_ cn.xymind.D videoRotate=0
bz_ cn.xymind.D pixelFormat=0
bz_ cn.xymind.D hasAudio=0
bz_ cn.xymind.D synEncode=1
bz_ cn.xymind.D avPacketFromMediaCodec=0
bz_ cn.xymind.D needFlipVertical=0
bz_ cn.xymind.D allFrameIsKey=0
bz_ cn.xymind.D bitRate=250000000
bz_ cn.xymind.D startRecord output_path=/sdcard/xyVideos/video_1702290053634raven.mp4--srcWidth=300--srcHeight=300--targetWidth=288--targetHeight=288
rate=30--nb_samples=1024--sampleRate=44100--videoRotate=0--pixelFormat=0
allFrameIsKey=0,synEncode=1,avPacketFromMediaCodec=0
bz_ cn.xymind.D VideoRecorder 对齐后targetWidth=288--targetHeight=288
bz_ cn.xymind.D VideoRecorder addStream mediaType=0
bz_ cn.xymind.D VideoRecorder video bit_rate=29.802322
bz_ cn.xymind.D VideoRecorder openVideo

bz_ cn.xymind.D VideoRecorder alloc_picture
bz_ cn.xymind.D VideoRecorder alloc_picture

bz_ cn.xymind.D VideoRecorder Could not open '/sdcard/xyVideos/video_1702290053634raven.mp4': Operation not permitted
bz_ cn.xymind.E VideoRecorder yuvBufferTotalCount<=0
bz_ cn.xymind.D VideoRecorder closeStream index=0

bz_ cn.xymind.D VideoRecorder endRecordAndReleaseResource --success
bz_ cn.xymind.E startRecord fail
bz_ cn.xymind.D setStopRecordFlag encodeThreadIsRunning=
bz_ cn.xymind.D VideoRecorder start stopRecord
bz_ cn.xymind.V VideoRecorder ------flush_video start-------

DEBUG crash_dump64 A #00 pc 000000000003c248 /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!libbzmedia.so (VideoRecorder::flushBuffer()+76) (BuildId: e2f00b046f613c2563a9c3154c43ca5a913419dd)
DEBUG crash_dump64 A #1 pc 000000000003c690 /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!libbzmedia.so (VideoRecorder::stopRecord()+128) (BuildId: e2f00b046f613c2563a9c3154c43ca5a913419dd)
DEBUG crash_dump64 A #2 pc 000000000003269c /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!libbzmedia.so (Java_com_luoye_bzmedia_BZMedia_startRecord+1664) (BuildId: e2f00b046f613c2563a9c3154c43ca5a913419dd)
DEBUG crash_dump64 A #10 pc 0000000000353428 [anon:dalvik-classes19.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes19.dex]
DEBUG crash_dump64 A #16 pc 00000000000037ba [anon:dalvik-classes7.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes7.dex]
DEBUG crash_dump64 A #22 pc 000000000000342a [anon:dalvik-classes7.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes7.dex]
DEBUG crash_dump64 A #28 pc 000000000000fd7c [anon:dalvik-classes17.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes17.dex]
DEBUG crash_dump64 A #34 pc 00000000000069c0 [anon:dalvik-classes5.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes5.dex]
DEBUG crash_dump64 A #40 pc 0000000000001d2a [anon:dalvik-classes10.dex extracted in memory from /data/app/~~8uXsUgyCHMGMmMbTCHrT_Q==/cn.xymind-ldCGmFV6hShxe3lrOEq5Ew==/base.apk!classes10.dex]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.