[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
Author Message
smartpc Offline
Junior Member
**

Posts: 4
Joined: Mar 2017
Reputation: 0
Post: #1
T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
We have a Installation with Vivotek IP Cams in front of the Office Door. If somebody rings the doorbell it would be good if it could be possible to use the Yealink T46G so see who is there.

So is it possible with yealink IP phones to show a streaming picture or video stream of an ip cam? I know with snom or Auerswald IP phones its possible without a hassle.


regards,
tobias
03-13-2017 10:41 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
complex1 Offline
3CX Adv. Cert. Engineer
*****

Posts: 1,027
Joined: Jan 2014
Reputation: 28
Post: #2
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-13-2017 10:41 AM)smartpc Wrote:  We have a Installation with Vivotek IP Cams in front of the Office Door. If somebody rings the doorbell it would be good if it could be possible to use the Yealink T46G so see who is there.

So is it possible with yealink IP phones to show a streaming picture or video stream of an ip cam? I know with snom or Auerswald IP phones its possible without a hassle.


regards,
tobias

Hi Tobias,

I don’t think the T46G has this kind of feature on board.
Did you read this in the datasheet or does it mention something about this possibility?
Maybe the Yealink SIP VP-T49G is a better solution for you?

If I may ask:
Which Standalone Snom Deskphone series support this feature but not in combination with snom.io? Not the Snom D3x5 or D7x5 serie?

Kind regards,
Frank.

Dutch is my native language, not English. Apologies for my imperfect grammar.
Please do not send unsolicited PM messages. I will not answer them.
03-13-2017 04:30 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #3
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
Nope this is another one of those "hmmm should have been done but wasnt" things. We tried a number of different ways to approach this and came to the conclusions your only choices with Yealink were:
1) Use a T49 and do a SIP video call to a SIP-friendly IP camera/door phone
2) Wire up a DSS key to launch an XML browser to the server, and have the server run a script that grabs a single frame from the camera, re-sizes it to what the phone expects, and then displays it. Not ideal in any way, but better than nothing.
3) Give up and sell the customer a $50 7"Android tablet to put beside their phone with the manufacturer's viewer software installed.

I'm sure Yealink could easily implement at least low frame rate MJPEG on T48/T46 and maybe even T29s, but my guess is demand for it is low or they want you to just buy T49s. In the end we went with option #3 because it was by far the easiset and most cost effective, as users ended up wanting to have their video feeds running while talking on the phone and while sitting idle, without that interfering with caller display/etc.
03-13-2017 07:50 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
smartpc Offline
Junior Member
**

Posts: 4
Joined: Mar 2017
Reputation: 0
Post: #4
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-13-2017 04:30 PM)complex1 Wrote:  
(03-13-2017 10:41 AM)smartpc Wrote:  We have a Installation with Vivotek IP Cams in front of the Office Door. If somebody rings the doorbell it would be good if it could be possible to use the Yealink T46G so see who is there.

So is it possible with yealink IP phones to show a streaming picture or video stream of an ip cam? I know with snom or Auerswald IP phones its possible without a hassle.


regards,
tobias

Hi Tobias,

I don’t think the T46G has this kind of feature on board.
Did you read this in the datasheet or does it mention something about this possibility?
Maybe the Yealink SIP VP-T49G is a better solution for you?

If I may ask:
Which Standalone Snom Deskphone series support this feature but not in combination with snom.io? Not the Snom D3x5 or D7x5 serie?

Hi,

@complex1: snom has a Wiki Link for this: http://wiki.snom.com/Category:HowTo:Video_Streaming

The snom phones supporting this are:
snom820
snom821
snom870
snom760
snomD765
snomD375

Gigaset IP Phones does also support this. At least the DE700 IP.

So hopefully the T46G support ist too. I guess this shoudn't be so hard. Isn't it possible with the XML Browser Function?

@jolouis: Great info. I think, option 2 would be my plan because i have a Webserver in the LAN which can handle this. But i guess in Future i will sell SIP Doorbells to my customers so this Problem should be obsolete.

But anyway option 2 is good for having a fast look at the camera in the server room for example.

Have you ever done option 2 in a test to tell if it runs reliable? if so can you tell me how to setup the xml file for the xml browser function?

regards,
tobias
(This post was last modified: 03-14-2017 08:40 AM by smartpc.)
03-14-2017 08:30 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #5
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
@Tobias: Yup it works if you just want to take a quick peak at things and are not after actual video.

Basically I took the sample "display full screen image" XML browser file from the Yealink docs. Instead of an actual image file I pointed the URL to a PHP script. The PHP script grabbed a frame from the IP camera using the camera's snapshot API (we were using a Hikvision that has this feature), runs a quick resize on it, and then outputs it as a JPEG for the XML browser to display. We did find that the XML document itself needed to be generated by PHP also as the URL needed to have a random query string, otherwise the phone cached the image and always just displayed the same thing.

So it works, but not ideal by any means. If Yealink were to at least support MJPEG in their XML browser, or heck even let their XML browser grab the first frame of an MJPEG file and then give up, it would make this task much easier.
03-14-2017 03:18 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
smartpc Offline
Junior Member
**

