Skip to content

Instantly share code, notes, and snippets.

Avatar

Odianosen Ejale Odianosen25

View GitHub Profile
@Odianosen25
Odianosen25 / non_max_suppression.py
Created Jul 28, 2020 — forked from CMCDragonkai/non_max_suppression.py
Non-Maximum Suppression for Bounding Boxes #python #algorithms
View non_max_suppression.py
import numpy as np
def non_max_suppression(boxes, scores, threshold):
assert boxes.shape[0] == scores.shape[0]
# bottom-left origin
ys1 = boxes[:, 0]
xs1 = boxes[:, 1]
# top-right target
ys2 = boxes[:, 2]
@Odianosen25
Odianosen25 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md 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.
View VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md

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".

@Odianosen25
Odianosen25 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware
View ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@Odianosen25
Odianosen25 / download_ftp_tree.py
Created Mar 26, 2019 — forked from Jwely/download_ftp_tree.py
recursive ftp directory downloader with python
View download_ftp_tree.py
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
You can’t perform that action at this time.