Giter VIP home page Giter VIP logo

mintaka33 / ffmpeg-deeplearning-encode Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 51.29 MB

A E2E solution for Video Capturing, Processing, Encoding and Transmitting based on ffmpeg

License: GNU Lesser General Public License v2.1

Makefile 0.42% C++ 28.96% C 62.46% Shell 0.04% Perl 0.03% CSS 0.01% Objective-C 2.00% Assembly 5.79% Verilog 0.01% Cuda 0.01% Roff 0.01% Awk 0.01% HTML 0.01% Ruby 0.01% Python 0.01% CMake 0.25% Batchfile 0.01% M4 0.01% Meson 0.01% Smarty 0.01%
video-encoding surveillance-video deeplearning video-streaming-server ffmpeg opencv

ffmpeg-deeplearning-encode's Introduction

VideoCPET

A E2E solution for Video Capturing, Processing, Encoding and Transmitting based on ffmpeg

FFmpeg

set environment variables

export LIBVA_DRIVER_NAME=iHD
export LIBVA_DRIVER_PATH=/usr/local/lib/dri/iHD_drv_video.so
export LD_LIBRARY_PATH=/home/fresh/data/work/VideoCPET/build/detect

ffmpeg basic usage

# USB camera preview
./ffplay -f v4l2 -s 640x480 -i /dev/video0 

# capture video and encode (SW)
./ffmpeg -f v4l2 -s 640x480 -i /dev/video0 -vframes 100 -c:v h264 out.mp4

# capture video and encode (HW)
./ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -f v4l2 -i /dev/video0 \
-vf 'format=nv12,hwupload' -vframes 100 -c:v h264_vaapi -qp 42 out.mp4 -y

# capture video, scaling+encode (HW)
./ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -f v4l2 -i /dev/video0 \
-vf 'format=nv12,hwupload,scale_vaapi=640:480:nv12' -vframes 100 -c:v h264_vaapi -qp 42 out.mp4 -y

ffmpeg server streaming usage

# server (note: 10.239.141.208 is client IP)
./ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -f v4l2 -i /dev/video0 \
-vf 'format=nv12,hwupload,scale_vaapi=640:480:nv12' -vframes 10000 -c:v h264_vaapi -qp 42 \
-f mpegts udp://10.239.141.208:1234 -re

# client (note: 10.239.141.20 is server IP)
ffplay udp://10.239.141.20:1234

ffmpeg-deeplearning-encode's People

Contributors

mintaka33 avatar neptune46 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yexiaoya

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.