AnyChat技术支持论坛
标题: iOS视频裁剪 [打印本页]
作者: huquan1991 时间: 2016-3-4 13:31
标题: iOS视频裁剪
[AnyChatPlatform SetSDKOptionInt:BRAC_SO_RECORD_CLIPMODE :ANYCHAT_VIDEOCLIPMODE_DYNAMIC];
调用这个方法 怎么不起作用 拍摄的视频还是会裁剪
作者: 佰锐科技-李永星 时间: 2016-3-4 13:42
您好,http://bbs.anychat.cn/forum.php? ... 1071&highlight=2üô
作者: 佰锐科技-邵光清 时间: 2016-3-4 13:43
您好,需要在录制之前设置裁剪模式,参见:视频显示、录制过程中的裁剪模式控制接口
作者: huquan1991 时间: 2016-3-4 13:51
UserVideoSettings.plist 和VideoSettings.plist 这两个需要动吗 我照着AnyChatSelfRecord这个demo来的 只是我录制视频时采用的服务器录制 其他都一样 但是我的最后就裁剪了
作者: 佰锐科技-邵光清 时间: 2016-3-4 14:52
您好,仅需要设置视频剪切模式即可,其他方面不用更改。
作者: huquan1991 时间: 2016-3-4 14:57
我设置了啊 设置的动态模式 我现在每一个VC里面都设置[AnyChatPlatform SetSDKOptionInt:BRAC_SO_RECORD_CLIPMODE :ANYCHAT_VIDEOCLIPMODE_DYNAMIC];
动态模式 打印+ (int) GetSDKOptionIntint) optname 的返回值 一直都是0 没有改过来
作者: huquan1991 时间: 2016-3-4 14:58
我设置了啊 设置的动态模式 我现在每一个VC里面都设置[AnyChatPlatform SetSDKOptionInt:BRAC_SO_RECORD_CLIPMODE :ANYCHAT_VIDEOCLIPMODE_DYNAMIC];
动态模式 打印+ (int) GetSDKOptionIntint) optname 的返回值 一直都是0 没有改过来
作者: 佰锐科技-邵光清 时间: 2016-3-4 16:09
您好,参考一下这个:http://my.oschina.net/plumsoft/blog/76128
修改一下contentMode。
作者: huquan1991 时间: 2016-3-7 17:07
您好 我的情况是这样的 我在我的主工程里初始化的SDK,push到自己写的拍照页面,然后拍完预览后再push到录制视频这,录制视频采用的服务器录制 录完后在push到预览视频 用的一个webview加载的这个回调的URL ,我在这里面各个页面都设置了 [AnyChatPlatform SetSDKOptionInt:BRAC_SO_RECORD_CLIPMODE :ANYCHAT_VIDEOCLIPMODE_DYNAMIC] 但是拍照是全的,视频就裁剪了一块,我又设置加载这个视频的webview的contentMode 结果还是不行 还有可能是什么地方有问题
作者: 佰锐科技-邵光清 时间: 2016-3-7 17:31
您好,视频通话时是否正常?录制视频有剪切时本地还是远程视频剪切了呢?
顺便也将客户端日志发上来,谢谢。
作者: huquan1991 时间: 2016-3-7 18:22
好的 我没做视频通话 只是要集成一个视频录制的功能 照着AnyChatSelfRecord这个Demo写的 本地视频音频都正常 也无裁剪 但是设置服务器录制时 就出现了裁剪这种状况 下面是从拍照开始到视频预览的所有日志 麻烦您帮忙看一下
2016-03-07 18:19:21.875 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=1)
2016-03-07 18:19:21.904 OpenAccount[3486:964509] Invoke SetVideoPos(dwUserId:-1, hWnd:0x476ed520, l:0, t:0, r:0, b:0)
2016-03-07 18:19:21.909 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=1, stream=0)
2016-03-07 18:19:22.015 OpenAccount[3486:964547] WARNING: -[<AVCaptureConnection: 0x740104b0> isVideoMinFrameDurationSupported] is deprecated. Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2016-03-07 18:19:22.015 OpenAccount[3486:964547] WARNING: -[<AVCaptureConnection: 0x740104b0> setVideoMinFrameDuration:] is deprecated. Please use AVCaptureDevice setActiveVideoMinFrameDuration
2016-03-07 18:19:22.182 OpenAccount[3486:964547] video init finish: 1280x720, 25fps, fmt:100, ret:0
2016-03-07 18:19:22.188 OpenAccount[3486:964547] video init finish:1280x720, YUV420, fps:25, codecid:1
[libx264 @ 0x1479e5e10] using cpu capabilities: none!
[libx264 @ 0x1479e5e10] profile High, level 3.1
2016-03-07 18:19:22.227 OpenAccount[3486:964526] video codec init:codec:1, 12fps, 1280x720, bitrate:180kbps, quality:3, preset:2, gop:30, handle:3
2016-03-07 18:19:40.255 OpenAccount[3486:964509] Invoke SnapShot(-1, 0x400, 0)=0
[image2 @ 0x1478f5210] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[swscaler @ 0x100f60010] deprecated pixel format used, make sure you did set range correctly
2016-03-07 18:19:40.389 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=0)
2016-03-07 18:19:40.395 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=0, stream=0)
2016-03-07 18:19:44.093 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=1)
2016-03-07 18:19:44.121 OpenAccount[3486:964509] Invoke SetVideoPos(dwUserId:-1, hWnd:0x476ed520, l:0, t:0, r:0, b:0)
2016-03-07 18:19:44.126 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=1, stream=0)
2016-03-07 18:19:44.129 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=0)
2016-03-07 18:19:44.134 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=0, stream=0)
2016-03-07 18:19:44.152 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=0)
2016-03-07 18:19:44.156 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=0, stream=0)
2016-03-07 18:19:44.161 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=1)
2016-03-07 18:19:44.190 OpenAccount[3486:964509] Invoke SetVideoPos(dwUserId:-1, hWnd:0x4a957c30, l:0, t:0, r:0, b:0)
2016-03-07 18:19:44.195 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=1, stream=0)
2016-03-07 18:19:44.300 OpenAccount[3486:964547] WARNING: -[<AVCaptureConnection: 0x7400c3d0> isVideoMinFrameDurationSupported] is deprecated. Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2016-03-07 18:19:44.302 OpenAccount[3486:964547] WARNING: -[<AVCaptureConnection: 0x7400c3d0> setVideoMinFrameDuration:] is deprecated. Please use AVCaptureDevice setActiveVideoMinFrameDuration
2016-03-07 18:19:44.484 OpenAccount[3486:964547] video init finish: 352x288, 25fps, fmt:106, ret:0
2016-03-07 18:19:44.487 OpenAccount[3486:964547] video init finish:352x288, NV12, fps:25, codecid:1
[libx264 @ 0x1481c2210] using cpu capabilities: none!
[libx264 @ 0x1481c2210] profile High, level 1.2
2016-03-07 18:19:44.528 OpenAccount[3486:964721] video codec init:codec:1, 12fps, 352x288, bitrate:180kbps, quality:3, preset:2, gop:30, handle:4
2016-03-07 18:19:47.722 OpenAccount[3486:964509] Invoke StreamRecordCtrlEx(-1, 1, 0x807, 0, StartLocolSelfRecord)=0
2016-03-07 18:20:07.731 OpenAccount[3486:964509] Invoke StreamRecordCtrlEx(-1, 0, 0x807, 0, StopLocolRecord)=0
2016-03-07 18:20:09.526 OpenAccount[3486:964509] Invoke UserSpeakControl(userid=-1,bOpen=0)
2016-03-07 18:20:09.532 OpenAccount[3486:964509] Invoke UserCameraControl(userid=-1, bOpen=0, stream=0)
[libx264 @ 0x1481c2210] frame I:9 Avg QP:21.94 size: 7488
[libx264 @ 0x1481c2210] frame P:232 Avg QP:22.44 size: 1660
[libx264 @ 0x1481c2210] mb I I16..4: 15.4% 52.1% 32.5%
[libx264 @ 0x1481c2210] mb P I16..4: 5.4% 4.0% 0.2% P16..4: 63.5% 0.0% 0.0% 0.0% 0.0% skip:27.0%
[libx264 @ 0x1481c2210] 8x8 transform intra:44.5% inter:44.6%
[libx264 @ 0x1481c2210] coded y,uvDC,uvAC intra: 58.0% 30.8% 4.1% inter: 22.2% 15.5% 0.6%
[libx264 @ 0x1481c2210] i16 v,h,dc,p: 28% 25% 34% 13%
[libx264 @ 0x1481c2210] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 16% 37% 3% 5% 6% 4% 4% 10%
[libx264 @ 0x1481c2210] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 19% 18% 3% 6% 7% 6% 4% 14%
[libx264 @ 0x1481c2210] i8c dc,h,v,p: 53% 28% 12% 7%
[libx264 @ 0x1481c2210] Weighted P-Frames: Y:7.3% UV:2.2%
[libx264 @ 0x1481c2210] kb/s:180.29
作者: 佰锐科技-邵光清 时间: 2016-3-7 18:50
本帖最后由 佰锐科技-邵光清 于 2016-3-7 19:43 编辑
您好,您使用默认剪切模式,通过修改一下视频分辨率,是否效果会好一点呢?
作者: huquan1991 时间: 2016-3-8 12:07
您好 我设置分辨率为480 x 360 结果裁剪的更多啊 原来还能看到anychat的一半 现在一点都看不到了 我为什么修改剪切模式不起效果呢 安卓的改了这个参数 就可以了
作者: huquan1991 时间: 2016-3-8 13:46
我的代码基本上参照AnyChatSelfRecord这个Demo写的 但是就是设置参数后还是默认的
作者: 佰锐科技-陈伟 时间: 2016-3-8 18:01
您好 我们这边还在测试,有反馈会及时通知到您!
作者: huquan1991 时间: 2016-3-9 09:11
好的 谢谢了
作者: Mr_chen 时间: 2017-7-10 17:38
2017-07-10 17:13:18.131873+0800 ixit[2973:1121198] Default Audio Capture Driver()
2017-07-10 17:13:18.133028+0800 ixit[2973:1121198] Audio Init, error:0, device:0, 1, 16000, 16, capmode:0
2017-07-10 17:13:18.136237+0800 ixit[2973:1121198] Audio codec init, handle:1, 11, 1, 16000, 16, 15850
2017-07-10 17:13:18.198690+0800 ixit[2973:1121259] Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
2017-07-10 17:13:18.221928+0800 ixit[2973:1121198] WARNING: -[<AVCaptureConnection: 0x7401f070> isVideoMinFrameDurationSupported] is deprecated. Please use AVCaptureDevice activeFormat.videoSupportedFrameRateRanges
2017-07-10 17:13:18.221996+0800 ixit[2973:1121198] WARNING: -[<AVCaptureConnection: 0x7401f070> setVideoMinFrameDuration:] is deprecated. Please use AVCaptureDevice setActiveVideoMinFrameDuration
2017-07-10 17:13:18.399053+0800 ixit[2973:1121198] video init finish: 352x288, 25fps, fmt:106, ret:0
[NULL @ 0x104268810] [IMGUTILS @ 0x16e9ca628] Picture size 60x0 is invalid
[NULL @ 0x104268810] Ignoring invalid width/height values
[NULL @ 0x104268810] [IMGUTILS @ 0x16e9ca5f8] Picture size 0x0 is invalid
这种崩溃如何处理
欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) |
Powered by Discuz! X3 |