phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.37k stars 1.43k forks source link

Macro size tearing in display #82

Closed Stylesoftware closed 8 years ago

Stylesoftware commented 8 years ago

I get something that looks like interlace but over a span of 50 lines, every second mega line is torn about 70% to the left of where it should be. Tried 640x480 and 320x200, also set the camera source to either of these. My camera source is stuck at 15 fps, however it works fine for normal ffmpeg yuyv operations. (such as ffplay and ffserver) and have to use 30 for mpeg1.

Here is the picture: jsmpeg streaming problem

Here is one of the many ffmpeg commands I tried: ffmpeg -s 320x200 -f video4linux2 -i /dev/video1 -f mpeg1video -b:v 400k -r 30 http://localhost:8082/abc/320/200/

Where to go from here? Love how quick this software is...

Stylesoftware commented 8 years ago

Eh some kind of size problem, it started working / my bad...

phoboslab commented 8 years ago

Just for the record: this happens when the stream is in a different size than what jsmpeg expects. I.e. when you call

ffmpeg ... -s 640x480 http://127.0.0.1:8080/secret/320/240

the nodejs server and jsmpeg expects a 320x240 stream, while it really is 640x480.