Posts: 4
Joined: Mar 2017
Reputation: 0
Post: #6
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-14-2017 03:18 PM)jolouis Wrote:  @Tobias: Yup it works if you just want to take a quick peak at things and are not after actual video.

Basically I took the sample "display full screen image" XML browser file from the Yealink docs. Instead of an actual image file I pointed the URL to a PHP script. The PHP script grabbed a frame from the IP camera using the camera's snapshot API (we were using a Hikvision that has this feature), runs a quick resize on it, and then outputs it as a JPEG for the XML browser to display. We did find that the XML document itself needed to be generated by PHP also as the URL needed to have a random query string, otherwise the phone cached the image and always just displayed the same thing.

So it works, but not ideal by any means. If Yealink were to at least support MJPEG in their XML browser, or heck even let their XML browser grab the first frame of an MJPEG file and then give up, it would make this task much easier.

Yeah, hopefully Yealink will update their Firmware with some useful Addon Functions like this soon.

Could you tell me the code you used for that? Im not that experienced in coding php so testing this fuction would be much easier with modifying your code than create it from scratch.

thanx in advance.
cheers
03-14-2017 07:52 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Karl_Yealink Offline
Super Moderator
******

Posts: 673
Joined: Apr 2015
Reputation: 5
Post: #7
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-14-2017 07:52 PM)smartpc Wrote:  
(03-14-2017 03:18 PM)jolouis Wrote:  @Tobias: Yup it works if you just want to take a quick peak at things and are not after actual video.

Basically I took the sample "display full screen image" XML browser file from the Yealink docs. Instead of an actual image file I pointed the URL to a PHP script. The PHP script grabbed a frame from the IP camera using the camera's snapshot API (we were using a Hikvision that has this feature), runs a quick resize on it, and then outputs it as a JPEG for the XML browser to display. We did find that the XML document itself needed to be generated by PHP also as the URL needed to have a random query string, otherwise the phone cached the image and always just displayed the same thing.

So it works, but not ideal by any means. If Yealink were to at least support MJPEG in their XML browser, or heck even let their XML browser grab the first frame of an MJPEG file and then give up, it would make this task much easier.

Yeah, hopefully Yealink will update their Firmware with some useful Addon Functions like this soon.

Could you tell me the code you used for that? Im not that experienced in coding php so testing this fuction would be much easier with modifying your code than create it from scratch.

thanx in advance.
cheers
You will get more info about XML from the guide below.
Link: http://download.support.yealink.com/down...V81_40.pdf

For now, my suggestion is using XML browser, I will give suggestion to our PM.
Hope they will consider and develop in future.
03-16-2017 09:35 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
dialog-se Offline
Junior Member
**

Posts: 2
Joined: May 2015
Reputation: 0
Post: #8
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-13-2017 07:50 PM)jolouis Wrote:  2) Wire up a DSS key to launch an XML browser to the server, and have the server run a script that grabs a single frame from the camera, re-sizes it to what the phone expects, and then displays it. Not ideal in any way, but better than nothing.
3) Give up [...]

That's almost exactly how we tried to do it.
Also the HD camera would not let you grab single jpeg frames over http, but insists in making you use rtsp (actually makes sense regarding bandwith), so we grabbed a single frame from the rtsp stream using a Python script on a Windows VM that calls ffmpeg...

