[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.

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
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:

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

rtspURL = "rtsp://"

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

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_header('Content-Length', len(resultimage))
            self.send_header('Content-Length', len(yealink_xml.encode()))

print("starting http server")
server_address = ('', 80)
# todo: ThreadingMixIn
httpd = HTTPServer(server_address, DoorCamHTTPRequestHandler)
httpd.serve_forever() 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
Post Reply 

Messages In This Thread
RE: T46G - Display IP Cam Picture or MJPG Video Stream via DSS Key - dialog-se - 04-07-2017 06:43 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  t46g: intercom over speaker rather than headset? asinshesq 23 64,091 07-28-2021 11:04 PM
Last Post: russman
  Bug on XML Browser Image display Tercio 1 3,955 05-22-2019 02:54 AM
Last Post: Mike_Yealink
  T46G - Disable Line Key Configuration ? timalex 13 34,558 04-12-2019 09:23 AM
Last Post: Johnny88
  T46G Call Fwd DSS Key enables / disables ALL fwd types MintTelecom 4 12,152 02-06-2018 05:28 AM
Last Post: Aishion_Yealink
  Automatic message display on T29G yc12843 2 7,212 01-25-2018 08:58 PM
Last Post: yc12843
  T46G -- BUG Tyler 1 5,103 09-29-2017 05:58 AM
Last Post: Lucia_Yealink
  T52S on call DSS key display too short tima 3 8,054 08-22-2017 01:13 AM
Last Post: Aishion_Yealink
  2 T46G Phones; Different BLF behavior phoneguy797 7 31,686 04-13-2017 09:33 AM
Last Post: auch
  T29G Display ghosting Chris708 2 6,632 03-14-2017 01:18 PM
Last Post: Chris708
Sad Updating Network on phone display ebrahimkarimi 4 14,089 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