Jump to content

Cannot play Live camera feed from security CAM


FlatScreen

Recommended Posts

FlatScreen

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"


 

Link to comment
Share on other sites

FlatScreen

BTW, I have tried over writing the 3 ff* binaries from /usr/bin to /opt/emby-server/bin
That also did not make any difference.

Link to comment
Share on other sites

Ok. I'm not sure what the issue is, but if you had the ability to make the rtsp URL available over the internet, then we could test it ourselves.

Link to comment
Share on other sites

FlatScreen

How do I communicate the public URL on WAN privately? Don't want to paste it here for the world to see.

Link to comment
Share on other sites

1 hour ago, HSEmbyBox said:

How do I communicate the public URL on WAN privately? Don't want to paste it here for the world to see.

You can send it to me via PM. Thanks.

Link to comment
Share on other sites

daldana

Although I using a Windows 10 environment, I do have six cameras working via the IPTV plugin. The URL format I use is rtsp://192.168.2.23:554/realmonitor?stream=0.sdp,so the sdp extension does work, again with Windows 10 and the IPTV plugin.

Link to comment
Share on other sites

FlatScreen

I've got a D-Link DCS-5222L Rev. B camera
For some odd reason it does not play well with Emby RTSP. Works well with VLC.

Link to comment
Share on other sites

FlatScreen

In case this info is needed:

ubuntu-restricted-extras

is already installed on the Ubuntu PC.

Link to comment
Share on other sites

FlatScreen

Upgraded to version 4.7.0.37 beta, but still having problem in playing camera feed.

Link to comment
Share on other sites

FlatScreen

Upgraded to version 4.7.0.38 beta, still same error. Cannot play the rtsp stream. Here's some extract from logs, in case someone can figure out:
 

2022-05-07 12:19:41.966 Info App: ProcessRun 'StreamTranscode fd1b59' Process exited with code 137 - Failed

----

>>>>>>  User policy for admin
        Enable Playback Remuxing: True
        Enable Video Playback Transcoding: True
        Enable Audio Playback Transcoding: True

>>>>>>  Hardware Decoders for h264
        [X] VAAPI 3rd Gen Core processor Graphics - H.264 (AVC)

>>>>>>  Selected Codecs
Decoder Automatic software decoder


Encoder x264 Software Encoder
        Max Bitrate: 781 Mbit/s
        Color Formats: YUV420P, YUVJ420P, YUV422P, YUVJ422P, YUV444P, YUVJ444P, NV12, NV16, NV21, YUV420P10, YUV422P10, YUV444P10, NV20, GRAY8, GRAY10 - Bit Depths: 8, 10, 12, 14
        Profiles: Baseline Profile (Level 6.2), Main Profile (Level 6.2), High Profile (Level 6.2), High 10 Profile (Level 6.2), High 4:2:2 Profile (Level 6.2), High 4:4:4 Predictive Profile (Level 6.2)


>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Advanced
Info    Checking: 'x264 Software Encoder'
Info    Check successful - selecting 'x264 Software Encoder'

>>>>>>  FindVideoDecoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Advanced
Info    Checking: 'VAAPI 3rd Gen Core processor Graphics - H.264 (AVC)'
NoMatch Codec does not support profile 'Baseline Profile'
Info    Decoder does not match
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

>>>>>>  Processing Plan
        Name                                        CanDoInHW  WillDoInHW  Reason                                                 
        Automatic software decoder               >> False      False       Software Codec                                          
        VideoInput                               >> False      False       Not a hardware decoder                                  
        VideoOutput                              >> False      False       Not a hardware encoder                                  
        x264 Software Encoder                    >> False      False       Software Codec                                          

>>>>>>  Video Processing Steps for [0:0]: H.264 (AVC)
        Step                    HW-Context   Format       SW-Format           Size   Next
        H264                 >> -            yuv420p      yuv420p         1280x720 >> 

