Skip to content

Instantly share code, notes, and snippets.

View tt2468's full-sized avatar
💭
working on IRLToolkit

tt2468

💭
working on IRLToolkit
View GitHub Profile
@CrendKing
CrendKing / ffmpeg_thumbnail.cpp
Last active March 6, 2024 22:56
ffmpeg extract video thumbnails
extern "C" {
#include <libavformat/avformat.h>
#include <libavutil/bprint.h>
#include <libavutil/opt.h>
#include <libavutil/imgutils.h>
#include <libswscale/swscale.h>
}
@chrisstubbs93
chrisstubbs93 / ffmpeg.sh
Last active April 28, 2024 19:25
auto-restart FFMPEG when it stops sending frames to youtube
#!/bin/sh
sleep 5
ffmpeg -re -f mjpeg -r 10 -i "http://localhost/?action=stream" -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 1k -strict experimental -s 640x360 -vcodec h264 -pix_fmt yuv420p -g 20 -vb 500k -preset ultrafast -crf 31 -r 10 -f flv "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx" 2> /home/pi/ffmpeg.log
@f0k
f0k / nvidia_boost.sh
Created December 6, 2017 17:45
Set Nvidia GPU application clocks and power limits to maximum supported values
#!/bin/bash
# Sets each CUDA device to persistence mode and sets the application clock
# and power limit to the device's maximum supported values.
# When run with "--dry-run" as first command line argument or not as superuser,
# will display the commands, otherwise it will execute them.
#
# Hint: To run this at boot time, place this script in /root and create a file
# /etc/cron.d/nvidia_boost with the following single line:
# @reboot root /root/nvidia_boost.sh >/dev/null
#