Giter Club home page Giter Club logo

Comments (12)

terry8204 avatar terry8204 commented on July 24, 2024

降低下分辨率就可以:从D1分辨率降低到了CIF 播放很流畅
image

from mpegts.js.

terry8204 avatar terry8204 commented on July 24, 2024

老大 找到解决办法:降低播放帧率,设备上传到帧率是7帧,开始播放到时候我用的12帧,现在我也改成了 7帧 ,高分辨率也可以了

from mpegts.js.

xqq avatar xqq commented on July 24, 2024

浏览器报:
mpegts.js:1 [TSDemuxer] > Probe data 13 bytes is too few for judging MPEG-TS stream format!
导致播放不了,不知道是需要调整哪?左边是浏览器,右边播放的是IINA 播放器

试一下 flv.js 是否有此问题?

from mpegts.js.

terry8204 avatar terry8204 commented on July 24, 2024

from mpegts.js.

terry8204 avatar terry8204 commented on July 24, 2024

from mpegts.js.

terry8204 avatar terry8204 commented on July 24, 2024

出现这个问题后,视频要等待9~10秒左右才出现,console 播放有打印提示,应该可以把这个等待时间缩短,1秒应该可以拿到很多数据不?
image

from mpegts.js.

LirLiu avatar LirLiu commented on July 24, 2024

老大 找到解决办法:降低播放帧率,设备上传到帧率是7帧,开始播放到时候我用的12帧,现在我也改成了 7帧 ,高分辨率也可以了

如何设置帧率的,如何知道设备上传的帧率?

from mpegts.js.

xqq avatar xqq commented on July 24, 2024

TSDemuxer 的那行 error log 不影响 flv 播放。

seek to 9.34反映出流有问题,请提供至少1分钟的 flv dump

from mpegts.js.

CodeHuai avatar CodeHuai commented on July 24, 2024

虽然我也遇到,但是很奇怪。它能显示

from mpegts.js.

kingecg avatar kingecg commented on July 24, 2024

这是一个TSDemuxer.probe抛出来的错误。它为了检测流是否是mpegts格式,要求初始长度大于3个ts包(3*188)。
我写了个ws的loader,在拿到第一个数据时判断下,如果不满足条件就直接丢弃,等待满足条件的包。这样能绕开这个问题。

_dispatchArrayBuffer (arraybuffer) {
        let chunk = arraybuffer;
        let byteStart = this._receivedLength;
        if(byteStart === 0 && chunk.byteLength<3*188){
            // drop and wait key frame
            let data = new Uint8Array(chunk);
            if (data[0] !== 0x46 || data[1] !== 0x4C || data[2] !== 0x56 || data[3] !== 0x01) {
                // not flv stream header
                // drop it
                return 
            }
           
        }
        this._receivedLength += chunk.byteLength;

        if (this._onDataArrival) {
            this._onDataArrival(chunk, byteStart, this._receivedLength);
        }
    }

from mpegts.js.

SuperChrisliu avatar SuperChrisliu commented on July 24, 2024

看了一下代码,先判断是不是TSif ((probeData = TSDemuxer.probe(data)).match), 使用websocket传输flv流时,第一个frame是flv标志,只有9个byte,所以必定会报错logger.js:38 [TSDemuxer] > Probe data 9 bytes is too few for judging MPEG-TS stream format!
image

from mpegts.js.

SuperChrisliu avatar SuperChrisliu commented on July 24, 2024

判断逻辑有问题

from mpegts.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.