Skip to content

Instantly share code, notes, and snippets.

Dennis E. Mungai Brainiarc7

Block or report user

Report or block Brainiarc7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Brainiarc7
Brainiarc7 / h264_nvenc
Created Jul 22, 2019 — forked from nico-lab/h264_nvenc
ffmpeg -h encoder=h264_nvenc
View h264_nvenc
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
General capabilities: delay hardware
Threading capabilities: none
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
h264_nvenc AVOptions:
-preset <int> E..V..... Set the encoding preset (from 0 to 11) (default medium)
default E..V.....
slow E..V..... hq 2 passes
medium E..V..... hq 1 pass
fast E..V..... hp 1 pass
@Brainiarc7
Brainiarc7 / amdgpu_compute_mode_linux.php
Created Jul 3, 2019 — forked from divinity76/amdgpu_compute_mode_linux.php
sets "compute mode" on AMD GPU's in linux
View amdgpu_compute_mode_linux.php
#!/usr/bin/env php
<?php
declare(strict_types = 1);
if (posix_geteuid () !== 0) {
die ( "error: this script requires root privileges, re-run it as root." );
}
$amdgpu_dir = '/sys/bus/pci/drivers/amdgpu';
$dirs = array_filter ( array_map ( 'trim', glob ( $amdgpu_dir.DIRECTORY_SEPARATOR.'*', GLOB_NOSORT | GLOB_ONLYDIR | GLOB_MARK ) ), function (string $str) {
return (is_writable ( $str."power_dpm_force_performance_level" ) && is_writable ( $str.'pp_compute_power_profile' ));
} );
@Brainiarc7
Brainiarc7 / boot.bif
Created Jun 27, 2019 — forked from KeitetsuWorks/boot.bif
BIF File for Zynq UltraScale+ MPSoC
View boot.bif
the_ROM_image:
{
[fsbl_config] a53_x64
[bootloader] <fsbl.elf>
[pmufw_image] <pmufw.elf>
[destination_device=pl] <bitstream>
[destination_cpu=a53-0, exception_level=el-3, trustzone] <bl31.elf>
[destination_cpu=a53-0, exception_level=el-2] <u-boot.elf>
}
View ubuntu_setup.md
  1. Installing NVIDIA Drivers ❗️❗️
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
  1. From last command see nvidia-driver-number and use it in the command below and then reboot 📺 ✔️
@Brainiarc7
Brainiarc7 / run.sh
Created Jun 9, 2019 — forked from tmehlinger/run.sh
gstreamer RTP to RTMP
View run.sh
#!/bin/bash
# tested on Ubuntu 16.04
apt-get install -y \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-tools
@Brainiarc7
Brainiarc7 / ubuntu-tweak.sh
Created Apr 22, 2019 — forked from salaros/ubuntu-tweak.sh
My tweaks for Ubuntu + Dell Inspiron 5567
View ubuntu-tweak.sh
#!/usr/bin/env bash
# Require root to run
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 0
fi
# [PlayOnLinux] - disables protection against the usage of Ptrace
# https://www.playonlinux.com/en/topic-10534-Regarding_ptrace_scope_fatal_error.html
@Brainiarc7
Brainiarc7 / ffmpeg-nvprime-build.md
Last active Jul 30, 2019
FFmpeg build for NVIDIA PRIME-enabled systems on Ubuntu 18.04LTS+. NVENC, QuickSync and VAAPI hwaccels are enabled.
View ffmpeg-nvprime-build.md

FFmpeg build for Optimus and dual-GPU (Intel+NVIDIA) systems on Ubuntu 18.04LTS:

Build platform: Ubuntu 18.04LTS

Goals: Generate an FFmpeg build that can utilize NVENC, QuickSync and VAAPI-based hardware acceleration on NVIDIA-PRIME-based systems on Ubuntu 18.04LTS+.

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

@Brainiarc7
Brainiarc7 / ffmpeg-extract-keyframes.sh
Created Dec 14, 2018 — forked from savvot/ffmpeg-extract-keyframes.sh
Extract only keyframes (I-frames) from video to images with console ffmpeg
View ffmpeg-extract-keyframes.sh
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@Brainiarc7
Brainiarc7 / powercfg-win10-more-settings.cmd
Created Nov 12, 2018 — forked from Nt-gm79sp/powercfg-win10-more-settings.cmd
Show/hide hidden settings in Win10 Power Options
View powercfg-win10-more-settings.cmd
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@Brainiarc7
Brainiarc7 / 01-installing-linux-on-asus-gm501gs-xs74.md
Last active Jul 26, 2019
Installing Ubuntu 18.04LTS on the Asus GM501GS-XS74 notebook
View 01-installing-linux-on-asus-gm501gs-xs74.md

Installing Linux on the Asus GM501GS-XS74:

For starters,

If you are dual booting, install Windows first, and partition from there with a tool such as Minitool. You'll only need two partitions, one for root and optionally, a small one for swap (say, 8GB). Partition them as appropriate, and when done, reboot into the UEFI menu and ensure that:

(a). Secure boot is disabled (otherwise you won't be able to load up proprietary drivers needed for the Nvidia GPU).

(b). Confirm that you're booting in UEFI mode ONLY. This is the default. CSM should remain disabled. Here's why.

You can’t perform that action at this time.