/opt/emby-server/bin/ffmpeg -loglevel +timing -y -print_graphs_file "/var/lib/emby/logs/ffmpeg-transcode-fd1b599b-a1ef-43ef-aa4f-4c59bb2008bd_1graph.txt" -copyts -start_at_zero -analyzeduration 3000000 -f rtsp -stream_loop -1 -c:v:0 h264 -i "rtsp://192.168.1.240:554/live1.sdp" -map 0:0 -map 0:1 -sn -c:v:0 libx264 -g:v:0 78 -maxrate:v:0 4000000 -bufsize:v:0 8000000 -sc_threshold:v:0 0 -keyint_min:v:0 78 -r:v:0 25.08333396911621 -pix_fmt:v:0 yuv420p -preset:v:0 veryfast -profile:v:0 high -level:v:0 3.1 -x264opts:v:0 "subme=0:me_range=4:rc_lookahead=10:partitions=none" -crf:v:0 23 -c:a:0 libmp3lame -ab:a:0 64000 -ac:a:0 1 -disposition:a:0 default -max_delay 5000000 -avoid_negative_ts disabled -f segment -map_metadata -1 -map_chapters -1 -segment_format mpegts -segment_list "/var/lib/emby/transcoding-temp/94AB0A/94AB0A.m3u8" -segment_list_type m3u8 -segment_time 00:00:03.000 -segment_list_entry_prefix hls/94AB0A/ -segment_start_number 0 -individual_header_trailer 0 -write_header_trailer 0 -segment_write_temp 1 "/var/lib/emby/transcoding-temp/94AB0A/94AB0A_%d.ts"

