node-red-contrib-homekit-docker icon indicating copy to clipboard operation
node-red-contrib-homekit-docker copied to clipboard

Problem with video playback with copy codec

Open aleksandrdobrynin opened this issue 4 years ago • 5 comments

Hey.

I add cameras with RTSP stream. I specify copy as the codec. Everything is great adding and showing video in Home app on phone. But when you start a broadcast on Apple TV, the broadcast doesn't start. Tell me what could be the problem?

aleksandrdobrynin avatar Oct 31 '20 02:10 aleksandrdobrynin

Hello, I am 99% sure that problem is your configuration but don't worry. We will try to figure it out!

Let's follow these steps at first:

  • stop node-red
  • run node-red with debug DEBUG=NRCHKB* node-red
  • configure Camera Control in Service Node in node-red and tick Debug in Camera section
  • pair Camera Bridge in Home.app
  • open stream for Camera in Home.app
  • error will be printed in console (in place where you executed command to start node-red) but will also print ffmpeg command that was used to open stream
  • run that command in terminal separately to get real problem

Also if you get any errors you can of course share them here.

Shaquu avatar Oct 31 '20 02:10 Shaquu

In the log like this:

NRCHKB:CameraSource +60ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 751 M=1
NRCHKB:CameraSource +81ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 7 of len 45 M=0
NRCHKB:CameraSource [rtp @ 0x7fe6302a5b00] Sending NAL 8 of len 4 M=0
NRCHKB:CameraSource [rtp @ 0x7fe6302a5b00] Sending NAL 5 of len 12782 M=1
NRCHKB:CameraSource +62ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] NAL size 12782 > 1290
NRCHKB:CameraSource +0ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 357 M=1
NRCHKB:CameraSource +60ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 370 M=1
NRCHKB:CameraSource +81ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 180 M=1
NRCHKB:CameraSource +61ms
+1msHKB:CameraSource ffmpeg data: frame= 440 fps= 16 q=-1.0 size= 523kB time=00:00:29.39 bitrate= 145.8kbits/s speed=1.07x
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 246 M=1
NRCHKB:CameraSource +59ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 144 M=1
NRCHKB:CameraSource +62ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 174 M=1
NRCHKB:CameraSource +80ms
NRCHKB:CameraSource Request type: stop +42ms
NRCHKB:CameraSource ffmpeg data: [rtp @ 0x7fe6302a5b00] Sending NAL 1 of len 141 M=1
NRCHKB:CameraSource +19ms
NRCHKB:CameraSource ffmpeg data: [libfdk_aac @ 0x7fe630267f40] Trying to remove 224 more samples than there are in the queue
NRCHKB:CameraSource frame= 444 fps= 16 q=-1.0 Lsize= 524kB time=00:00:29.67 bitrate= 144.6kbits/s speed=1.07x
NRCHKB:CameraSource video:516kB audio:87kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
NRCHKB:CameraSource Input file #0 (rtsp://admin:[email protected]:554/Streaming/Channels/102/):
NRCHKB:CameraSource Input stream #0:0 (video): 444 packets read (528534 bytes);
NRCHKB:CameraSource Input stream #0:1 (audio): 742 packets read (237440 bytes); 742 frames decoded (237440 samples);
NRCHKB:CameraSource Total: 1186 packets (765974 bytes) demuxed
NRCHKB:CameraSource Output file #0 (srtp://192.168.252.72:58249?rtcpport=58249&localrtcpport=58249&pkt_size=1316):
NRCHKB:CameraSource Output stream #0:0 (video): 444 packets muxed (528534 bytes);
NRCHKB:CameraSource Total: 444 packets (528534 bytes) muxed
NRCHKB:CameraSource Output file #1 (srtp://192.168.252.72:53934?rtcpport=53934&localrtcpport=53934&pkt_size=1316):
NRCHKB:CameraSource Output stream #1:0 (audio): 927 frames encoded (474624 samples); 928 packets muxed (89241 bytes);
NRCHKB:CameraSource Total: 928 packets (89241 bytes) muxed
NRCHKB:CameraSource 742 frames successfully decoded, 0 decoding errors
NRCHKB:CameraSource [AVIOContext @ 0x7fe6302a8480] Statistics: 0 seeks, 761 writeouts
NRCHKB:CameraSource [AVIOContext @ 0x7fe6302d9c80] Statistics: 0 seeks, 83 writeouts
NRCHKB:CameraSource Exiting normally, received signal 15.
NRCHKB:CameraSource +3ms
NRCHKB:CameraSource Stopped streaming +2ms

This opens the picture as a snapshot, but the broadcast does not start.

aleksandrdobrynin avatar Oct 31 '20 11:10 aleksandrdobrynin

@aleksandrdobrynin I feel like you cut something of the logs?

Shaquu avatar Nov 03 '20 17:11 Shaquu

image

aleksandrdobrynin avatar Nov 07 '20 11:11 aleksandrdobrynin

I would recommend trying again with the latest images. If you are looking for omx support, and you are using raspbian please use -raspbian images.

Shaquu avatar Jul 21 '21 17:07 Shaquu