Giter Site home page Giter Site logo

ffmpeg-application's Introduction

FFmpeg-Application

Just some small application for testing FFMPEG

  • FlashVedioPlayer: Show streaming in web page
  • Vedio2RTMP: Upstreaming a local flv file according to RTMP protocol
  • WebCam2RTMP: Get image from webcam and upstreaming according to RTMP protocol
  • Audio2RTMP: Get audio from microphone and upstreaming according to RTMP protocol
  • MultiMedia2RTMP: Upstreaming video and audio simultaneously and finish synchronized

Environment

  • OS: Win10
  • Compiler: Visual studio 2017
  • FFmpeg: 4.3.1 (2020-10-01 release)

FlashVedioPlayer

  • Show streaming in web page
    • Apply swfs/StrobeMediaPlayback.swf provide by Adobe
    • pluginspage='http://www.adobe.com/go/getflashplayer'
    • flashvars='&src=rtmp://127.0.0.1:443/live/home&autoHideControlBar=true&streamType=live&autoPlay=true&verbose=true'

Vedio2RTMP

Upstreaming a local flv file according to RTMP protocol and show the streaming in web page

Implement the following function

  • Get information from input file
    • Open an input stream and read the header
    • Read packets of a media file to get stream information
  • Muxing
    • Allocate an AVFormatContext for an output format
    • Add a new stream to a media file
    • Copy paramter from codec
  • Codec
    • avcodec_find_encoder: Find a registered encoder with a matching codec ID.
    • Encode
  • RTMP IO
    • Create and initialize a AVIOContext for accessing the resource indicated by url
    • Allocate the stream private data and write the stream header to an output media file
    • pts to dts transformation and speed control
    • Write a packet to an output media file ensuring correct interleaving

Result

Execute

Webcam2RTMP

Get image from webcam with opencv and upstreaming according to RTMP protocol

Implement the following function

  • Open camera
    • cv::VedioCapture
  • RGB to YUV
    • Init swsContext
    • Init struct of yuv data
    • Config to yuv
    • Allocate buffur for yuv
  • Codec
    • Find Codec
    • Create context for codec
    • Config parameter for codec
    • Open codec context
    • Encode
  • Muxing
    • Create IO context
    • Add vedio stream
    • Copy paramter from codec
  • RTMP IO
    • Open RTMP network IO
    • Write the stream header to an output media file

Audio2RTMP

Get audio from microphone with Qt and upstreaming according to RTMP protocol

Implement the following function

  • Record audio
  • Audio resample
    • Init context for resample
    • Audio ouput allocate
    • Resample
  • Codec
    • Init audio codec
    • Int context for codec
    • Config audio context
    • Open audio codec
    • pts calculation
    • Encode
  • Muxing
    • Init Context
    • Add a new stream to a media file.
    • Copy parameter from codec
  • RTMP IO
    • Open rtmp IO
    • Allocate the stream private data and write the stream header to an output media file
    • Upstreaming

MultiMedia2RTMP

Implement AudioRecord, VideoCapture, MediaEncode Factory and RTMP module. Upstreaming video and audio simultaneously and finish synchronized.

  • AudioRecord Factory
    • Finish a concrete factory with Qt
  • VideoCapture Factory
    • Finish a concrete factory with opencv
  • MediaEncode Factory
    • Finish a concrete factory with FFMPEG
  • RTMP module
    • Implement muxing and rtmp function with FFMPEG

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.