soliton4 / BroadwayStream

simply stream a local file and render it with Broadway.js
GNU Lesser General Public License v3.0
91 stars 26 forks source link

raw h.264 stream using broadway #7

Open cruxeon opened 8 years ago

cruxeon commented 8 years ago

Hi,

I have an application which uses the ffmpeg libraries and gives me packets of raw h.264 bitstream which i then want to display on my browser. The details are posted here (link provided to avoid retyping) : http://stackoverflow.com/questions/37574441/decoding-raw-h-264-using-broadway-js

I found this other thread on Broadway repository. Was not sure where to post my query, so just decided to post here :P

While encoding using the ffmpeg libraries, i've made sure to use the Baseline profile as needed. I've been trying to figure this out for a while. Any help is highly appreciated!

soliton4 commented 8 years ago

well this project is intended to be an example of exactly your usecase? how much more help do you need?

cruxeon commented 8 years ago

In your code, I see you do: var bin = toUint8Array(parDataStr); player.decode(bin);

I have my data as an ArrayBuffer and performing player.decode(new Uint8Array(data)); just gives a blank canvas. I don't get any errors thrown out to me in the console either. Not sure how to proceed. :( I'm not the best with js, trying to fig this out.

soliton4 commented 8 years ago

if you send me a link to your github code i could take a look.

cruxeon commented 8 years ago

Hi

Sorry I hadn't responded earlier, I've been away for a bit. On getting back to where I'd left off, here's screenshots of the errors I get from YUVCanvas.js and Decoder.js decoder_error packet_a packet_b

Could you help me understand what to make of these errors and how to go about fixing them?

Background information: I'm working on a streaming module for omegalib Everytime I get a frame from the module, I encode it as h264 and pass it on to another module which streams it to the browser.

soliton4 commented 8 years ago

would be interesting to see whats in e.data

cruxeon commented 8 years ago

Here's a screenshot of e.data for one of the frames e_data

soliton4 commented 8 years ago

i dont see why 11 would be an invalid length