bgrins / videoconverter.js

[UNMAINTAINED] Convert videos in your browser
http://bgrins.github.io/videoconverter.js/
Other
2.34k stars 300 forks source link

h264 stream to yuv #60

Open AmdEagle opened 7 years ago

AmdEagle commented 7 years ago

I have a h264 stream ( main profile ) from in from a websocket( NAL Units ). I would to know how to use your library to convert h264 stream[ Uint8Array ] to YUV so that i can display it on a html5 canvas

adminy commented 7 years ago

Um there is a thing you can do. Its not exactly what you ask but it should also work.

-i input.h264 -c:v copy -f mp4 output.mp4

Then put that in a html5 video tag. Currently I am trying to do that but we need to fix issue #64 for it to work. Think of it this way! You'll have far greater support and way faster decoding speed! Also you could mux audio in as well! It will be so much faster too! Because instead of decoding each frame you are just boxing the h264 into an mp4 container so the browser can natively decode it.