12:19:31.928 ffmpeg version 5.0.0-emby_2022_05_05 Copyright (c) 2000-2022 the FFmpeg developers and softworkz for Emby LLC
12:19:31.928   built with gcc 8.3.0 (crosstool-NG 1.24.0)
12:19:31.928 Execution Date: 2022-05-07 12:19:31
12:19:35.812 Guessed Channel Layout for Input Stream #0.1 : mono
12:19:35.812 Input #0, rtsp, from 'rtsp://192.168.1.240:554/live1.sdp':
12:19:35.812   Metadata:
12:19:35.812     title           : RTSP/RTP stream 1 from DCS-5222L
12:19:35.812     comment         : live1.sdp with v2.0
12:19:35.812   Duration: N/A, start: 0.000000, bitrate: N/A
12:19:35.813   Stream #0:0: Video: h264 (Baseline), yuv420p(progressive), 1280x720, Level 31, 25.08 tbr, 90k tbn
12:19:35.813   Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
12:19:35.818 Stream mapping:
12:19:35.818   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
12:19:35.818   Stream #0:1 -> #0:1 (pcm_mulaw (native) -> mp3 (libmp3lame))
12:19:35.818 Press [q] to stop, [?] for help
12:19:35.831 [libx264 @ 0x1ca0380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
12:19:35.834 [libx264 @ 0x1ca0380] profile High, level 3.1, 4:2:0, 8-bit
12:19:35.834 [libx264 @ 0x1ca0380] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0 me=hex subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=4 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=78 keyint_min=40 scenecut=0 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=4000 vbv_bufsize=8000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
12:19:41.874 

[q] command received. Exiting.

12:19:41.949 Finishing stream 0:1 without any data written to it.
12:19:41.952 Output #0, segment, to '/var/lib/emby/transcoding-temp/94AB0A/94AB0A_%d.ts':
12:19:41.952   Metadata:
12:19:41.953     encoder         : Lavf59.17.100
12:19:41.953   Stream #0:0: Video: h264, yuv420p(progressive), 1280x720, q=2-31, 25.08 fps, 90k tbn
12:19:41.953     Metadata:
12:19:41.953       encoder         : Lavc59.21.100 libx264
12:19:41.953     Side data:
12:19:41.953       cpb: bitrate max/min/avg: 4000000/0/0 buffer size: 8000000 vbv_delay: N/A
12:19:41.953   Stream #0:1: Audio: mp3, 8000 Hz, mono, s16p, 64 kb/s (default)
12:19:41.953     Metadata:
12:19:41.953       encoder         : Lavc59.21.100 libmp3lame
12:19:41.953 12:19:41.954 [segment @ 0x1c9e240] Opening '/var/lib/emby/transcoding-temp/94AB0A/94AB0A.m3u8.tmp' for writing
12:19:41.954 SegmentComplete=video:0 Index=0 Start=0.000000 End=3.109633 Duration=3.109633 offset_pts=0 start_pts=0 Frames=78 filename=hls/94AB0A/94AB0A_0.ts
12:19:41.955 [segment @ 0x1c9e240] Opening '/var/lib/emby/transcoding-temp/94AB0A/94AB0A_1.ts.tmp' for writing
12:19:41.955 [segment @ 0x1c9e240] Opening '/var/lib/emby/transcoding-temp/94AB0A/94AB0A.m3u8.tmp' for writing
12:19:41.956 SegmentComplete=video:0 Index=1 Start=3.109633 End=6.219267 Duration=3.109633 offset_pts=0 start_pts=3109633 Frames=78 filename=hls/94AB0A/94AB0A_1.ts
12:19:41.956 [segment @ 0x1c9e240] Opening '/var/lib/emby/transcoding-temp/94AB0A/94AB0A_2.ts.tmp' for writing
12:19:41.957 [segment @ 0x1c9e240] Opening '/var/lib/emby/transcoding-temp/94AB0A/94AB0A.m3u8.tmp' for writing
12:19:41.958 SegmentComplete=video:0 Index=2 Start=6.219267 End=9.249167 Duration=3.029900 offset_pts=0 start_pts=6219267 Frames=76 filename=hls/94AB0A/94AB0A_2.ts
12:19:41.959 elapsed=00:00:06.14 frame=  232 fps= 38 q=-1.0 Lsize=N/A time=-00:00:09.12 bitrate=N/A throttle=off speed=N/A    

 

Link to comment
Share on other sites

I'm not sure yet. @softworkz may have some ideas but I think something needs to be added to our ffmpeg build to be able to understand this stream.

Link to comment
Share on other sites

Thanks for adding me - I think we can continue the discussion here (as long as no sensitive information is covered):

I'm not sure whether it's sufficient to open just that single port (as provided in the PM) because rtsp uses multiple ports.
Let's go through some questions first:

  • Is Emby Server running on the same computer from which you tested the stream with VLC?
  • Is there any firewall software or port restrictions on the Emby Server computer?
  • Is Emby Server running inside a VM?

 

http://legacyfiles.us.dlink.com/DCS-5222L/REVB/DCS-5222L_REVB_MANUAL_v2.20_WW.pdf

Page 73 (in PDF count, page 69 as printed on pages): Configuring the DCS-5222L with a Router

shows the ports that need to be accessible for the RTSP stream to work:

Port Mappings:

  • TCP for HTTP port
  • both (TCP and UDP) for RTSP
  • and both (TCP and UDP) for 5556 - 5559 ports

This is required for public access to your camera (for testing) - BUT it is also required that the Emby Server machine can communicate through those ports with the camera.
Maybe that's the issue..?

Link to comment
Share on other sites

FlatScreen
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
8096                       ALLOW IN    Anywhere                  
8920                       ALLOW IN    Anywhere                  
20,21,990/tcp              ALLOW IN    Anywhere                  
40000:50000/tcp            ALLOW IN    Anywhere                  
53/tcp                     ALLOW IN    Anywhere                  
43/tcp                     ALLOW IN    Anywhere 
Link to comment
Share on other sites

FlatScreen

Above are the firewall rules on the Emby server machine which is running on bare-metal 
Emby server that I have is running headless on a Ubuntu LTS box.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...