Giter Club home page Giter Club logo

borescope_stream's Introduction

Borescope camera video stream rewriter

This tool rewrites the video stream from a wi-fi borescope camera as described in my blog post Rewriting the video stream from a wi-fi borescope camera.

It fixes the borescope's intentional stream corruption and produces output suitable for use in standard video tools such as ffmpeg that read MJPEG streams. Credit for identifying the method of intentional corruption goes to Michael Karr et al.

Dependencies

Run

This tool runs on POSIX systems. So far, macOS is tested.

Build

The ragel regular language parser generator must be installed.

On macOS, install ragel with Homebrew:

brew install ragel

Build by running make borescope_stream.

Usage

This program is designed to be used in a pipeline. It accepts a stream on stdin and writes raw or transformed data to stdout. It writes parsed headers and image information to stderr.

The following pipeline acquires video from the camera, logs the raw stream to a file for later playback, rewrites the stream in real time, and displays video. A named pipe is used because ffplay only reads files and does not accept input on stdin.

Note that ffplay is only required if you want to watch the video with ffplay. Feel free to not watch the video, or to use replace ffplay with your preferred tool for viewing MJPEG streams.

mkfifo vid.fifo
nc 192.168.10.123 7060 \
    | tee v.log \
    | /path/to/borescope_stream --jpeg >vid.fifo & \
    ffplay -hide_banner -loglevel error -f mjpeg vid.fifo

Command-line options

  • --jpeg - write stripped JPEG stream to stdout.
  • --write-files - write stripped JPEG frames from the input stream to individually numbered files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.