Blue Iris URLs for external streams

Discussion in 'Blue Iris' started by Dseg42, Dec 27, 2017.

Share This Page

  1. Dseg42

    Dseg42 Getting the hang of it

    Joined:
    Apr 17, 2016
    Messages:
    150
    Likes Received:
    9
    Location:
    Palm City, FL
    Currently using Action Tiles were I am able to use a stream as a tile on my iPad.
    I am currently using the link below for a stream:
    http://BI_IP:BI_PORT/mjpg/Cam_Short_Name/video.mjpg

    I am noticing my CPU usage on my Blue Iris server increase about 5-10% more per stream when using these URLs.

    Are there URLs to pull an image or something?
     
  2. TonyR

    TonyR IPCT Contributor

    Joined:
    Jul 15, 2014
    Messages:
    3,688
    Likes Received:
    3,415
    Location:
    Alabama
    For single image(s) try these below. Of course, preface each of these URL's with "BI_server_IP:BI_Port" and delete the "{ }" curly brackets.

    /image/{cam-short-name}?q=50&s=80
    A single JPEG image from a specific camera or group, with optional quality (q) and scale (s) parameters. Quality is a percentage from 1-100, and scale may be any number >0.

    /image/{cam-short-name}?h=100
    You may also specify a specific height (h) or width (w) instead of scale.

    /thumbs/{filename}
    A thumbnail image from a specific file in the New clips folder.

    /alerts/{filename}
    A JPEG image from the Alerts folder.
    ____________________________________

    Here's the most complete list of ALL BI URL's that I have:

    In addition to serving HTML pages, Blue Iris can also act as a "video server." There are a number of methods for retrieving images and video from the Blue Iris web server for use on mobile devices, converting a USB camera into a web camera, or for any other purpose. Here are the paths to these methods:

    /image/{cam-short-name}?q=50&s=80 A single JPEG image from a specific camera or group, with optional quality (q) and scale (s) parameters. Quality is a percentage from 1-100, and scale may be any number >0.
    /image/{cam-short-name}?h=100 You may also specify a specific height (h) or width (w) instead of scale.
    /mjpg/{cam-short-name}/video.mjpg An M-JPEG stream. This stream is compatible with Blue Iris's "MJPEG stream request."
    /file/clips/{filename}&mode=jpeg&speed=100 An M-JPEG stream of a clip from your New clips folder. You may include additional subdirectory names in the filename. The speed parameter is optional, a percentage of normal playback speed.
    /thumbs/{filename} A thumbnail image from a specific file in the New clips folder.
    /alerts/{filename} A JPEG image from the Alerts folder.
    /admin?profile=x&lock=y Set the active profile to x. Use x=-1 to toggle the lock status, or set the lock=y, 0=run, 1=temp, 2=hold
    /admin?schedule=1 or 0 or schedule name x=0 or 1 to disable/enable Options/Schedule, or a name to set the current schedule
    /admin?signal=x Changes the traffic signal state and returns the current state. x=0 for red, x=1 for green, x=2 for yellow. This requires admin authentication.
    /admin?output=x&msec=y or &force=true Temporarily change the active profile to x. Use x=-1 to toggle the lock status.
    /admin?input=x Set DIO output x=0-7 on for y msec, or force on indefinitely
    /admin?macro=x&text={text} Set macro number x=1-9 to value {text}
    /admin?console={group name} Select the specified group for display on the console, "index" is All cameras.
    /admin?camera=x&trigger Trigger camera x (short name)
    /admin?camera=x&manrec=1 or 0 Start or stop manual recording on camera x (short name)
    /admin?camera=x&snapshot Snapshot on camera x (short name)
    /admin?camera=x&reset Reset camera x (short name)
    /admin?camera=x&ptzcycle=1 or 0 Trigger camera x (short name)
    /admin?camera=x&pause=x Send pause command to camera x (short name), x=-2 to 10 matching right-click Pause menu
    /admin?camera=x&enable=1 or 0 Enable or disable camera x (short name)
    /admin?camera=x&motion=1 or 0 Enable or disable camera x (short name)
    /admin?camera=x&hide=1 or 0 Enable or disable camera x (short name)
    /admin?camera=x&mdelay=x Enable or disable camera x (short name)
    /admin?camera=x&webcast=1 or 0 Enable or disable camera x (short name)
    /admin?camera=x&preset=x Enable or disable camera x (short name)
    /admin?camera=x&schedule=1 or 0 Enable or disable camera x (short name)
    /admin?camera=x&profile=x Enable or disable camera x (short name)
    /admin?camera=x&alerts=x Enable or disable camera x (short name)
    /audio/{cam-short-name}/temp.wav Pull a raw audio stream (MIME type audio/x-wav).
    /cam/{cam-short-name}/pos=x Performs a PTZ command on the specified camera, where x= 0=left, 1=right, 2=up, 3=down, 4=home, 5=zoom in, 6=zoom out
    /cam/{cam-short-name}/pos=100 Causes a snapshot image to be captured from the specified camera.
    /h264/{cam-short-name}/temp.h264 Pull a raw H.264 stream (MIME type video/H264). This stream will play in a tool like VLC, and may be used in future versions of the ActiveX control.
    /h264/{cam-short-name}/temp.ts Pull an MPEG-2 transport stream (MIME type video/MP2T).
    /h264/{cam-short-name}/temp.m or .m3u8 Pull a virtual M3U8 file (MIME type application/vnd.apple.mpegurl). This will play in QuickTime, iPad and the iPhone using the Apple HLS (HTTP Live Streaming) format.
     
    Mike, TheDank and nbstl68 like this.
  3. Dseg42

    Dseg42 Getting the hang of it

    Joined:
    Apr 17, 2016
    Messages:
    150
    Likes Received:
    9
    Location:
    Palm City, FL
  4. giomania

    giomania IPCT Contributor

    Joined:
    Jun 1, 2017
    Messages:
    729
    Likes Received:
    456
    @TonyR For instances where the username and password are required, would this be accurate for your "trigger" command? The “curly brackets” “{ }” and the information contained therein would be replaced with the users relevant data.

    http://{10.0.0.124:81}/admin?camera={Camera Short Name }&trigger&user={Username}&pw=*{Password}
     
    Last edited: Jan 22, 2018
  5. darrenph1

    darrenph1 Getting comfortable

    Joined:
    Feb 10, 2017
    Messages:
    107
    Likes Received:
    40

    Did you ever get this solved? I saw your post on the action tiles support forum as I am running into the same thing. Glad I went with the trial, but hoping you might of figured something out.
     
  6. giomania

    giomania IPCT Contributor

    Joined:
    Jun 1, 2017
    Messages:
    729
    Likes Received:
    456
    I assimilated these into a URL for networking neophytes format, and had a couple of questions that arose for me during the process:

    This may be an obvious answer, but what is the below triggering the camera to do?
    Command: /admin?camera=CameraShortName&trigger&user=Username&pw=Password
    Function: Triggers the specified camera to send an alert to the user???
    Example URL
    : http://10.0.0.124:8081/admin?camera=CameraShortName&trigger&user=Username&pw=Password

    I haven't actually installed BI yet, and maybe this would be clear when I actually try this in the pause menu, but what does X represent?
    Command: /admin?camera=CameraShortName&pause=X
    Function: Pauses recording the specified camera matching right-click Pause menu. (X = -2-10)
    Example URL: http://10.0.0.124:8081/admin?camera=CameraShortName&pause=X

    Not sure at all about this, but is it a motion delay, and what does X represent?
    Command: /admin?camera=CameraShortName&mdelay=X
    Function: Add a motion delay to the specified camera???. (X = ???).
    Example URL
    : http://10.0.0.124:8081/admin?camera=CameraShortName&mdelay=X

    I assume "pos" represents position? What does 100 represent, and is there a range of values possible?
    Command: /cam/CameraShortName/pos=100 (What does this number represent?)
    Function: Captures a single snapshot image from the specified camera.
    Example URL: http://10.0.0.124:8081/cam/CameraShortName/pos=100

    Thanks for any input.

    Mark
     
  7. jaydeel

    jaydeel BIT Beta Team

    Joined:
    Nov 9, 2016
    Messages:
    126
    Likes Received:
    93
    Location:
    SF Bay Area
    This command applies an "external" trigger to the camera. It is identical to right-clicking on the camera in BI and selecting "Trigger now", or by clicking the "Trigger now" button in the Camera Properties | Trigger dialog

    An alert will be sent to users only if "Send a push notification to mobile app" is checked the Camera Properties | Alerts dialog for the active Profile, and the same Profile is checked in the BI Options | Users | Edit User | Notifications dialog.

    Note: Alerts created by using these commands are differentiated in BI's cliplist with the label "External".

    [x] ... [0] off, [1] 30s, [2] 5m, [3] 30m, [4] 1h, [5] 2h, [6] 3h, [7] 5h, [8] 10h, [9] 24h, [10] 15m, [-1] indefinitely

    Notes:
    1) Pause commands are additive... i.e., if you send &pause=10, then &pause=2 in succession, the camera will be paused for approximately 20 minutes.
    2) Pausing a camera is equivalent to using BI's traffic signal, but just for the specified camera.
    3) Camera pause (and traffic signal) options (disable recording, disable alerts, etc.) are managed globally... see the Blue Iris Options | Other dialog.

    I've not figured this one out either.

    The number is a 'ptz command'.
    You can find most of the following in BI's help (search 'JSON Interface').
    x= 0..6: Left, right, Up, Down, Home, Zoom in, Zoom out **
    8..10: Power mode, 50, 60, or outdoor
    11..26: Brightness 0-15
    27..33: Contrast 0-6
    34..35: IR on, off
    37: Reboot (not in BI's help; discovered by trial and error)
    100: Snapshot
    101..120: Go to preset position 1..20

    ** With these commands, you may want to also use
    &updown=0|1
    0 = send "complementary "stop" event
    1 = move camera for a preset duration (usually to end of motion)
     
    giomania likes this.
  8. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    Has anyone gotten the PTZ URL command for the preset positions to work? They work for me in the blue iris web interface (so I know blue iris can control the camera presents) but not in the URL commands. I can do the left/right commands fine in the URL, but the pos=101, 102, 103 etc is not activating the presets 1, 2, 3.
     
  9. giomania

    giomania IPCT Contributor

    Joined:
    Jun 1, 2017
    Messages:
    729
    Likes Received:
    456
    Never saw notification of this reply (via Tapatalk ); thanks for all the great info!


    Sent from my iPhone using Tapatalk Pro
     
  10. danbutter

    danbutter Getting the hang of it

    Joined:
    May 28, 2017
    Messages:
    118
    Likes Received:
    32
    I believe I did do this, but I'm not where I can check right now. IIRC it was just the number like 1 or 2 not 101 or 102.
     
  11. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    http://192.168.0.10/cam/Garage/pos=1 is a left turn, pos=0 is a right turn.

    pos=101 is supposedly preset 1, but this is not working for me.

    I think the issue is that when I look at the blue iris PTZ config for the camera, the camera is telling it that the "name/value" for the first preset is "000" not '1'. The name/value for preset two is "001", etc.

    I tried pos=10001, 100001, etc but that didn't work either.
     
  12. Bill Scruggs

    Bill Scruggs n3wb

    Joined:
    Aug 15, 2014
    Messages:
    29
    Likes Received:
    18
    Try
    /admin?camera=x&preset=n
    It is much easier.

    When using the pos command the positions 0-6 are used for move up,dn left, right, ect. So to got to preset 1 you would use 7, 8 for preset 2.
     
  13. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    Last edited: Apr 21, 2018
  14. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    Ok, it's not a curl vs. webbrowser thing - the webbrowser was working since it was logged into blueiris already in another tab so didn't care about authentication. When I log out of blueiris, entering "http://192.168.0.120/admin?camera=Garage&preset=9&user=admin&pw=secret1" requires authentication.

    I have authentication set to non-LAN only, not sure why this isn't working.
     
  15. Bill Scruggs

    Bill Scruggs n3wb

    Joined:
    Aug 15, 2014
    Messages:
    29
    Likes Received:
    18
    I had the same problem with authentication. I had to setup another user other than "admin" that had administrative rights, and use that name for authentication.
     
  16. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    Yes, I tried both the admin login and other users (with admin rights), same error.
     
  17. danbutter

    danbutter Getting the hang of it

    Joined:
    May 28, 2017
    Messages:
    118
    Likes Received:
    32
    http://BlueIrisIP:port/admin?camera=Cam2&preset=1
    The above is what I use with my PTZ cam in BI and preset 1 is preset 1 on the cam.
    I also had some advice about the login:
    This worked for me.
     
  18. Jason R

    Jason R n3wb

    Joined:
    Oct 5, 2017
    Messages:
    22
    Likes Received:
    1
    This helped get rid of the authentication issues, thanks.

    I'm still having issues getting this to work with CURL, despite it working in a webbrowser.

    This works fine:
    curl http://192.168.0.120/cam/Garage2/pos=1

    But this doesn't:
    curl http://192.168.0.120/admin?camera=Garage2&preset=5

    (both commands work fine in a webbrowser)

    This second command is getting a correct response from blue iris -

    signal=green
    profile=-1
    lock=0
    camera=Garage 2


    Just like the webbrowser version does, with the except the camera isn't moving with CURL. I suspect it has something to do with a PUT vs GET command or something, but can't figure it out.



    EDIT: Figured it out. The correct CURL command is:

    curl 'http://192.168.0.120/admin?camera=Garage2&preset=1'
     
    Last edited: Apr 22, 2018
  19. davo22

    davo22 n3wb

    Joined:
    Mar 24, 2015
    Messages:
    17
    Likes Received:
    5
    Cannot get the blue iris mjpeg URL to work.

    Just gives a 404 error not found.

    Do I need to enable anything in blue iris for this to work?

    Cheers
     
  20. TonyR

    TonyR IPCT Contributor

    Joined:
    Jul 15, 2014
    Messages:
    3,688
    Likes Received:
    3,415
    Location:
    Alabama
    1) Yes. In BI 'Options', check 'enable the HTTP web server on port' and put in your BI port, such as 81, etc.
    2) Also, it would help if you mention the specific URL you're trying, such as:
    Code:
    http://192.168.1.239:81/mjpg/Cam3/video.mjpg 
    3) FYI, Internet Explorer won't play the MJPEG stream from URL; use Chrome (first choice) or Firefox.

    EDIT: VLC will also play the above URL as a network stream if in Blue Iris 'Users' that 'Anonymous' is checked so no authentication is required. I'd also check 'LAN' only
     
    Last edited: Sep 16, 2018