Skip to content

Instantly share code, notes, and snippets.

View moeiscool's full-sized avatar
💭
Find me on Gitlab.com!

Moe moeiscool

💭
Find me on Gitlab.com!
View GitHub Profile
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@SteffenBlake
SteffenBlake / gist:93d442c0413425112e17de8e13642215
Last active March 11, 2024 21:51
Security Camera handy links

Cheap gear to get the job done

  1. Reolink PoE 5MP RLC-522 - https://www.amazon.ca/gp/product/B01AL5D85W/ref=ppx_yo_dt_b_asin_title_o06_s00
  2. Mokerlink 1 to 4 port PoE switch - https://www.amazon.ca/MokerLink-Ethernet-Support-IEEE802-3af-Fanless/dp/B07SGBQNLM/ref=sr_1_4
  3. (Kind of works) Raspberry Pi 4 - https://www.amazon.ca/CanaKit-Raspberry-Starter-Kit-4GB/dp/B07WRMR2CX/ref=sr_1_4 3a. (Recommended) Nanopi R4S (Way better performance but likely has to ship from China, but it is the far superior device for same price)
  4. Recommended: Also get yourself a USB 3.0 portable hard drive, preferably 2TB+, of your preferred brand

Also likely needed:

@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@pliablepixels
pliablepixels / NVIDIA GPU CUDA 10.1 Ubuntu 18.md
Last active August 23, 2023 10:28
All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

Step 1: Install NVIDIA Driver

  • sudo apt install nvidia-driver-430
  • reboot
  • run nvidia-smi. If it does not show your GPU, stop, fix. If this doesn't work, nothing else will (the rest of the stuff will compile, but won't work)
@kevinGodell
kevinGodell / mpeg-dash-ffmpeg-dashjs.md
Created September 20, 2017 22:53
Use ffmpeg to connect to an ip cctv camera and create video files on the fly that can be viewed in an mpeg-dash compatible browser using dash.js and an html5 video element.

Live streaming mpeg-dash video using ffmpeg and dash.js

Use ffmpeg to connect to an ip cctv camera and create video files on the fly that can be viewed in an mpeg-dash compatible browser using dash.js and an html5 video element.

Prerequisites

A linux server, such as Ubuntu

Apache web server installed, running, and reachable via its ip address
@aruld
aruld / foreachlistset.dart
Created October 19, 2011 18:30
Dart forEach() on a List/Set
main() {
List<String> list = new List<String>();
list.add('one');
list.add('two');
list.add('twelve');
list.forEach((element) => print(element));
Set<String> set = Set.from(list);
set.forEach((element) => print(element));
}
@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active May 5, 2023 01:51
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@jgornick
jgornick / gist:3786127
Created September 26, 2012 04:47
JavaScript: Parse multiple JSON documents from string
/**
* Parses a string containing one or multiple JSON encoded objects in the string.
* The result is always an array of objects.
*
* @param {String} data
* @return {Array}
*/
function parseJson(data) {
data = data.replace('\n', '', 'g');
@Jiab77
Jiab77 / ffmpeg.md
Last active August 9, 2022 21:40
Compilation FFMpeg / NVENC + QSV + VAAPI + VDPAU + OpenCL

Compilation FFMpeg / NVENC + NVRESIZE + QSV + VAAPI + VDPAU + OpenCL

nVidia nvresize patch is outdated and not more compatible to the latest version of FFmpeg, so it's not included in this documentation.

(even if I've passed a lot of time at trying to make it compile... without any success)

Please don't rely on this page: https://developer.nvidia.com/ffmpeg, the implementation is a hack and was never been added to the main FFmpeg tree.

See:

@muendelezaji
muendelezaji / build-tensorflow.sh
Last active December 1, 2021 19:27 — forked from PatWie/update-tensorflow.sh
Script to build TensorFlow from source. Platform is ARM64 (aka aarch64) with OpenCL support via Codeplay SYCL SDK
#!/bin/bash
# =============================================================
# UPDATE SOURCE
# =============================================================
# git clone https://github.com/tensorflow/tensorflow
# git checkout -- .
# git pull origin master
# TF_BRANCH=r1.8
TF_ROOT=/home/tensorflow