Skip to content

Instantly share code, notes, and snippets.

View abkoradiya's full-sized avatar
😃

Abhay Koradiya abkoradiya

😃
View GitHub Profile
@handledexception
handledexception / ffmpeg-cheat.md
Created September 9, 2019 23:16
FFMPEG Cheat Sheet

FFMPEG Cheat Sheet

Remux Video/Audio

Copy all input streams to output

ffmpeg -i input.ts -c:v copy -c:a copy -map 0:? output.mkv

Video Scaling

@slightfoot
slightfoot / page_turn.dart
Created September 9, 2019 21:28
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@Mun0n
Mun0n / GridSpacingItemDecoration.kt
Created February 21, 2019 12:09
GridSpacingItemDecoration in kotlin for Grid RecyclerViews
import android.graphics.Rect
import android.support.v7.widget.RecyclerView
import android.view.View
class GridSpacingItemDecoration(private val spanCount: Int, private val spacing: Int, private val includeEdge: Boolean) : RecyclerView.ItemDecoration() {
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
val position = parent.getChildAdapterPosition(view) // item position
val column = position % spanCount // item column

quiver:///notes/85DE3C89-A451-4736-B3B4-82EB872067DE

make a bunch of MP4s out of pngs and mp3s

typeset -Z2 c=0; for f in png/*png; do ((c++)) ffmpeg -y -loop 1 -f image2 -r 25 -i $f -i audio/${f:t:r}.mp3 -c:v libx264 -c:a copy -shortest $c.mp4 done


@derick-montague
derick-montague / sync-github-to-bitbucket.md
Last active March 11, 2024 09:36
Sync github repo to bitbucket repo

Set up remotes

setup local repo

mkdir myrepository
cd myrepository
git init

add bitbucket remote as "origin"

@CannonballSkippy
CannonballSkippy / Convert audio to video with ffmpeg - examples.md
Created April 1, 2017 10:48
A list of examples on how you can use filters to make visual representations of audio using ffmpeg

Convert audio to video with ffmpeg - examples

ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a avectorscope.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]showcqt=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showcqt.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]ahistogram=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a ahistogram.mp4
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
@nesquena
nesquena / PatternEditableBuilder.java
Last active October 21, 2022 10:20
PatternEditableBuilder - Easy way to create colored clickable spans within a TextView!
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.regex.Matcher;
@vipulasri
vipulasri / ImageCompression
Created December 19, 2015 06:01
Whatsapp Like Image Compression
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.media.ExifInterface;
import android.os.AsyncTask;
import android.os.Environment;
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active April 18, 2024 21:00
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4