samirkumardas / jmuxer

jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Other
555 stars 112 forks source link

When H264 decode error happen,it can't continue to decode and show video later #9

Closed waiter89 closed 6 years ago

waiter89 commented 6 years ago

index.html.txt

samirkumardas commented 6 years ago

You have not provide any time information. You can provide chunk duration during feed OR you can use a fixed frame rate and fps can be defined when you instantiate the jmuxer.

function parse(data) {
        var input = new Uint8Array(data),
            dv = new DataView(input.buffer),
            video;
        video = input.subarray(16);

        return {
          video: video
                duration: ??? -----> missing
        };
    }

There is no duration present in your feed data. If you don't know your chunk duration and have a fixed frame rate then you can set during instantiate.

jmuxer = new JMuxer({
             node: 'player',
             flushingTime:150,
             mode:'video',
                         fps: 24  -------> you can set  fps  here
          });

I am closing your other issue since it is duplicate

samirkumardas commented 6 years ago

Duplicate https://github.com/samirkumardas/jmuxer/issues/9