Skip to content

Instantly share code, notes, and snippets.

@gpmnsp
gpmnsp / Install_VirtualBox_5.1_guest_additions.md
Last active October 17, 2017 20:27 — forked from magnetikonline/README.md
Install VirtualBox 5.1 guest additions on Ubuntu server guest.

Install VirtualBox 5.1 guest additions on Ubuntu server guest

Have tested these instructions successfully under an Ubuntu 16.04LTS guest:

  • Create Ubuntu server instance under VirtualBox (obviously).

  • Start VM, goto Devices - Insert Guest Additions CD image to mount the ISO image.

  • From the terminal, run the following commands:

     $ sudo su
     $ apt install gcc make
@gpmnsp
gpmnsp / thumbnails.sh
Created September 6, 2017 17:06 — forked from zmwangx/thumbnails.sh
Script to generate thumbnails of a video and combine into one tile image. Uses FFmpeg and ImageMagick.
#!/bin/zsh
# Script to generate thumbnails of a video and combine into one tile image.
#
# CAUTION:
# FFprobe might fail to extract duration info from a MKV container. Use
# ffmpeg -i video.mkv -c:v copy -c:a copy video.mp4
# to swap to an MP4 container.
#
# Dependencies:
# 1. ffmpeg
@gpmnsp
gpmnsp / # Screensheetmaker.md
Last active March 21, 2023 21:11
Screensheet maker for Linux bash and Windows CMD.EXE

screensheetmaker

  • Consists of two scripts: make-screens.sh for Linux bash and make-screens.cmd for Windows CMD.EXE.
  • Uses ffmpeg, and montage and convert from Imagemagick package, additionally bc under Linux.
  • Works pretty fast. The approach is to divide the file into N intervals, one for each picture and pick the first keyframe after the midpoint of each interval. This is done quickly with a single run of ffmpeg, given the duration of each interval.
  • Known limitations: Length of the video. The shortest video I've run with success was 30 seconds, though the number of screens was limited (by the number of keyframes in the video).

make-screens.sh

Shell script to make screenshot pages from movies with ffmpeg.

@gpmnsp
gpmnsp / compile_ffmpeg.md
Last active October 22, 2017 07:43 — forked from teocci/compile_ffmpeg.md
Compile FFmpeg on Ubuntu 16.04

Compile FFmpeg on Ubuntu

This basic guide supports Ubuntu Xenial Xerus 16.04 and will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide][1].

Note: Copy and paste the whole code box for each step.

Preparation