Ffmpeg okay Remote does not work

Forum for questions and support relating to the 1.28.x releases only.
Locked
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Ffmpeg okay Remote does not work

Post by iitywygms »

Trying to get the remote source to work on my Dahua IPC-HFW4300S V2
Zm version 1.28.1
Ubuntu 12.04

Ffmpeg works with the following.

General
Source type Ffmpeg

Source
source path rtsp://username:password@192.168.2.1/live
Remote Method rtp/rtsp

Remote does not work the following.

General
Source type remote

Source

remote protocol rtsp
remote method rtp/rtsp
remote host name 192.168.2.1
remote host port 554
remote host path rtsp://username:password@192.168.2.1/live

Anyone have a idea of why remote always fails?

log shows no rtsp sources.
bbunge
Posts: 2979
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpeg okay Remote does not work

Post by bbunge »

Remote Host Path /live?user=username&pwd=password

everything else looks OK
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Ffmpeg okay Remote does not work

Post by iitywygms »

I entered in Remote Host path exactly like this

/live?user=username&pwd=password

Of course I changed username and password to the actual.

Still get no rtsp source.
bbunge
Posts: 2979
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpeg okay Remote does not work

Post by bbunge »

Well, check documentation for your camera to learn how to pass user and password. My example works with some cameras. Some cameras do not need authentication to stream video in remote.
bbunge
Posts: 2979
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpeg okay Remote does not work

Post by bbunge »

My friend Google let me to this page: http://www.usefulramblings.org/?page_id=4974




This was suggested: /cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]

But.. if you change the video stream make sure you match the resolution of that stream!
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Ffmpeg okay Remote does not work

Post by knight-of-ni »

There are three different source types that are all theoretically interchangeable with an IP camera:
ffmpeg
libvlc
remote

In practice, no single source type works well in all cases, which is why you have three to choose from. Pick the one that works the best for your camera.

With regards to the Remote source type, you've only provided half of what we need to troubleshoot this kind of camera issue.

You've shown us your input, which is quite helpful, but on the output side you stated "doesn't work", which is not helpful. What we need is your log. In this case, you need to turn up your Debug to level 5 and show the entire RTSP handshake for this camera, which begins with OPTIONS and ends with TEARDOWN (or some kind of failed error message). Paste the whole thing from start to finish. Don't cherry pick the error message. See the RTSP wiki for all the names of the RTSP protocol directives, which will show up in your log: https://en.wikipedia.org/wiki/Real_Time ... g_Protocol

No guarantees. Despite well laid out rtsp rfc's, it seems each manufacturer comes up with its own, unique twist to the standard, which can cause the Remote source type to not establish a stream. Getting this up to speed will take a software programmer with experience in this kind of programming, which none of us are.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Ffmpeg okay Remote does not work

Post by iitywygms »

bbunge wrote:My friend Google let me to this page: http://www.usefulramblings.org/?page_id=4974

This was suggested: /cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]

But.. if you change the video stream make sure you match the resolution of that stream!
Appreciate the link. I read through that page before. They use Ffmpeg. And I can get Ffmpeg to work without issue.
I am not having a problem getting the cameras to work. Just experimenting with using remote as the source.
I really do appreciate the effort and response. Thank you.
knnniggett wrote: With regards to the Remote source type, you've only provided half of what we need to troubleshoot this kind of camera issue.

You've shown us your input, which is quite helpful, but on the output side you stated "doesn't work", which is not helpful. What we need is your log. In this case, you need to turn up your Debug to level 5 and show the entire RTSP handshake for this camera, which begins with OPTIONS and ends with TEARDOWN (or some kind of failed error message). Paste the whole thing from start to finish. Don't cherry pick the error message. See the RTSP wiki for all the names of the RTSP protocol directives, which will show up in your log: https://en.wikipedia.org/wiki/Real_Time ... g_Protocol

No guarantees. Despite well laid out rtsp rfc's, it seems each manufacturer comes up with its own, unique twist to the standard, which can cause the Remote source type to not establish a stream. Getting this up to speed will take a software programmer with experience in this kind of programming, which none of us are.
I will turn on debugging and report more info when I can. Right now, I am just messing around trying to get the lowest cpu load on my server.
I really wish I could offer some help with programming and such.
Your effort, along with the others here is greatly appreciated.
bbunge
Posts: 2979
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpeg okay Remote does not work

Post by bbunge »

My suggestions for ffmpeg are to:

Use the lowest resolution you can live with (320X240 or whatever your camera can deliver)
Lower the frame rate (5 FPS) and the key frame interval
Use TCP (append source line with ?tcp)

Get it working and push it higher to see what your system can take.
Locked