h264-live-player icon indicating copy to clipboard operation
h264-live-player copied to clipboard

server-tcp.js doesn't show any video

Open chrisdew opened this issue 7 years ago • 3 comments

server-rpi.js works fine, when run on the RasPi. So I know my browser (latest Firefox) and camera are fine.

I've amended the IP address in server-tcp.js but it doesn't show any video.

On the desktop I get:

chris@grey:~/h264-live-player$ node server-tcp.js 
New guy
Incomming action 'REQUESTSTREAM'
remote stream ready

and on the Pi, just:

pi@raspberrypi:~ $ raspivid -t 0 -o - -w 1280 -h 720 -fps 25 | nc -k -l 5001

I've also tried the following on the Pi, which confirms the desktop has connected to the Pi:

pi@raspberrypi:~ $ raspivid -t 0 -w 1920 -h 1080 -fps 30 -l -o tcp://0.0.0.0:5001
Waiting for a TCP connection on 0.0.0.0:5001...Client connected from 10.0.0.12:39705

I have used wirehark, and that shows traffic flowing from pi:5001 to the server and sever:8080 traffic to the desktop. So the data is getting to the browser, but it is not being displayed.

This is odd, because the same browser happily shows video from server-rpi.js, running on the Pi.

What have I failed to understand?

chrisdew avatar Aug 09 '17 21:08 chrisdew

Hi @chrisdew @131 I have exactly the same problem. have you found any solution?

mrma95 avatar Sep 03 '17 21:09 mrma95

Hi, can't say that I'm an expert, but please try to start raspivid with profile -pf parameter added like this:

pi@raspberrypi:~ $ raspivid -t 0 -o - -w 960 -h 540 -fps 25 -pf baseline | nc -k -l -v 5001

At least this worked for me.

Also I noticed that if I use any other resolution than 960x540 if fails to show a video. So try to use 960x540 at lease for the first time

mylawacad avatar Oct 01 '17 19:10 mylawacad

I was having the same problems but managed to sort it. I tinkered with the code also have you installed or updated the websocet? Try sudo install wc

mattm1712 avatar Jan 09 '18 19:01 mattm1712