Skip to main content

Browser View

Use the browser view when you want to start a run without composing a command, follow its progress, or review results with video. It also opens runs saved by the command line. For scripts and machine-readable output, see CLI Usage; for an interactive view in your shell, see Terminal View.

Start a run in the browser​

Start the server:

surfmeter-media serve

Open the URL printed in the terminal. It contains an access token that grants control of the browser view and its runs. Keep the token private. Use surfmeter-media serve --open to launch the browser automatically.

Choose New run, then select Analyze or Compare. Add media from the server's file browser, enter a path or URL, or upload a file from your computer. You can also drop files onto the selected media area. For a comparison, put the reference first and then add the encodes. Set analysis options if needed, check the command preview, and start the run.

The server must be registered to start runs. If the page asks you to register, run surfmeter-media register --registration-key <key> on the server. The page detects the registration without a restart.

Runs are saved under surfmeter-media-runs in the current directory by default. Set another location with --runs-dir <directory>. The server runs one browser job at a time; serve --jobs <n> allows more. Further runs wait in a queue. Press Ctrl+C in the terminal to stop the server.

Open saved and command-line runs​

To review existing runs, put their output directories under one directory and point the server at it:

surfmeter-media serve --runs-dir results

Each run needs its own subdirectory containing records.ndjson.

The Runs page lists the saved analyses and comparisons, their inputs and status. Select a run to open it, or choose New run to start another one.

Runs page showing a completed analysis and comparison from the media test clips

To open a command-line run in the browser as it starts, add --serve:

surfmeter-media analyze --serve -o results/channel1 channel1.ts
surfmeter-media compare --serve -o results/ladder source.mkv encode.mp4

--serve also works with view for saved records. The server stays open after the run finishes.

Review results​

The Analyze view puts the picture and playback controls above the timeline. Click a frame thumbnail, marker or position on the timeline to move the cursor; the picture and values at that position update together. A running analysis fills in as records arrive.

Analyze view showing the video frame, loudness meter, frame strip and metric tracks

The main parts of the viewer are:

  • View tabs: switch between the timeline, statistics, stream information, audio results, warnings and any SCTE-35 cues found in the run.
  • Picture and playback controls: play or step through video at the selected position. The frame readout shows its time, frame number and PTS. The loudness meter shows audio levels at the cursor.
  • Timeline: the thumbnail strip helps you find a scene. Marker rows show events such as I-frames and errors. The tracks below plot measurements over time; their values at the cursor appear beside their names. Use Tracks to choose what to show, and zoom to inspect a short interval.

For a comparison, the Compare view places the reference and encodes next to each other at the same position. Switch between Side by side, Split and Overlay to inspect differences. The metric tracks use a separate color for each encode, so you can compare how their quality changes over time. Worst Frames takes you to the lowest-scoring frames for a selected metric, while Statistics shows recorded metric values and summaries.

Compare view with reference and two encodes above their bitrate, QP and quality tracks

To investigate a low score, open Worst Frames and choose VMAF, PSNR Y or SSIM. Select a row to move the timeline cursor to that frame. The panel shows the reference and encode frames together, so you can see what produced the score.

Worst Frames view with a selected low-VMAF frame and its reference frame

The Audio tab summarizes each audio stream and checks it against the selected loudness targets. The test clip below misses its integrated loudness targets, while its true peak passes. The meter beside the picture follows the cursor on the timeline.

Audio view showing loudness measurements and target checks for a test clip

Frame-exact comparison playback uses the browser's WebCodecs decoder. Browsers make WebCodecs available only to pages in a secure context: a localhost URL or HTTPS with a certificate the browser trusts. A remote http:// URL may open the results, but it cannot play the frame-exact comparison. You can still inspect the timeline and step through individual frames returned by the server. If playback does not start, the page explains what is missing when you press play. The browser must also support WebCodecs and the video codec of the files.

Access from another machine​

By default, the server listens only on 127.0.0.1 and picks a free port. That is enough when the browser runs on the same machine. To open it from another machine, choose one of these approaches. In each case, open the URL with the access token printed by surfmeter-media; the token gives control of the browser view and its runs.

An SSH tunnel is useful if you already have SSH access to the analysis machine. Start the server there on a fixed loopback port:

surfmeter-media serve --runs-dir results --listen 127.0.0.1:8080

On your own machine, forward that port and open the server URL as http://localhost:8080/, keeping its ?token=... part:

ssh -N -L 8080:127.0.0.1:8080 user@analysis-machine

The browser sees localhost, so frame-exact playback works without a certificate. Choose another local port in the SSH command if 8080 is already in use.

With Tailscale Serve, Tailscale provides an HTTPS address for devices in your tailnet. On the analysis machine, start Surfmeter Media with its full Tailscale DNS name in --allowed-host:

surfmeter-media serve --runs-dir results --listen 127.0.0.1:8080 \
--allowed-host '<machine>.<tailnet>.ts.net' --root /srv/media

In another shell on that machine, start the HTTPS proxy:

tailscale serve --bg 8080

Replace <machine>.<tailnet>.ts.net with the machine's actual Tailscale DNS name. Open its HTTPS URL with the token from the server URL. Enable HTTPS certificates in the tailnet if Serve prompts you to do so. Tailscale terminates HTTPS and forwards requests to the loopback listener. --allowed-host lets the server accept the Tailscale host name passed through by the proxy. Set --root explicitly here because the server listens on loopback, where file browsing would otherwise be unrestricted.

For direct HTTPS, listen on a network address and give the server a certificate and key:

surfmeter-media serve --runs-dir results --listen 0.0.0.0:8443 \
--tls-cert cert.pem --tls-key key.pem --root /srv/media

Open the HTTPS URL using a DNS name covered by the certificate. Use a certificate trusted by the browser so the page has a secure context for WebCodecs. A certificate from tailscale cert can be used for the machine's Tailscale DNS name. If you put another HTTPS reverse proxy in front of the server, add its browser-facing name with --allowed-host <hostname>.

The browser can list and analyze files under each --root directory. Repeat the option to expose several directories. When the server listens on a network address and you set no roots, it uses the current directory. --no-upload turns off uploads and URL downloads; --public-downloads-only allows URL downloads only from public addresses. These controls matter when other people can reach the browser view, because anyone with its token can start runs and select inputs.