mobile CCTV,mobile surveillance,police body worn cameras
标题:
视频流推流出错,请问是什么格式的
[打印本页]
author:
cus7
time:
2021-10-19 21:04
标题:
视频流推流出错,请问是什么格式的
public static void inputVideoData(byte[] lpVideoFrame, int dwSize, long dwTimeStamp, int iWidth, int iHeight) {
PUCore.getSDK().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
BVCU.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
if (global_mcu.getMcuShareDate().getPlatformIndex() == PlatformSettingActivity.Platform_28181) {
BV28181.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
} else if (global_mcu.getMcuShareDate().getPlatformIndex() == PlatformSettingActivity.Platform_RtspServer) {
BVRtspServer.getInstance().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
}
}
红色标注的出错了。
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: backtrace:
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #00 pc 0003382c /apex/com.android.runtime/lib/bionic/libc.so (arena_run_heap_remove+1312) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #01 pc 000331b3 /apex/com.android.runtime/lib/bionic/libc.so (arena_run_split_remove+286) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #02 pc 000345f7 /apex/com.android.runtime/lib/bionic/libc.so (arena_run_split_small+142) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #03 pc 0002e2bb /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_malloc_hard+382) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #04 pc 0002decb /apex/com.android.runtime/lib/bionic/libc.so (je_arena_tcache_fill_small+174) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #05 pc 00049fe5 /apex/com.android.runtime/lib/bionic/libc.so (je_tcache_alloc_small_hard+16) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #06 pc 0003f3b1 /apex/com.android.runtime/lib/bionic/libc.so (je_calloc+656) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #07 pc 0002a191 /apex/com.android.runtime/lib/bionic/libc.so (calloc+24) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #08 pc 0000c9fb /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libBugly.so (getProcessName+14) (BuildId: 300e8325e67d6fc6c209450a33e8f85a292b8797)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #09 pc 000064c9 /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libBugly.so (BuildId: 300e8325e67d6fc6c209450a33e8f85a292b8797)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #10 pc 000033bb /system/bin/app_process32 (art::SignalChain::Handler(int, siginfo*, void*)+218) (BuildId: 3828d29d4d168f5ce591a33e42fd0f43)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #11 pc 0004ea90 /apex/com.android.runtime/lib/bionic/libc.so (__restore_rt) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.783 16720-16720/? A/DEBUG: #12 pc 0003413c /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_nonfull_run_tryget+24) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #13 pc 0002e163 /apex/com.android.runtime/lib/bionic/libc.so (arena_bin_malloc_hard+38) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #14 pc 0002decb /apex/com.android.runtime/lib/bionic/libc.so (je_arena_tcache_fill_small+174) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #15 pc 00049fe5 /apex/com.android.runtime/lib/bionic/libc.so (je_tcache_alloc_small_hard+16) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #16 pc 0003df01 /apex/com.android.runtime/lib/bionic/libc.so (je_malloc+596) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #17 pc 0002a253 /apex/com.android.runtime/lib/bionic/libc.so (malloc+18) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #18 pc 00046cc5 /system/lib/libc++.so (operator new(unsigned int)+16) (BuildId: fa0397c630f1e14558b6409ed72175a4)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #19 pc 000a4ce1 /system/lib/libstagefright.so (android::MediaCodec::dequeueInputBuffer(unsigned int*, long long)+32) (BuildId: 45e042a01c822aa959a187af6e6a4155)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #20 pc 0000dc01 /system/lib/libmediandk.so (AMediaCodec_dequeueInputBuffer+20) (BuildId: 4a7af1c45b6319f41551e53c94ac9eb7)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #21 pc 0003c37d /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (VideoEncode::encodeFrame(_SAV_Frame*)+232) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #22 pc 0002af21 /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (CodecThread::videoEncProcess(PUDialog*)+152) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #23 pc 0002b42d /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libbvcu.so (CodecThread::run()+152) (BuildId: 1ed5513f502d373d09f26e6f31a53cd716bc7f04)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #24 pc 00005025 /data/app/com.rokid.smarteye.dev-aKPr7tyS24Z76zbCvq4BqA==/lib/arm/libframework.so (SimpleThread::__run(void*)+24) (BuildId: b0143d7bdbf61b2cf079b55ffe2414b85b5c24f9)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #25 pc 0009c547 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:54.784 16720-16720/? A/DEBUG: #26 pc 000559f7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 86eafa5c12a5d92a0234bc4649e9b5e8)
2021-10-19 20:36:55.100 1549-3046/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.100 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.102 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.104 1549-3046/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
2021-10-19 20:36:55.104 1549-3046/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.105 1549-3031/? E/WifiPermissionsUtil: getUidPermission is DENIED and permissionType android.permission.ACCESS_FINE_LOCATIONuid 10034
2021-10-19 20:36:55.105 1549-3031/? E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidUID 10034 has no location permission
=========================== 上面是崩溃的Log信息 ============================================================
author:
hardfire
time:
2021-10-19 21:08
should be NV21
author:
wanzongyong
time:
2021-10-19 21:11
我们程序使用的是NV21,看日志是编码相关的错误
author:
cus7
time:
2021-10-19 21:19
如果我们用h264的编码, 可以调用哪个接口呢?
author:
wanzongyong
time:
2021-10-19 21:25
编码是SDK内部完成,java层只需要调用inputVideoData接口将nv21的数据传入即可
author:
wanzongyong
time:
2021-10-19 21:27
PUCore.getSDK().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
此方法是将数据传入库中用于视频录制,将时间等信息叠加上
BVCU.getData().inputVideoData(lpVideoFrame, dwSize, dwTimeStamp, iWidth, iHeight);
此方法用于smarteye平台网传,内部会自动编码并完成传输
author:
cus7
time:
2021-10-19 21:40
我在文档
http://up.besovideo.com:7780/android_sdk_bvcu_api/index.html
中发现了
int inputEncodeVideoData(int hDialog, byte[] data, int size, long stamp, int dataType)这个方法,
这个方法不是支持264的么? 这个可以拿到么?
author:
wanzongyong
time:
2021-10-19 21:47
这个目前还不能用,内部逻辑还没完善
author:
wanzongyong
time:
2021-10-20 09:20
查看代码,inputEncodeVideoData可以使用,使用方法如下:
打开网传成功时会回调BVCU_PasvDialogCmd的OnDialogCmd方法,然后调用
BVCU.getData().inputEncodeVideoChannelData(pParam.pTarget[0].iIndexMajor, data, data.length,
System.currentTimeMillis() * 1000, IData.VIDEO_DATA_TYPE_H264_EXTRA_DATA);
将拓展数据 sps pps传入
然后调用
BVCU.getData().inputEncodeVideoChannelData(channel, data, data.length,
System.currentTimeMillis() * 1000, IData.VIDEO_DATA_TYPE_H264_FRAME); // channel是通道号,一般默认0即可
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/)
Powered by Discuz! X3.2