I'm having an issue getting streams going to Channels DVR from my 3 POE IP Security Cameras. I can use the below URLs (user/password redacted) to view the stream successfully with VLC, but when I try to go through the web-client, I never get the stream to load.
VLC doesn't report anything funky with the codec parameters (for sub-stream):
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Type:Video
Video Resolution:704x480
Buffer Dimensions:704x480
Frame Rate: 29.97
Main Stream is the same except indicates normal 4k video resolution (3840 x 2160)
There is no audio for the camera, so I don't know if that could be causing an issue?
I triple-checked that I was setup for MPEG-TS in the configuration. I tried both subtype=0 and subtype=1, thinking it might be a 4k h.264 high encoding issue (on the main feed), but no change in results.
Here is my .m3u file:
#EXTM3U
#EXTINF:-1 channel-id="GarageDoor" channel-number="2001" tvg-name="GarageDoor" tvc-guide-title="Garage Door" tvc-guide-description="Security Camera for Garage Door" tvc-stream-vcodec="h264",GarageDoor
rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
#EXTINF:-1 channel-id="FrontDoor" channel-number="2002" tvg-name="FrontDoor" tvc-guide-title="Front Door" tvc-guide-description="Security Camera for Front Door" tvc-stream-vcodec="h264",FrontDoor
rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
#EXTINF:-1 channel-id="BackDoor" channel-number="2003" tvg-name="BackDoor" tvc-guide-title="Back Door" tvc-guide-description="Security Camera for Back Door" tvc-stream-vcodec="h264",BackDoor
rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
Here is the log messaging I get:
2021/01/29 16:59:53.053418 [TNR] Opened connection to M3U-IPCameras for ch2001 GarageDoor
2021/01/29 16:59:53.054955 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:54.375929 [HLS] ffmpeg: rtsp-GarageDoor: [mpegts @ 0x58ae300] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2021/01/29 16:59:54.375976 [HLS] ffmpeg: rtsp-GarageDoor: [mpegts @ 0x58ae300] first pts value must be set
2021/01/29 16:59:54.375988 [HLS] ffmpeg: rtsp-GarageDoor: av_interleaved_write_frame(): Invalid data found when processing input
2021/01/29 16:59:54.378490 [ERR] Error during stream M3U-IPCameras ch2001 GarageDoor: exit status 1
2021/01/29 16:59:54.378852 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:54.419268 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:54.419331 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
2021/01/29 16:59:55.059532 [TNR] Sharing existing connection to M3U-IPCameras for ch2001 GarageDoor (clients=2, len=0)
2021/01/29 16:59:55.060604 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:55.070354 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:55.114630 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:55.114697 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
2021/01/29 16:59:56.125327 [TNR] Sharing existing connection to M3U-IPCameras for ch2001 GarageDoor (clients=3, len=0)
2021/01/29 16:59:56.126440 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:56.136159 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:56.175134 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:56.175202 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
2021/01/29 16:59:57.067426 [TNR] Sharing existing connection to M3U-IPCameras for ch2001 GarageDoor (clients=4, len=0)
2021/01/29 16:59:57.068564 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:57.078311 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:57.122153 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:57.122220 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
2021/01/29 16:59:58.131501 [TNR] Sharing existing connection to M3U-IPCameras for ch2001 GarageDoor (clients=5, len=0)
2021/01/29 16:59:58.132657 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:58.152165 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:58.181297 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:58.181403 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
2021/01/29 16:59:59.077067 [TNR] Sharing existing connection to M3U-IPCameras for ch2001 GarageDoor (clients=6, len=0)
2021/01/29 16:59:59.078154 [HLS] Starting transcoder for channel 2001 from 10.221.158.21 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2021/01/29 16:59:59.099621 [HLS] ffmpeg: ch2001-dANY-ip10.221.158.21-remux: pipe:: could not find codec parameters
2021/01/29 16:59:59.131742 [HLS] Couldn't generate stream playlist for ch2001-dANY-ip10.221.158.21: Stream stopped
2021/01/29 16:59:59.131814 [HLS] Stopping transcoder session ch2001-dANY-ip10.221.158.21
I also went to the commandline of the linux box running channels-dvr and ran ffplay in verbose mode, and was able to view the video, and grabbed a screenshot of the output (in case that's helpful).
On a side-note, 10.221.158.21 is an internal address for the router, not any machine involved in this transaction. Could it be a problem where the IP camera footage is coming in through 1 sub-net on a separate VLAN from the connection it's going out to the rest of the network (on a different sub-net)?