All Projects → imalimin → Hardwarevideocodec

imalimin / Hardwarevideocodec

Licence: gpl-2.0
HardwareVideoCodec is an efficient video recording library for Android. Supports software and hardware encode. With it, you can record a video at any resolution, no need to care about camera resolution. Everything is so easy.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Hardwarevideocodec

Graphql To Mongodb
Allows for generic run-time generation of filter types for existing graphql types and parsing client requests to mongodb find queries
Stars: ✭ 261 (-29.27%)
Mutual labels:  filter
Gulp Filter
Filter files in a `vinyl` stream
Stars: ✭ 308 (-16.53%)
Mutual labels:  filter
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+892.14%)
Mutual labels:  filter
Hypermark
Markdown for Humans.
Stars: ✭ 266 (-27.91%)
Mutual labels:  filter
Kalmanjs
Javascript based Kalman filter for 1D data
Stars: ✭ 298 (-19.24%)
Mutual labels:  filter
Awsweeper
A tool for cleaning your AWS account
Stars: ✭ 331 (-10.3%)
Mutual labels:  filter
Live Stream Recorder
Monitor and record live streams from YouTube, OPENREC, TwitCasting, etc. Made for VTuber fans. (VTuber 直播自动录像脚本)
Stars: ✭ 260 (-29.54%)
Mutual labels:  recorder
Vue Filter
✌️ A collection of Vue.js filter. [Depressed]
Stars: ✭ 359 (-2.71%)
Mutual labels:  filter
React Search Input
🔍 Simple react.js component for a search input, providing a filter function.
Stars: ✭ 300 (-18.7%)
Mutual labels:  filter
Badwords
A javascript filter for badwords
Stars: ✭ 336 (-8.94%)
Mutual labels:  filter
Angular Filter
Bunch of useful filters for AngularJS (with no external dependencies!)
Stars: ✭ 2,962 (+702.71%)
Mutual labels:  filter
Sensitive
敏感词查找,验证,过滤和替换 🤓 FindAll, Validate, Filter and Replace words.
Stars: ✭ 292 (-20.87%)
Mutual labels:  filter
Crypto Rl
Deep Reinforcement Learning toolkit: record and replay cryptocurrency limit order book data & train a DDQN agent
Stars: ✭ 328 (-11.11%)
Mutual labels:  recorder
Gridjs
Advanced table plugin
Stars: ✭ 3,231 (+775.61%)
Mutual labels:  filter
Pyinstalive
Python script to download Instagram livestreams and replays.
Stars: ✭ 336 (-8.94%)
Mutual labels:  recorder
Jschema
A simple, easy to use data modeling framework for JavaScript
Stars: ✭ 261 (-29.27%)
Mutual labels:  filter
Openglcamera2
Android OpenGL Camera 2.0 实现 30 种滤镜和抖音特效
Stars: ✭ 305 (-17.34%)
Mutual labels:  filter
Android Instagram Filter
a android image filter like instagram
Stars: ✭ 360 (-2.44%)
Mutual labels:  filter
Meiam.system
.NET 5 / .NET Core 3.1 WebAPI + Vue 2.0 + RBAC 企业级前后端分离权限框架
Stars: ✭ 340 (-7.86%)
Mutual labels:  filter
Android Ffmpeg Camerarecord
使用JavaCV提供的支持, 使用OpenGL实时处理+显示摄像头采集的图像, 并使用FFMPEG实时录制音视频
Stars: ✭ 334 (-9.49%)
Mutual labels:  filter

⚠️HardwareVideoCodec will not be updated

This project has been migrated to hwvc now. hwvc is a cross-platform project. Committed to quickly and easily implement a variety of complex multimedia needs, including recording and editing. This project uses c / c + + implementation, currently only supports Android platform, but it can also be easily ported to other platforms, such as IOS.

HWVC(HardwareVideoCodec)

Download

HWVC is an efficient video encoding library for Android. Supports software and hardware encode. With it, you can encode a video at any resolution, no longer need to care about camera resolution. Everything is so easy.

ScreenRecord_1 ScreenRecord_1

Latest release