It turned out that the whole process from pressing the DSS button to actually seeing the picture would take almost 10 seconds, and most of that was not caused by ffmpeg having to connect to the camera first (also it didn't look nice as the screen would flash multiple times)

So we abandoned this, however just in case the XML might be useful for someone, here's the script I wrote back then:

Code:
from http.server import HTTPServer, BaseHTTPRequestHandler
import string, subprocess

rtspURL = "rtsp://192.168.0.149:554/ucast/11"

yealink_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneImageScreen Beep="no" Timeout="5" LockIn="no" mode="regular">
    <Image verticalAlign="middle" horizontalAlign="middle">http://192.168.0.120/doorcam.jpg</Image>
</YealinkIPPhoneImageScreen>"""

class DoorCamHTTPRequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if(self.path == "/doorcam.jpg"):
            resultimage = subprocess.check_output("ffmpeg.exe -i " + rtspURL + " -f image2 -vframes 1 -")
            
            self.send_response(200)
            self.send_header('Content-type','image/jpg')
            self.send_header('Connection','close')
            self.send_header('Content-Length', len(resultimage))
            self.end_headers()
            self.wfile.write(resultimage);
        else:
            self.send_response(200)
            self.send_header('Content-type','text/xml')
            self.send_header('Connection','close')
            self.send_header('Content-Length', len(yealink_xml.encode()))
            self.end_headers()
            self.wfile.write(yealink_xml.encode());

print("starting http server")
server_address = ('', 80)
# todo: ThreadingMixIn
httpd = HTTPServer(server_address, DoorCamHTTPRequestHandler)
httpd.serve_forever()

192.168.0.120 being the Windows machine this ran on, .149 the camera.
I think you should add some resize / crop depending on the resolution of your camera image.
04-07-2017 06:43 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
dialog-se Offline
Junior Member
**

Posts: 2
Joined: May 2015
Reputation: 0
Post: #9
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(03-13-2017 07:50 PM)jolouis Wrote:  2) Wire up a DSS key to launch an XML browser to the server, and have the server run a script that grabs a single frame from the camera, re-sizes it to what the phone expects, and then displays it. Not ideal in any way, but better than nothing.
3) Give up [...]

That's almost exactly how we tried to do it.
Also the HD camera would not let you grab single jpeg frames over http, but insists in making you use rtsp (actually makes sense regarding bandwith), so we grabbed a single frame from the rtsp stream using a Python script on a Windows VM that calls ffmpeg...

It turned out that the whole process from pressing the DSS button to actually seeing the picture would take almost 10 seconds, and most of that was not caused by ffmpeg having to connect to the camera first (also it didn't look nice as the screen would flash multiple times)

So we abandoned this, however just in case the XML might be useful for someone, here's the script I wrote back then:

Code:
from http.server import HTTPServer, BaseHTTPRequestHandler
import string, subprocess

rtspURL = "rtsp://CAMERA_HOST:554/ucast/11"

yealink_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneImageScreen Beep="no" Timeout="5" LockIn="no" mode="regular">
    <Image verticalAlign="middle" horizontalAlign="middle">HOST_WHERE_THIS_RUNS/doorcam.jpg</Image>
</YealinkIPPhoneImageScreen>"""

class DoorCamHTTPRequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if(self.path == "/doorcam.jpg"):
            resultimage = subprocess.check_output("ffmpeg.exe -i " + rtspURL + " -f image2 -vframes 1 -")
            
            self.send_response(200)
            self.send_header('Content-type','image/jpg')
            self.send_header('Connection','close')
            self.send_header('Content-Length', len(resultimage))
            self.end_headers()
            self.wfile.write(resultimage);
        else:
            self.send_response(200)
            self.send_header('Content-type','text/xml')
            self.send_header('Connection','close')
            self.send_header('Content-Length', len(yealink_xml.encode()))
            self.end_headers()
            self.wfile.write(yealink_xml.encode());

print("starting http server")
server_address = ('', 80)
# todo: ThreadingMixIn
httpd = HTTPServer(server_address, DoorCamHTTPRequestHandler)
httpd.serve_forever()

192.168.0.120 being the Windows machine this ran on, .149 the camera.
I think you should add some resize / crop depending on the resolution of your camera image.

// edit: Akismet apparently did not allow me to include http links
04-07-2017 07:07 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #10
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key
(04-07-2017 07:07 AM)dialog-se Wrote:  That's almost exactly how we tried to do it....

It turned out that the whole process from pressing the DSS button to actually seeing the picture would take almost 10 seconds, and most of that was not caused by ffmpeg having to connect to the camera first (also it didn't look nice as the screen would flash multiple times)

Not suggesting this is a proper solution at all, but in our test we solved the delay problem by basically turning the script into a small daemon and leaving it running on the background of our Asterisk box (linux server). Same sort of idea as you had, except it was on a loop to grab a new frame every second or two, resize it and save it to the same file in a tmp ram drive directory over and over. That way the Yealink XML just had to pull in the already generated file which was no slower than loading any other image.

(We actually reduced the overhead even more because the Hikvision camera we were using supported multiple output streams, so we were able to configure a lower resolution one for this specific application, which meant it took almost no processing power to leave our "interpretter script" running all the time).

Native MJPEG support (or at least grabbing and just displaying the first frame of an MJPEG stream) would be much easier of course, but I wouldn't be surprised if there'd still be a delay incurred during stream start up...
(This post was last modified: 04-07-2017 01:29 PM by jolouis.)
04-07-2017 01:29 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Bug on XML Browser Image display Tercio 1 2,207 05-22-2019 02:54 AM
Last Post: Mike_Yealink
  T46G - Disable Line Key Configuration ? timalex 13 24,395 04-12-2019 09:23 AM
Last Post: Johnny88
  T46G Call Fwd DSS Key enables / disables ALL fwd types MintTelecom 4 7,117 02-06-2018 05:28 AM
Last Post: Aishion_Yealink
  Automatic message display on T29G yc12843 2 3,965 01-25-2018 08:58 PM
Last Post: yc12843
  t46g: intercom over speaker rather than headset? asinshesq 22 43,137 01-24-2018 10:02 PM
Last Post: mikes
  T46G 28.82.0.2.0 -- BUG Tyler 1 3,166 09-29-2017 05:58 AM
Last Post: Lucia_Yealink
  T52S on call DSS key display too short tima 3 5,003 08-22-2017 01:13 AM
Last Post: Aishion_Yealink
  2 T46G Phones; Different BLF behavior phoneguy797 7 24,510 04-13-2017 09:33 AM
Last Post: auch
  T29G Display ghosting Chris708 2 4,628 03-14-2017 01:18 PM
Last Post: Chris708
Sad Updating Network on phone display ebrahimkarimi 4 9,253 11-16-2016 01:43 PM
Last Post: Karl_Yealink

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication