All Projects → iammert → Frames

iammert / Frames

Licence: other
Retrieves desired frames from video.

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Frames

Ticketview
🎫 A custom view for showing tickets
Stars: ✭ 101 (+98.04%)
Mutual labels:  view, customview
Zloading
[Android] 这是一个自定义Loading View库。暂停更新
Stars: ✭ 552 (+982.35%)
Mutual labels:  view, customview
Enviews
🌟A cool dynamic view library
Stars: ✭ 1,771 (+3372.55%)
Mutual labels:  view, customview
Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-39.22%)
Mutual labels:  view, customview
Cosin
Android loading view library 📊🍭
Stars: ✭ 129 (+152.94%)
Mutual labels:  view, customview
Textwriter
Animate your texts like never before
Stars: ✭ 140 (+174.51%)
Mutual labels:  view, customview
Pagemenulayout
【Android分页菜单控件】快速实现美团、饿了么、京东、淘宝首页分页菜单效果
Stars: ✭ 197 (+286.27%)
Mutual labels:  view, customview
AndroidSamples
Android例子----View、指纹、Canvas、RecyclerView、BottomSheet、PopupWindow、Broadcast、Service、Rxjava、Retrofit、Handler等
Stars: ✭ 107 (+109.8%)
Mutual labels:  view
MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (-39.22%)
Mutual labels:  view
ExpertVideoToolbox
A lightweight, versatile GUI of x264, x265. Nearly full input formats support, .mkv and .mp4 output support. Avs support will be added soon. Language: Chinese
Stars: ✭ 12 (-76.47%)
Mutual labels:  mp4
sora-editor
A cool code editor library on Android with syntax-highlighting and auto-completion. (aka CodeEditor)
Stars: ✭ 580 (+1037.25%)
Mutual labels:  customview
LovelyView
🔗A view that combines pictures and texts.(一个组合图片和文本的view).
Stars: ✭ 68 (+33.33%)
Mutual labels:  view
makesweet
Put pictures into animations from the command line.
Stars: ✭ 18 (-64.71%)
Mutual labels:  mp4
rrtsp client
Rust high level RTSP client
Stars: ✭ 12 (-76.47%)
Mutual labels:  mp4
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+15174.51%)
Mutual labels:  mp4
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (+29.41%)
Mutual labels:  view
bpmn-visualization-js
A TypeScript library for visualizing process execution data on BPMN diagrams
Stars: ✭ 113 (+121.57%)
Mutual labels:  view
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (-31.37%)
Mutual labels:  view
Xamarin.BlurView
Dynamic iOS-like blur of underlying Views for Android.
Stars: ✭ 26 (-49.02%)
Mutual labels:  view
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (-58.82%)
Mutual labels:  view

What is Frames?

Frames library retrieves frames from video. It loads frames lazily under the hood. You can customize your frame fetching request as you need.

What is FrameRequest?

There are 3 types of frame request.

SingleFrameRequest

If you want to fetch a specific frame at the specific duration.

val singleFrameRequest = FrameRetrieveRequest.SingleFrameRequest(
    videoPath = "/storage/emulated/0/Download/sample.mp4",
    frameWidth = 400,
    frameHeight = 300,
    durationInMillis = 5213
)

MultiFrameRequest

If you want to fetch all frames with given interval. For instance, If you have 40 seconds video and frame duration is 2 second, Frames library gives you 20 frames.

val multiFrameRequest = FrameRetrieveRequest.MultipleFrameRequest(
    videoPath = "/storage/emulated/0/Download/sample.mp4",
    frameWidth = 400,
    frameHeight = 300,
    durationPerFrame = 2000
)

RangeFrameRequest

If you want to fetch frames with specific range from video with given interval. For instance, you have 40 seconds video and you want to fetch frames between 5. and 15. seconds.

val rangeFrameRequest = FrameRetrieveRequest.RangeFrameRequest(
    videoPath = "/storage/emulated/0/Download/sample.mp4",
    frameWidth = 400,
    frameHeight = 300,
    durationPerFrame = 4000,
    startDuration = 5000,
    endDuration = 15000
)

How to load frames?

Add to XML

 <com.momentolabs.frameslib.ui.view.VideoFramesLayout
      android:id="@+id/layoutFramesLayout"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"/>

Load

Frames.load(frameRequest).into(layoutFramesLayout)

Load frame bitmaps manually

Frames
    .load(frameRetrieveRequest)
    .into { framesResource ->
        when (framesResource.status) {
            Status.EMPTY_FRAMES -> // emit all empty frames initially. (you can draw your own custom view with this)
            Status.LOADING -> // Lazily emits frames while loading. This scope will be called serially until all frames loaded
            Status.COMPLETED -> // Called when all frames loaded.
        }
    }

You can also change provider type.

Frames
    .load(frameRetrieveRequest)
    .setProviderType(ProviderType.FFMPEG or ProviderType.NATIVE_ANDROID)
    .into{...}

How does it work behind the scene?

Notes

  • Before using Frames library, ask for the READ_EXTERNAL_STORAGE permission.

Setup

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.iammert:Frames:0.3'
}

License

Copyright 2019 Mert Şimşek

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].