Skip to content

andywang0607/VideoProcessingService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoProcessingService

A c++ backend rest server provide a simple api for client to demux and docde network video stream or video file

Description

VideoProcessingService is a rest server aim to provide a simple api for application or web developer to get information or data from a video streaming(RTSP, RTMP, HLS, etc.) or a video file, developers can get the following information and data from this service

  • Video
    • Image width and height
    • Video length with milliseconds
    • RGB data and its related pts
  • Audio
    • PCM raw data and its related pts

Feature

The following module have been implement and integrate to the processing flow

Example

  • Demo file
    Provide a sample demostrate how to get video data and information from this service and showing image with OpenCV and playback audio with RtAudio

  • Test file
    Provide a sample demostrate how to get video data and information directly from C++ backend and showing image with OpenCV and playback audio with RtAudio (This method do not need the reset server, but need to compile all c++ backend and integrate to your project)

  • Todo

    • Plugin for Qt
    • Plugin for flutter

How to run this server

# pull image from dockerhub
sudo docker pull andywang0607/video-processing-service 

# Run docker (you can use another port)
sudo docker run --rm -p 9080:9080 andywang0607/video-processing-service 

How to build this server

  1. Prepare third-party library

    • Setup vcpkg
      $ git clone https://github.com/microsoft/vcpkg
      $ cd vcpkg
      $ bootstrap-vcpkg.bat
      
    • Install required library
      $ ./vcpkg install ffmpeg:x64-linux
      $ ./vcpkg install pistache:x64-linux
      $ ./vcpkg install nlohmann-json:x64-linux
      
  2. Build this project

    $ cd $PROJECTPATH
    $ mkdir build
    $ cd build
    $ cmake ..
    $ make
    

Note

This is my weekend project just a practice for building a rest service with c++.
Get decode video and audio data from this service is not a efficent methoud indeed,
But it is quite simple and easy for developer to write a video player in every ui framework

About

A rest server provide a simple API for client to get image rgb data and audio pcm data from a network video stream url or video file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages