homebridge-plugins / homebridge-camera-ffmpeg

Homebridge Plugin Providing FFmpeg-based Camera Support
https://homebridge-plugins.github.io/homebridge-camera-ffmpeg/
Apache License 2.0
1.09k stars 227 forks source link

What do the 0:0 mean in Map Video #723

Closed slvrscoobie closed 4 years ago

slvrscoobie commented 4 years ago

Describe The Problem:

Im trying to use stream 2 on my Amcrest but I tried 2, 2:0, 2:2, and 0:2 but I can't tell if anything is working. To Reproduce:

Logs:

Show the Homebridge logs here.
Remove any sensitive information.

Homebridge Config:

Show your homebridge config.json here.
Remove any sensitive information, such as your homebridge-gsh / google-smarthome token.

Screenshots:

Environment:

Sunoo commented 4 years ago

Not familiar with that camera, but typically video is on stream 0:0 and audio is on stream 0:1. You could run ffprobe to get a list of available streams from your camera, and set the ones that look correct for your setup.

There are a few Amcrest configurations in the Tested Configurations database, maybe try some of those?

slvrscoobie commented 4 years ago

I checked those tested configs, none mention the stream options. I can get the camera connected - but the main stream 0, is H265, stream 1 is vga, and stream 2 is 1920x1080 h264. that's what im trying to figure out how to set it in the settings.

Sunoo commented 4 years ago

Does anything in iSpyConnect help? I see a few that have a channel number on the URL, is that what you’re looking for?

slvrscoobie commented 4 years ago

Hmm thats a good point, Im not pointing the URL at my camera, I was pointing it at my SS RTSP URL, but thats only getting 1 stream so it doesn't care.. let me circle back and see if I can get the cameras RTSP url, and pull it from there.

slvrscoobie commented 4 years ago

ok I think I straightened it out. I got the Amcrest RTSP URL - works in VLC but its kinda buggy in FFMpeg - takes about 20 seconds to load the stream running on a Synology Docker station, and once it does it loads the logs with these errors: [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [verbose] 5 dup! [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [info] frame= 265 fps= 51 q=40.0 size= 349kB time=00:00:08.80 bitrate= 325.1kbits/s dup=221 drop=5 speed=1.68x
[8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [rtsp @ 0x7f7c073df000] [warning] max delay reached. need to consume packet [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [rtsp @ 0x7f7c073df000] [warning] RTP: missed 24 packets [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [verbose]
5 dup! [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [h264 @ 0x7f7c07485b00] [error] left block unavailable for requested intra mode [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [h264 @ 0x7f7c07485b00] [error] error while decoding MB 0 10, bytestream 181705 [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [h264 @ 0x7f7c07485b00] [info] concealing 2849 DC, 2849 AC, 2849 MV errors in I frame [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [verbose] 5 dup! [8/13/2020, 12:02:10 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [verbose] 5 dup! [8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [info] frame= 283 fps= 48 q=34.0 size= 366kB time=00:00:09.40 bitrate= 319.1kbits/s dup=236 drop=5 speed= 1.6x
[8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [verbose] *** 5 dup! [8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [8/13/2020, 12:02:11 PM] [Camera FFmpeg] [Driveway] [warning] rtsp://xxx:xxxx@xxx.xxx.xxx.xxx/cam/realmonitor?channel=1&subtype=2: corrupt decoded frame in stream 0 Im using the H264 decoder.

Sunoo commented 4 years ago

Yea, FFmpeg does not look happy there, and it's reporting 236 frames of the 283 it received were duplicates, which is really bad. It is also reporting corrupt frames... you could try adding -fflags +discardcorrupt to the beginning of your source config option to see if that helps any.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.