Skip to content

Instantly share code, notes, and snippets.

View Odianosen25's full-sized avatar

Odianosen Ejale Odianosen25

  • WTW
  • Redhill, UK
View GitHub Profile
@Odianosen25
Odianosen25 / download_ftp_tree.py
Created March 26, 2019 11:02 — forked from Jwely/download_ftp_tree.py
recursive ftp directory downloader with python
import ftplib
import os
import re
"""
MIT license: 2017 - Jwely
Example usage:
``` python
import ftplib
@Odianosen25
Odianosen25 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created July 23, 2020 08:46 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

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 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created July 23, 2020 09:23 — forked from Brainiarc7/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.

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 / non_max_suppression.py
Created July 28, 2020 10:52 — forked from CMCDragonkai/non_max_suppression.py
Non-Maximum Suppression for Bounding Boxes #python #algorithms
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 / asyncio_loops.py
Created January 7, 2022 07:23 — forked from lars-tiede/asyncio_loops.py
asyncio + multithreading: one asyncio event loop per thread
import asyncio
import threading
import random
def thr(i):
# we need to create a new loop for the thread, and set it as the 'default'
# loop that will be returned by calls to asyncio.get_event_loop() from this
# thread.
loop = asyncio.new_event_loop()