Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

关于H264

测试条件:

1、服务端是Ubuntu 14.04,64位。按照文档部署好3.2.1,包括部署好libopenh264.so.0和修改video_agent/agent.toml文件中openh264Enbaled为true

2、在Windows8环境中用VS2015修改CS_WebRTC_Client_SDK_Windows.v3.2.1中的基本例子(即ConferenceSampleQt工程),修改视频编码为H264(mc.video_codec = MediaCodec::H264)。

3、chrome版本是53.0.2785.101 m (64-bit)。在启动chrome的时候添加参数--enable-features=WebRTC-H264WithOpenH264FFmpeg,或者在chrome://flags/中修改“WebRTC H.264 软件视频编码器/解码器”“已启动”

测试过程:

Windows环境中启动基本例子程序(ConferenceSampleQt.exe),视频发布成功。在chrome中可以看到Windows发布的码流画面。然后在chrome://webrtc-internals/中查看Windows发布的码流编码,GoogCodecName仍为VP8

请问我测试过程有问题吗?如何才能验证Windows发布的就是H264码流?

多谢!

Tags (2)
0 Kudos
3 Replies
Highlighted
Employee
13 Views

Chrome默认还是选择VP8,需要在JS代码中显式设置H

Chrome默认还是选择VP8,需要在JS代码中显式设置H.264。

如果你是使用我们的sample页面,尝试按照如下步骤修改。

找到MCU下的文件extras/basic_example/public/script2.js做如下修改:

找到所有conference.publish() 和conference.subscribe()调用的地方:

对于publish调用, 第二个参数原来是个空的json, 现在改为{videoCodec: ‘h264’}

对于subscribe调用,第二个参数如果原来是{video: videoOpt}, 现在改为{video:videoOpt, videoCodec: ‘h264’}。

改完之后刷新chrome页面即可。

0 Kudos
Highlighted
Beginner
13 Views

hi Lei,

hi Lei,

我按照你上面的修改步骤修改后,MCU在编码模式上仍然启用VP8,请问还有什么地方需要修改或者可以查看的相关配置?

2017-06-14 11:43:22,580  - DEBUG: mcu.media.MsdkVideoCompositor - unsetAvatar(0)
2017-06-14 11:43:22,581  - DEBUG: mcu.media.MsdkVideoCompositor - deActivateInput = 0
2017-06-14 11:43:22,581  - DEBUG: mcu.media.MsdkVideoCompositor - flush - wait 1(ms)
2017-06-14 11:43:22,582  - DEBUG: mcu.media.MsdkVideoCompositor - flush successfully after 1(ms)
2017-06-14 11:43:22,582  - DEBUG: mcu.media.MsdkVideoCompositor - Configuring layout
2017-06-14 11:43:22,582  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged is true
2017-06-14 11:43:22,610  - DEBUG: mcu.media.MsdkVideoCompositor - commit customlayout
2017-06-14 11:43:22,610  - DEBUG: mcu.media.MsdkVideoCompositor - swap r <-> b, yuv 0x0, 0x80, 0x80 -> 0x0, 0x80, 0x80
2017-06-14 11:43:22,611  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged sets to false after commitLayout!
2017-06-14 11:43:22,669  - DEBUG: woogeen.VCMFrameEncoder - (0x29347d0)degenerateStream(0)
2017-06-14 11:43:23,300  - DEBUG: woogeen.MsdkFrameEncoder - generateStream[0]: {.width=640, .height=480, .bitrateKbps=800}
2017-06-14 11:43:23,332  - DEBUG: woogeen.MsdkFrameDecoder - (0x22b42f0)Created H.264 deocder.
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - activateInput = 0
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - setAvatar(0) = avatar.180x180.yuv
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - Configuring layout
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged is true
2017-06-14 11:43:23,336  - DEBUG: mcu.media.MsdkVideoCompositor - commit customlayout
2017-06-14 11:43:23,336  - DEBUG: mcu.media.MsdkVideoCompositor - swap r <-> b, yuv 0x0, 0x80, 0x80 -> 0x0, 0x80, 0x80
2017-06-14 11:43:23,337  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged sets to false after commitLayout!
2017-06-14 11:43:24,327  - INFO: woogeen.StreamEncoder - (0x22ba510)Do requeset key frame!
2017-06-14 11:43:24,335  - INFO: woogeen.RawTransport - Increasing the buffer size: 12528
2017-06-14 11:43:24,335  - DEBUG: woogeen.MsdkFrameDecoder - (0x22b42f0)Decode header successed after 0 frames!
2017-06-14 11:43:25,320  - INFO: woogeen.StreamEncoder - (0x22ba510)Do requeset key frame!
2017-06-14 11:43:25,329  - DEBUG: woogeen.MsdkFrameEncoder - degenerateStream[0]
2017-06-14 11:43:25,506  - DEBUG: woogeen.VCMFrameEncoder - (0x22bca80)Create encoder(VP8)
2017-06-14 11:43:25,513  - DEBUG: woogeen.VCMFrameEncoder - (0x22bca80)generateStream: {.width=640, .height=480, .bitrateKbps=800}, simulcastId=0
 

 

0 Kudos
Highlighted
Beginner
13 Views

Hi lei

Hi lei

按照你的修改建议后MCU在编码模式上仍然使用VP8,是否还有其它需要修改或者有哪些条件未满足?

2017-06-14 11:43:23,300  - DEBUG: woogeen.MsdkFrameEncoder - generateStream[0]: {.width=640, .height=480, .bitrateKbps=800}
2017-06-14 11:43:23,332  - DEBUG: woogeen.MsdkFrameDecoder - (0x22b42f0)Created H.264 deocder.
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - activateInput = 0
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - setAvatar(0) = avatar.180x180.yuv
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - Configuring layout
2017-06-14 11:43:23,332  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged is true
2017-06-14 11:43:23,336  - DEBUG: mcu.media.MsdkVideoCompositor - commit customlayout
2017-06-14 11:43:23,336  - DEBUG: mcu.media.MsdkVideoCompositor - swap r <-> b, yuv 0x0, 0x80, 0x80 -> 0x0, 0x80, 0x80
2017-06-14 11:43:23,337  - DEBUG: mcu.media.MsdkVideoCompositor - configChanged sets to false after commitLayout!
2017-06-14 11:43:24,327  - INFO: woogeen.StreamEncoder - (0x22ba510)Do requeset key frame!
2017-06-14 11:43:24,335  - INFO: woogeen.RawTransport - Increasing the buffer size: 12528
2017-06-14 11:43:24,335  - DEBUG: woogeen.MsdkFrameDecoder - (0x22b42f0)Decode header successed after 0 frames!
2017-06-14 11:43:25,320  - INFO: woogeen.StreamEncoder - (0x22ba510)Do requeset key frame!
2017-06-14 11:43:25,329  - DEBUG: woogeen.MsdkFrameEncoder - degenerateStream[0]
2017-06-14 11:43:25,506  - DEBUG: woogeen.VCMFrameEncoder - (0x22bca80)Create encoder(VP8)
2017-06-14 11:43:25,513  - DEBUG: woogeen.VCMFrameEncoder - (0x22bca80)generateStream: {.width=640, .height=480, .bitrateKbps=800}, simulcastId=0

0 Kudos