Closed daozhao closed 5 years ago
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.83.100 Duration: 00:40:05.26, start: 0.000000, bitrate: 349 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 248 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default) Metadata: handler_name : SoundHandler
看起来是js端的问题 跟视频没关系
问题依旧 服务端的输出变了
[GIN] 2019/03/05 - 10:52:01 | 200 | 45.18594065s | 127.0.0.1 | GET /ws message play test_streamID [0x700005f24000][1551754321.702][LOG]-RTPBundleTransport::AddICETransport [6325253fec738dd7:QTql] [0x700005f24000][1551754321.702][LOG]-RemoteRateEstimator adding stream [ssrc:0] [0x700005f24000][1551754321.702][LOG]-DTLSConnection::SetSRTPProtectionProfiles() [profiles:''] [0x700005f24000][1551754321.702][LOG]-DTLSICETransport::SetLocalSTUNCredentials() | [frag:6325253fec738dd7,pwd:a9e28bf921119c160f0702448615bbda08313f6a8eb668d2] [0x700005f24000][1551754321.702][LOG]-DTLSICETransport::SetRemoteSTUNCredentials() | [frag:QTql,pwd:Ho3XEZ6YW+6qHa0kC9tiKRIu] [0x700005f24000][1551754321.702][LOG]-DTLSICETransport::SetRemoteCryptoDTLS | [setup:actpass,hash:sha-256,fingerprint:AA:04:D0:AF:6B:7A:08:A0:B2:49:28:16:53:9D:45:18:8E:4D:19:4E:62:FD:01:A0:3A:C7:69:61:45:64:71:4B] [0x700005f24000][1551754321.702][LOG]-DTLSConnection::SetRemoteSetup() | [remote:2] [0x700005f24000][1551754321.702][LOG]>DTLSConnection::Init() [0x700005f24000][1551754321.702][LOG]<DTLSConnection::Init() [0x700005f24000][1551754321.702][LOG]-Created thread [0x6cf1a80] [0x700006754000][1551754321.702][LOG]>DTLSICETransport::Run() | [0x6cf1800] [0x700005f24000][1551754321.702][LOG]-AddOutgoingSourceGroup [group:0x5abc780,ssrc:1000000009,fec:0,rtx:0] [0x700005f24000][1551754321.703][LOG]-AddOutgoingSourceGroup [group:0x5abcae0,ssrc:1000000010,fec:0,rtx:0] [123 34 100 97 116 97 34 58 123 34 115 100 112 34 58 34 118 61 48 92 114 92 110 111 61 45 32 49 53 53 49 55 53 52 51 50 49 55 48 51 48 56 50 48 48 48 32 49 32 73 78 32 73 80 48 32 49 50 55 46 48 46 48 46 49 92 114 92 110 115 61 109 101 100 105 97 92 ................. [0x7000060ad000][1551754674.157][LOG]-DTLSConnection::onSSLInfo() | DTLS handshake done [0x7000060ad000][1551754674.157][LOG]-DTLSICETransport::onDTLSSetup() [suite:1] [0x7000060ad000][1551754674.157][LOG]-DTLSICETransport::SetLocalCryptoSDES() | suite: AES_CM_128_HMAC_SHA1_80 [0x7000060ad000][1551754674.157][LOG]-DTLSICETransport::SetRemoteCryptoSDES() | suite: AES_CM_128_HMAC_SHA1_80
js没有报错了。不过还是没有视频出现。依然转圈圈。
这个不知道从何查起。
使用chrome://webrtc-internals/ 看了一下,发觉没有收到数据包。视频和音频都没有收到。
检查视频文件 视频baseline gop放小一点 我测试的视频是gop为1秒
视频已经参照你视频参数修改了,gop也改为1秒了。情况依旧。 还可以检查那里?
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'wjd.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.12.100 Duration: 00:07:48.28, start: 0.000000, bitrate: 351 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 27:32 DAR 3:2], 248 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default) Metadata: handler_name : SoundHandler
有可能gstreamer 的相关的插件没装 可以把完备的log贴一下
果然是gstreamer插件问题。原来我只安装了gst-plugins-base。 把gst-plugins-good,gst-plugins-ugly,gst-plugins-bad全部都安装上。 就可以了。谢谢。
推流命令: ffmpeg -re -i IMG_2817.mp4 -vcodec copy -acodec copy -f flv rtmp://localhost/live/test_streamID
服务端没有什么异常报错:
chrome浏览器
个人估计是视频格式问题。目前我的视频格式: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x368, 447 kb/s, 21 fps, 21 tbr, 10752 tbn, 42 tbc (default) Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 48 kb/s (default)
你方便把你测试的mp4文件上传一少端给我测试下么?或者你对视频格式的要求是怎样?
谢谢。