Skip to content

Instantly share code, notes, and snippets.

View beandog's full-sized avatar

Steve Dibb beandog

View GitHub Profile
@beandog
beandog / conf.d-emby-media-server
Created July 7, 2022 11:21
emby-media-server conf.d and init.d files
EMBY_PIDFILE="/var/run/emby-media-server.pid"
EMBY_OUTLOG="/var/log/emby/out.log"
EMBY_ERRLOG="/var/log/emby/err.log"
EMBY_USER="emby"
EMBY_SCRIPT="/opt/emby-server/bin/emby-server"
@beandog
beandog / configure
Created February 16, 2022 10:29
ffmpeg configure diff for dvd protocol
diff --git a/configure b/configure
index 900505756b..2f8d6d07db 100755
--- a/configure
+++ b/configure
@@ -231,6 +231,7 @@ External library support:
--enable-libdavs2 enable AVS2 decoding via libdavs2 [no]
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
+ --enable-libdvdread enable DVD reading using libdvdread [no]
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
@beandog
beandog / dvd.c
Created February 16, 2022 10:23
ffmpeg dvd support (partial)
/*
* DVD (libdvdread) protocol
*
* Copyright (c) 2021 Steve Dibb <steve.dibb <at> gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include <signal.h>
#include "libbluray/bluray.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include "libbluray/bluray.h"
#include "libbluray/meta_data.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include "libbluray/bluray.h"
#include "libbluray/meta_data.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include <getopt.h>
#include <dvdread/dvd_reader.h>
@beandog
beandog / sample_chapters.c
Created November 25, 2020 06:46
ffmpeg AVChapter problems
/**
* This code is designed to create 5 chapters that are each 1 second apart, and then
* set its metadata to 'Chapter #'.
*
* There are two problems happening:
*
* 1) The chapter titles are all set to whatever the last metadata entry is. In this
* case, they are all 'Chapter 5'.
*
* 2) The range of the chapters is wrong for all of them. They should be 0:00 to 0:01,
@beandog
beandog / dvd_ripper_mp4.c
Created November 16, 2020 09:56
ffmpeg DVD ripper partial proof-of-concept (x264 video only in mp4 container)
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include <getopt.h>
#include <dvdread/dvd_reader.h>
@beandog
beandog / cd_backup
Created August 12, 2020 06:33
cd_backup - archive audio cds
#!/bin/bash
device="/dev/cdrom"
test -z "$1" || device="$1"
# Get the CDDB (cd-discid package)
disc_id="$(cd-discid $device | cut -d ' ' -f 1)"
if [[ -z "$disc_id" ]]; then
echo "Could not grab Disc ID"
exit 1