mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
Owner: besovideo
打印 prevThread nextThread

MPU里面的视频编码分辨率是从设备查询上报来的吗?

[copyURL]

60

主题

1428

帖子

5953

积分

Moderator

Rank: 7Rank: 7Rank: 7

积分
5953
11#
 Owner| poston 2019-11-19 09:56 | authorOnly
嗯,有不同的流,我们用的是Preview流。可能差异就在这里吧?
reply agree Against

使用道具 report

5

主题

35

帖子

127

积分

member

Rank: 2

积分
127
12#
poston 2019-11-19 10:38 | authorOnly
打印出来的log:
getSupportedPreviewSizes strList = [640x480, 640x360, 576x432, 480x360, 480x320, 384x288, 352x288, 320x240, 240x320, 240x160, 176x144, 144x176, 160x120]
adb dump出来的数据如下:
        preview-flip: off
        preview-format: yuv420sp
        preview-format-values: yuv420sp,yuv420p,nv12-venus
        preview-fps-range: 30000,30000
        preview-fps-range-values: (15000,15000),(20000,20000),(24000,24000),(7000,30000),(30000,30000)
        preview-frame-rate: 30
        preview-frame-rate-values: 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
        preview-size: 640x480
        preview-size-values: 640x480,640x360,576x432,480x360,480x320,384x288,352x288,320x240,240x320,240x160,176x144,144x176,160x120

reply agree Against

使用道具 report

5

主题

35

帖子

127

积分

member

Rank: 2

积分
127
13#
poston 2019-11-19 10:45 | authorOnly
用 Camera.Parameters.getSupportedPreviewSizes()打印出来的数据为:
getSupportedPreviewSizes strList = [640x480, 640x360, 576x432, 480x360, 480x320, 384x288, 352x288, 320x240, 240x320, 240x160, 176x144, 144x176, 160x120]
与adb shell dumpsys media.camera | grep preview   这条指令dump出来的数据是一致的
preview-flip: off
        preview-format: yuv420sp
        preview-format-values: yuv420sp,yuv420p,nv12-venus
        preview-fps-range: 7000,30000
        preview-fps-range-values: (15000,15000),(20000,20000),(24000,24000),(7000,30000),(30000,30000)
        preview-frame-rate: 30
        preview-frame-rate-values: 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
        preview-size: 640x480
        preview-size-values: 640x480,640x360,576x432,480x360,480x320,384x288,352x288,320x240,240x320,240x160,176x144,144x176,160x120
         preview-flip: off
        preview-format: yuv420sp
        preview-format-values: yuv420sp,yuv420p,nv12-venus
        preview-fps-range: 30000,30000
        preview-fps-range-values: (15000,15000),(20000,20000),(24000,24000),(7000,30000),(30000,30000)
        preview-frame-rate: 30
        preview-frame-rate-values: 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30
        preview-size: 640x480
        preview-size-values: 640x480,640x360,576x432,480x360,480x320,384x288,352x288,320x240,240x320,240x160,176x144,144x176,160x120

       这个跟我们要讨论的视频图传分辨率有什么关系呢?
reply agree Against

使用道具 report

5

主题

35

帖子

127

积分

member

Rank: 2

积分
127
14#
poston 2019-11-19 10:49 | authorOnly
在运行MPU之后,dump出来的值是:
        C:\Users\jiana>adb shell dumpsys media.camera | grep preview
        preferred-preview-size-for-video: 1920x1080
        preview-format: yuv420sp
        preview-format-values: yuv420p,yuv420sp,
        preview-fps-range: 7000,30000
        preview-fps-range-values: (15000,15000),(20000,20000),(24000,24000),(7000,30000),(30000,30000)
        preview-frame-rate: 30
        preview-frame-rate-values: 15,20,24,30
        preview-size: 1920x1080
        preview-size-values: 1920x1080,1600x1200,1440x1080,1280x960,1280x768,1280x720,1200x1200,1024x768,800x600,864x480,800x480,720x480,640x480,640x360,480x640,480x360,480x320,352x288,320x240,240x320,176x144,160x120,144x176
   Active request: preview (paused: no)

      这也不是固件原始的数据。也是被改变了的。跟MPU视频分辨率一致了。
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
15#
poston 2019-11-19 10:50 | authorOnly
janeyre post on2019-11-19 10:45
用 Camera.Parameters.getSupportedPreviewSizes()打印出来的数据为:
getSupportedPreviewSizes strList  ...

图传的图像就是来自预览流,预览的分辨率来自getSupportedPreviewSizes
reply agree Against

使用道具 report

5

主题

35

帖子

127

积分

member

Rank: 2

积分
127
16#
poston 2019-11-19 11:00 | authorOnly
现在的问题是为什么 运行MPU的时候,preview-size-values会变成不一样的参数? 我的demo运行时的得到的数据是很少的。
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
17#
poston 2019-11-19 11:08 | authorOnly
janeyre post on2019-11-19 11:00
现在的问题是为什么 运行MPU的时候,preview-size-values会变成不一样的参数? 我的demo运行时的得到的数据 ...

我这边写的单独一个demo获取的分辨率如下:
2016-12-31 16:30:22.628 11695-11695/? D/MainActivity: 1920*1080
2016-12-31 16:30:22.628 11695-11695/? D/MainActivity: 1600*1200
2016-12-31 16:30:22.628 11695-11695/? D/MainActivity: 1440*1080
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 1280*960
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 1280*768
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 1280*720
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 1200*1200
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 1024*768
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 800*600
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 864*480
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 800*480
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 720*480
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 640*480
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 640*360
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 480*640
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 480*360
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 480*320
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 352*288
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 320*240
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 240*320
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 176*144
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 160*120
2016-12-31 16:30:22.629 11695-11695/? D/MainActivity: 144*176
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
18#
poston 2019-11-19 11:09 | authorOnly
janeyre post on2019-11-19 11:00
现在的问题是为什么 运行MPU的时候,preview-size-values会变成不一样的参数? 我的demo运行时的得到的数据 ...

代码如下:
                        if (mCamera == null) {
                                mCamera = Camera.open();
                        }
                        Camera.Parameters parameters = mCamera.getParameters();
                        parameters.setPreviewFormat(ImageFormat.NV21);
                        List<Size> sizes = parameters.getSupportedPreviewSizes();
                        for(Size size:sizes){
                                Log.d(TAG,size.width+"*"+size.height);
                        }
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
19#
poston 2019-11-19 11:12 | authorOnly
janeyre post on2019-11-19 11:00
现在的问题是为什么 运行MPU的时候,preview-size-values会变成不一样的参数? 我的demo运行时的得到的数据 ...

按照你测试结果,测试demo只是调用getSupportedPreviewSizes,dump参数不是也发生了变化了么
reply agree Against

使用道具 report

5

主题

35

帖子

127

积分

member

Rank: 2

积分
127
20#
poston 2019-11-19 11:21 | authorOnly
我运行demo getSupportedPreviewSizes打印的数据和dump出来的数据是一致的。 没有变化呀!
都是——[640x480, 640x360, 576x432, 480x360, 480x320, 384x288, 352x288, 320x240, 240x320, 240x160, 176x144, 144x176, 160x120]

但是运行MPU之后,再去dump就变成了——1920x1080,1600x1200,1440x1080,1280x960,1280x768,1280x720,1200x1200,1024x768,800x600,864x480,800x480,720x480,640x480,640x360,480x640,480x360,480x320,352x288,320x240,240x320,176x144,160x120,144x176  
多出来很多分辨率。这是我无法理解的。
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-22 19:40 , Processed in 0.057614 second(s), 18 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList