xevojapan / h264-converter

MIT License
59 stars 14 forks source link

After conversion, video does not play smooth in chrome browser #2

Open kiran-raj94 opened 6 years ago

kiran-raj94 commented 6 years ago

Hi, I have a web server sending h264 stream which I am trying to play in browser. I've tried a lot of h264 decoders like Broadway.js, openh264, ffmpeg.js to decode and play in a wegGL canvas but none of them does the job right. Each decoder has its own disadvantages. After a long search, I came to know about your h264-converter which is really useful in playing raw h264 data in a browser. But after conversion the mp4 is not smooth, frames play back and forth sometimes and looks kind of shaky. In firefox browser it play fine. This problem occurs only in high profile or main profile which containes b-frames. I came to know that the problem was in the chrome decoder which refers DTS to play each frame and the B-frames get decoded in the wrong order while firefox does it using PTS. Any suggestions, to make it work in chrome?

Thanks, Kiran Raj

horiuchi commented 6 years ago

Hi, Thank you for using this library. This is based on Broadway.js and support the raw h.264 stream only.

I also cannot play smoothly on Chrome. Let me know if you have any idea.

kiran-raj94 commented 5 years ago

Hi, I posted a similar question on stackoverflow https://stackoverflow.com/questions/54003015/play-raw-h264-live-stream-in-browser. The problem seems to be in composition timestamp which should be the difference between pts and dts. But there is no pts mentioned anywhere in your project. Any ideas?