Closed akashhnag closed 4 years ago
Hm, not sure how to diagnose this. My quickest guess would be a change in ffmpeg options; the data coming through should otherwise be the same.
JSMPEG should also be decoding roughly the same.
Do you have a sample video stream to point to that you've seen this happen with?
This particular version (0.0.8) gives blurry videos. The problem gets solved if I use version 0.0.5.
I had the same issue.
Had the same problem with distorted picture on 0.0.8 and downgraded it to 0.0.5. I managed to load buckbunny on 0.0.5 but The problem with it, is it cannot connect to my camera. though 0.0.8 and vlc player work perfectly.
Here's the error:
[rtsp @ 0x1ad7410] Nonmatching transport in server reply rtsp://[USER]:[Password]@192.168.1.100:554/onvif2: Invalid data found when processing input RTSP stream exited with error
This is how it looks
This is how it looks
I'm also having this problem. The ffmpeg process in my case looks like this:
ffmpeg -rtsp_transport tcp -thread_queue_size 512 -r 30 -i rtsp://1.2.3.4:554/profile2 -f mpegts -codec:v mpeg1video -stats -r 30 -
To test if it's a problem on the ffmpeg part, I started this process manually outside of node, changed the output to output.mp4
and then played the file through VLC. Everything looked fine. I guess there's something wrong either with mpeg1muxer on the server side or jsmpeg on the client side.
I've fixed it. This 901dc1e9cff8a30c20b422522d3806578e25cf56 commit was supposed to add compatibility with the latest jsmpeg. Using mpegts causes video artifacts. Just remove these two options to make it work.
--- node_modules/node-rtsp-stream/mpeg1muxer.js.old
+++ node_modules/node-rtsp-stream/mpeg1muxer.js
@@ -28,8 +28,6 @@
"-i",
this.url,
'-f',
- 'mpegts',
- '-codec:v',
'mpeg1video',
// additional ffmpeg options go here
...this.additionalFlags,
Thanks again @TKasperczyk !
Thank you @TKasperczyk !
Finally, It worked. Why didn't I come here before! Thanks alot.
This particular version (0.0.8) gives blurry videos. The problem gets solved if I use version 0.0.5.