V1.7.3

  • Support seek now.
  • Fix player`s life cycle.
  • Support add filters to existing videos or cut videos.
  • Support video player.

Features

  • Support video encoding at any resolution. No need to care about camera resolution.
  • Support for add filters to existing videos or cut videos.
  • Support RTMP stream.
  • Support for changing resolution without restarting the camera.
  • Support hard & soft encode.
  • Record video & audio. Pack mp4 through MediaMuxer.
  • Use OpenGL to render and support filter.
  • Supports 40+ filters
  • Support beauty filter.
  • Support for changing resolution without restarting the camera.
  • More features.

Start

If you are building with Gradle, simply add the following code to your project:

  • You need to configure your kotlin environment. Project root build.gradle
buildscript {
    ext.kotlin_version = '1.2.30'//Latest kotlin version
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
allprojects {
    repositories {
        google()
        jcenter()
    }
}
  • Module build.gradle
dependencies {
    implementation 'com.lmy.codec:hardwarevideocodec:1.7.3'
    implementation 'com.lmy.codec:rtmp:1.7.3'//If you want to use RTMP stream.
}
  • For record mp4
class MainActivity : AppCompatActivity() {
    private lateinit var mRecorder: VideoRecorderImpl
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val mTextureView = TextureView(this)
        setContentView(mTextureView)
        mRecorder = VideoRecorderImpl(this).apply {
            reset()
            setOutputUri("${Environment.getExternalStorageDirectory().absolutePath}/test.mp4")
            setOutputSize(720, 1280)//Default 720x1280
            setFps(30)
            setFilter(getDefaultFilter())
            setPreviewDisplay(mTextureView)
        }
        mRecorder.prepare()
        //For recording control
        mTextureView.setOnTouchListener { v, event ->
            when (event.action) {
                MotionEvent.ACTION_DOWN -> {
                    if (mRecorder.prepared())
                        mRecorder.start()
                }
                MotionEvent.ACTION_UP -> {
                    if (mRecorder.started())
                        mRecorder.pause()
                }
            }
            true
        }
    }

    private fun getDefaultFilter(): BaseFilter = GroupFilter.create(BeautyV4Filter())
            .addSticker(TextSticker().apply {
                setText(TextSticker.Text("HWVC", 56f).apply {
                    x = 0.8f
                    y = 0.03f
                })
            })
            .addSticker(ImageSticker().apply {
                setImage(ImageSticker.Image().apply {
                    x = 0.03f
                    y = 0.03f
                    scale = 1.6f
                    bitmap = BitmapFactory.decodeResource(resources, R.mipmap.ic_logo_hwvc)
                })
            })

    override fun onDestroy() {
        super.onDestroy()
        mRecorder.release()
    }
}
  • For live
class MainActivity : AppCompatActivity() {
    private lateinit var mRecorder: VideoRecorderImpl
    private val onStateListener = object : VideoRecorder.OnStateListener {

        override fun onStop() {
        }

        override fun onPrepared(encoder: Encoder) {
            mRecorder.start()
        }

        override fun onRecord(encoder: Encoder, timeUs: Long) {
        }

        override fun onError(error: Int, msg: String) {

        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val mTextureView = TextureView(this)
        setContentView(mTextureView)
        mRecorder = VideoRecorderImpl(this).apply {
            reset()
            setOutputUri("rtmp://192.168.16.125:1935/live/livestream")
            setOutputSize(720, 1280)//Default 720x1280
            setFps(30)
            setFilter(getDefaultFilter())//Default NormalFilter
            setPreviewDisplay(mTextureView)
            setOnStateListener(onStateListener)
        }
        mRecorder.prepare()
    }

    private fun getDefaultFilter(): BaseFilter = GroupFilter.create(BeautyV4Filter())
            .addSticker(TextSticker().apply {
                setText(TextSticker.Text("HWVC", 56f).apply {
                    x = 0.8f
                    y = 0.03f
                })
            })
            .addSticker(ImageSticker().apply {
                setImage(ImageSticker.Image().apply {
                    x = 0.03f
                    y = 0.03f
                    scale = 1.6f
                    bitmap = BitmapFactory.decodeResource(resources, R.mipmap.ic_logo_hwvc)
                })
            })

    override fun onDestroy() {
        super.onDestroy()
        mRecorder.release()
    }
}

Join the HWVC community

Please use our issues page to let us know of any problems.

License

HWVC(HardwareVideoCodec) is GPL-licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].