Benutzer-Werkzeuge

Webseiten-Werkzeuge


blurays_kopieren

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
blurays_kopieren [2025-08-11 21:09:16] – [Mit Linux] manfredblurays_kopieren [2025-10-23 23:48:14] (aktuell) – [Einsatz] manfred
Zeile 1: Zeile 1:
 +====== Blurays kopieren ======
 +
 +  * [[https://www.makemkv.com/developers/usage.txt]]
 +  * [[http://wiki.indie-it.com/wiki/MakeMKV]]
 +  * [[https://www.makemkv.com/forum/]]
 +
 +
 +===== Lizenzschlüssel =====
 +
 +[[https://forum.makemkv.com/forum/viewtopic.php?f=5&t=1053|MakeMKV is free while in beta]] - //von hier bekommt man den aktuellen Beta-Lizenzschlüssel, diese haben alle jeweils ein eigenes Ablaufdatum//
 +
 +Mit dem folgenden Skript kann man den aktuellen Beta-Key automatisiert holen und eintragen lassen.
 +
 +<file bash /usr/local/bin/MakeMKV_Beta-Key_eintragen.sh>
 +#!/bin/sh
 + 
 +# Quelle: https://pastebin.com/vafpYkfa
 +#         2013-08-11
 +# add to Cron Job weekly
 +# crontab -e
 +# @weekly /usr/local/bin/makemkvkey
 + 
 +MAKEMKV_CFG="${HOME}/.MakeMKV/settings.conf"
 + 
 +BETA_KEY="$(links -dump "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053" | fgrep -A3 'Code:' | egrep -v 'Code:|^$' | sed 's/^ *//')"
 +if [ "x$BETA_KEY" != x ]; then
 +        echo "${BETA_KEY}"
 +        cp ${MAKEMKV_CFG} ${MAKEMKV_CFG}.txt 2>/dev/null
 +        cat ${MAKEMKV_CFG}.txt 2>/dev/null | egrep -v '^app_Key' > ${MAKEMKV_CFG}
 +        echo "app_Key = \"${BETA_KEY}\"" >> ${MAKEMKV_CFG}
 +        rm -f ${MAKEMKV_CFG}.txt
 +else
 +        echo "Der BETA-KEY konnte nicht gefunden werden."
 +fi
 +</file>
 +
 +  > echo '                              root    /root/bin/MakeMKV_Beta-Key_eintragen.sh' >> /etc/crontab
 +
 +===== Mit Linux =====
 +
 +Die Shareware **''MakeMKV''** ist z.Z. (2019,2020) die am besten geeignete Software dafür.
 +
 +siehe hier:
 +  * [[http://wiki.indie-it.com/wiki/MakeMKV#Installation]]
 +  * [[https://www.makemkv.com/forum/|MakeMKV support forum]]
 +  * [[http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053|BETA-Key mit Gültigkeitszeitraum]]
 +
 +<code bash BETA-Key>
 +> mkdir -p ~/.MakeMKV
 +> links -dump "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053" | fgrep -A3 'Code:' | egrep -v 'Code:|^$' | sed 's/^ *//;s/.*/app_Key = "&"/' | tee ~/.MakeMKV/settings.conf
 +</code>
 +
 +<code bash Flatpak>
 +> flatpak install com.makemkv.MakeMKV
 +> flatpak repair
 +> flatpak run --command=makemkvcon com.makemkv.MakeMKV info
 +MakeMKV v1.18.1 linux(x64-release) gestartet
 +
 +> flatpak run --command=makemkvcon com.makemkv.MakeMKV mkv disc:0 all .
 +</code>
 +
 +<code bash letzte Versions-Nummer>
 +> links -dump "https://www.makemkv.com/download/" | sed -ne '/Revision history/,//p' | grep -F '* MakeMKV v' | head -n1 | awk '{print $3}'
 +v1.18.1
 +</code>
 +
 +//Sie verwenden den erweiterten Funktionsumfang der Sharewareversion. Sie können das Programm 30 Tage ausprobieren.
 +Danach müssen Sie einen [[https://www.makemkv.com/buy/|Aktivierungsschlüssel erwerben]], wenn Ihnen diese Software gefällt und Sie die Funktionen weiterhin nutzen möchten.//
 +
 +<file bash /root/bin/makemkv.sh>
 +#!/bin/sh
 +
 +#==============================================================================#
 +# BDs und DVDs rippen
 +#==============================================================================#
 +
 +flatpak install com.makemkv.MakeMKV
 +#flatpak repair
 +
 +mkdir -p ~/.MakeMKV/
 +links -dump "http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053" | fgrep -A3 'Code:' | egrep -v 'Code:|^$' | sed 's/^ *//;s/.*/app_Key = "&"/' | tee ~/.MakeMKV/settings.conf
 +flatpak run --command=makemkvcon com.makemkv.MakeMKV mkv disc:0 all .
 +</file>
 +
 +
 +==== Installation (Debian 11) ====
 +
 +  * [[https://makemkv.com/download/]]
 +    * [[https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224]]
 +      * [[https://www.makemkv.com/download/makemkv-bin-1.17.2.tar.gz]]
 +      * [[https://www.makemkv.com/download/makemkv-oss-1.17.2.tar.gz]]
 +
 +<code text>
 +root@linux:~# apt-get install build-essential pkg-config libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev qtbase5-dev zlib1g-dev
 +
 +root@linux:~# tar xzf ~/Downloads/makemkv-oss-1.17.2.tar.gz -C /usr/src/
 +root@linux:~# tar xzf ~/Downloads/makemkv-bin-1.17.2.tar.gz -C /usr/src/
 +
 +root@linux:/usr/src/makemkv-oss-1.17.2# ./configure
 +
 +root@linux:/usr/src/makemkv-oss-1.17.2# make
 +...
 +type "sudo make install" to install
 +
 +root@linux:/usr/src/makemkv-oss-1.17.2# make install
 +/usr/bin/install -c -D -m 644 out/libdriveio.so.0 /usr/lib/libdriveio.so.0
 +/usr/bin/install -c -D -m 644 out/libmakemkv.so.1 /usr/lib/libmakemkv.so.1
 +/usr/bin/install -c -D -m 644 out/libmmbd.so.0 /usr/lib/libmmbd.so.0
 +ldconfig
 +/usr/bin/install -c -D -m 755 out/makemkv /usr/bin/makemkv
 +/usr/bin/install -c -D -m 644 makemkvgui/share/makemkv.desktop /usr/share/applications/makemkv.desktop
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/16x16/makemkv.png /usr/share/icons/hicolor/16x16/apps/makemkv.png
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/22x22/makemkv.png /usr/share/icons/hicolor/22x22/apps/makemkv.png
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/32x32/makemkv.png /usr/share/icons/hicolor/32x32/apps/makemkv.png
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/64x64/makemkv.png /usr/share/icons/hicolor/64x64/apps/makemkv.png
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/128x128/makemkv.png /usr/share/icons/hicolor/128x128/apps/makemkv.png
 +/usr/bin/install -c -D -m 644 makemkvgui/share/icons/256x256/makemkv.png /usr/share/icons/hicolor/256x256/apps/makemkv.png
 +/usr/bin/install -c -D -m 755 out/mmccextr /usr/bin/mmccextr
 +/usr/bin/install -c -D -m 755 out/mmgplsrv /usr/bin/mmgplsrv
 +
 +root@linux:/usr/src/makemkv-oss-1.17.2# which makemkv 
 +/usr/bin/makemkv
 +
 +root@linux:/usr/src/makemkv-oss-1.17.2# make clean
 +rm -rf out tmp
 +
 +root@linux:/usr/src/makemkv-bin-1.17.2# make
 +
 +...
 +
 +This General Public License does not permit incorporating your program into
 +proprietary programs.  If your program is a subroutine library, you may
 +consider it more useful to permit linking proprietary applications with the
 +library.  If this is what you want to do, use the GNU Lesser General
 +Public License instead of this License.
 +
 +( press 'q' to close this screen )
 +(END) q
 +
 +...
 +Please type "yes" if you accept the terms of the license
 +yes
 +type "sudo make install" to install
 +
 +root@linux:/usr/src/makemkv-bin-1.17.2# make install
 +rm -f /usr/bin/makemkvcon
 +rm -f /usr/bin/mmdtsdec
 +rm -f /usr/share/MakeMKV/*
 +install -d /usr/share/MakeMKV
 +install -d /usr/bin
 +install -t /usr/bin bin/amd64/makemkvcon
 +install -m 644 -t /usr/share/MakeMKV src/share/appdata.tar
 +install -m 644 -t /usr/share/MakeMKV src/share/blues.jar
 +install -m 644 -t /usr/share/MakeMKV src/share/blues.policy
 +cd /usr/bin && ln -s -f makemkvcon sdftool
 +
 +root@linux:/usr/src/makemkv-bin-1.17.2# which makemkvcon
 +/usr/bin/makemkvcon
 +
 +root@linux:/usr/src/makemkv-bin-1.17.2# make clean
 +rm -rf tmp
 +
 +root@linux:/usr/src/makemkv-bin-1.17.2# rm -rf tmp
 +</code>
 +
 +
 +==== Beispiele ====
 +
 +Copy all titles from first disc and save as MKV files:
 +  > makemkvcon mkv disc:0 all .
 +  oder
 +  > makemkvcon mkv dev:/dev/sg0 all .
 +
 +List all available drives
 +  > makemkvcon -r --cache=1 info disc:9999
 +
 +Backup first disc decrypting all video files in automation mode with progress output
 +  > makemkvcon backup --decrypt --cache=16 --noscan -r --progress=-same disc:0 c:\folder
 +
 +Start streaming server with all output suppressed on a specific address and port
 +  > makemvcon stream --upnp=1 --cache=128 --bindip=192.168.1.102 --bindport=51000 --messages=-none
 +
 +
 +===== Mit FreeBSD =====
 +
 +Die Linux-Version der Shareware **''MakeMKV''** ist z.Z. die am besten geeignete Software dafür.
 +Es gibt seit 2019 auch einen "Port" dafür.
 +
 +Die Linux-Version von **''MakeMKV''** benötigt ein Kernel-Modul, welches im Standard-Kernel nicht enthalten ist (''sg'').
 +Deshalb muss man sich dafür einen Kernel selber bauen => [[::freebsd:nur den FreeBSD-Kernel bauen]]
 +
 +
 +==== Installation auf FreeBSD 13.2 ====
 +
 +//Nur so konnte ich MakeMKV auf "FreeBSD 13.2-RELEASE-p2" installieren.//
 +
 +Die Linux-Umgebung wurde aus dem Ports-Tree installiert:
 +  > cd /usr/ports/emulators/linux-c7
 +  > make clean
 +  > make
 +  > make clean
 +
 +MakeMKV lies sich absolut nicht aus dem Ports-Tree installieren;
 +zum Glück funktionierte aber die Installation per Paket:
 +  > pkg install multimedia/makemkv
 +  
 +  > update-makemkv-drives
 +  devices linked: /dev/sg0.
 +  When your configuration changes, re-run this script (update-makemkv-drives).
 +
 +
 +==== Vorbereitungen mit FreeBSD 13.0 ====
 +
 +Die neuesten Betriebsystemquellen zum ersten mal saugen:
 +  > rm -fr /usr/src
 +  > mkdir -p /usr/src
 +  > cd /usr/src || exit 1
 +  > git clone https://git.freebsd.org/src.git .
 +  > git checkout releng/13.0
 +
 +später aktuallisieren:
 +  > cd /usr/src || exit 1
 +  > git pull
 +  > sh /usr/src/sys/conf/newvers.sh -v
 +
 +
 +==== Vorbereitungen mit FreeBSD 12.1 ====
 +
 +einen eigenen Kernel bauen (FreeBSD 12.1), der die nötige Unterstützung mitbringt:
 +  > pkg install devel/subversion
 +  > rm -fr /usr/src/*
 +  > svnlite checkout svn://svn.freebsd.org/base/releng/$(freebsd-version -u | awk -F'-' '{print $1}') /usr/src
 +
 +
 +==== Den neuen Kernel mit dem benötigten Modul für FreeBSD bauen ====
 +
 +  > cd /usr/src/sys/amd64/conf/
 +  > echo "include         GENERIC" > MYKERNEL
 +  > echo "ident           MYKERNEL" >> MYKERNEL
 +  > echo "device          sg                    # das wird von makemkv benötigt" >> MYKERNEL
 +  > echo "options         COMPAT_LINUXKPI       # ist optional für die Linux-Unterstützung direkt durch den Kernel" >> MYKERNEL
 +  
 +  > cd /usr/src/
 +  > make buildkernel KERNCONF=MYKERNEL
 +  > make installkernel KERNCONF=MYKERNEL
 +  > shutdown -r now
 +
 +
 +==== Installation ====
 +
 +
 +=== Vorbereitung/Voraussetzungen ===
 +
 +Vor der Installation bitte kontrollieren, ob die Linux-Module geladen sind und die ''sg0''-Gerätedatei vorhanden ist:
 +  > kldstat | fgrep linux
 +  15    1 0xffffffff83710000    388f8 linux.ko
 +  16    2 0xffffffff83749000     db70 linux_common.ko
 +  17    1 0xffffffff83757000    30ac8 linux64.ko
 +
 +ansonsten müssen sie geladen werden:
 +  > kldload linux
 +  > kldload linux64
 +
 +und dann die ''sg0''-Gerätedatei
 +  > ls -lha /dev/sg*
 +  crw-------  1 root  operator   0x79 Jul 28 15:12 /dev/sg0
 +  lrwxr-xr-x  1 root  wheel        3B Jul 28 15:12 /dev/sga -> sg0
 +
 +an sonsten muß ein neuer Kernel gebaut werden:
 +  > echo "device                  sg" >> /usr/src/sys/amd64/conf/MYKERNEL
 +  ...
 +
 +
 +=== Mit Ports-Tree ===
 +
 +  > cd /usr/ports/emulators/linux-c7
 +  > make clean
 +  > make
 +  > make clean
 +
 +  > cd /usr/ports/multimedia/makemkv
 +  > make clean
 +  > make
 +  > make clean
 +
 +  > update-makemkv-drives
 +  devices linked: /dev/sg0.
 +  When your configuration changes, re-run this script (update-makemkv-drives).
 +
 +//Hat bei mir nicht funktioniert, bei mir bricht das ''make'' in ''emulators/linux-c7'' ab.//
 +
 +
 +=== Mit PKG ===
 +
 +  > pkg install emulators/linux-c7
 +  
 +  > echo "linprocfs       /compat/linux/proc      linprocfs       rw              0       0" >> /etc/fstab
 +  > echo "linsysfs        /compat/linux/sys       linsysfs        rw              0       0" >> /etc/fstab
 +  > echo "tmpfs           /compat/linux/dev/shm   tmpfs           rw,mode=1777    0       0" >> /etc/fstab
 +  > echo "linsysfs        /compat/linux/sys       linsysfs        rw              0       0" >> /etc/fstab
 +  
 +  > chmod 1777 /compat/linux/tmp
 +  > for M in /compat/linux/proc /compat/linux/sys /compat/linux/dev/shm /compat/linux/sys ; do mount "${M}" ; done
 +
 +  > pkg install multimedia/makemkv
 +  
 +  > update-makemkv-drives
 +  devices linked: /dev/sg0.
 +  When your configuration changes, re-run this script (update-makemkv-drives).
 +
 +//Hat bei mir mit ''FreeBSD 12.1-RELEASE'' und mit ''FreeBSD 13.0-RELEASE'' funktioniert.//
 +
 +
 +==== Einsatz ====
 +
 +den ersten Titel von der ersten Disk (Laufwerk) in das MKV-Format transkodieren:
 +  > makemkvcon mkv dev:/dev/sg0 all .
 +  MakeMKV v1.17.7 linux(x64-release) started
 +  The new version 1.18.2 is available for download at http://www.makemkv.com/download/
 +  Using direct disc access mode
 +  Title #1 was added (28 cell(s), 2:12:00)
 +  Cells 5-5 were removed from title end
 +  Title #2 was added (4 cell(s), 0:07:23)
 +  Error 'Unspecified error' occurred while issuing SCSI command AD010..003F000 to device 'SG:dev_0:126'
 +  Operation successfully completed
 +  Saving 2 titles into directory file://.
 +  2 titles saved
 +  Copy complete. 2 titles saved.
 +
 +dieses Programm hinterlässt (auf FreeBSD) immer einen CORE-Dump, den man getrost löschen kann:
 +  > rm -f makemkvcon.core
 +
 +es ist auch möglich, das schreiben von Core-Dumps dauerhaft abzuschalten:
 +  > echo "kern.coredump=0" >> /etc/sysctl.conf
 +  > sysctl kern.coredump=0
 +  kern.coredump: 1 -> 0
 +
 +Anzahl der Titel auf der Disk ausgeben:
 +  > makemkvcon -r info dev:/dev/sg0 | egrep '^TCOUNT:'
 +  TCOUNT:2
 +
 +Dieses Kommando schreibt alle Titel von der Disk als MKV-Datei in das aktuelle Verzeichnis:
 +  > makemkvcon mkv dev:/dev/sg0 all .
 +
 +<file bash /root/bin/BD_mit_makemkv_kopieren.sh>
 +#!/usr/bin/env bash
 +
 +#------------------------------------------------------------------------------#
 +#
 +# BD titelweise rippen
 +#
 +# http://indertat.de/wiki/doku.php?id=blurays_kopieren
 +#
 +#------------------------------------------------------------------------------#
 +
 +#VERSION="v2020102300"          # zum ersten Mal BD gerippt
 +#VERSION="v2021081800"          # Hinweis für einen "beta key" hinzugefügt
 +VERSION="v2025102300"           # von disc:0 auf dev:/dev/sg0 umgestellt
 +
 +PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin"
 +
 +#------------------------------------------------------------------------------#
 +### Vorbereitungen
 +
 +kldload linux64 2>/dev/null
 +DISK_INFO="$(makemkvcon -r info disc:0)"
 +REGISTRATION_KEY="$(echo "${DISK_INFO}" | fgrep 'enter a registration key to continue using the current version')"
 +rm -f makemkvcon.core
 +echo "${DISK_INFO}" > /tmp/makemkvcon.log
 +TITEL_ANZAHL="$(echo "${DISK_INFO}" | egrep '^TCOUNT:' | awk -F':' '{print $2}')"
 +TITEL_NAME="$(echo "${DISK_INFO}" | fgrep '/dev/sg0' | rev | awk -F'"' '{gsub("[ \t]","_");print $4}' | rev)"
 +
 +echo "
 +# REGISTRATION_KEY='${REGISTRATION_KEY}'
 +# TITEL_ANZAHL='${TITEL_ANZAHL}'
 +# TITEL_NAME='${TITEL_NAME}'
 +"
 +#exit 10
 +
 +
 +if [ "x${REGISTRATION_KEY}" != "x" ] ; then
 +        echo "Es wird ein Registrierungsschlüssel benötigt, damit diese Software weiterhin funktioniert."
 +        echo "  Einen Beta-Key mit kurzem Gültigkeitszeitraum, kann man von hier bekommen:"
 +        echo '  https://forum.makemkv.com/forum/viewtopic.php?f=5&t=1053'
 +        echo
 +        exit 11
 +fi
 +
 +if [ "x${TITEL_NAME}" == "x" ] ; then
 +        echo "Die BD konnte nicht gelesen werden."
 +        echo
 +        exit 12
 +fi
 +
 +mkdir ${TITEL_NAME} || exit 11
 +cd ${TITEL_NAME} || exit 12
 +
 +#------------------------------------------------------------------------------#
 +### Rippen
 +
 +#makemkvcon mkv disc:0 all .
 +ls -lha /dev/sg0
 +makemkvcon mkv dev:/dev/sg0 all .
 +rm -f makemkvcon.core
 +
 +#------------------------------------------------------------------------------#
 +### Rechte für weitere Bearbeitungen setzen
 +
 +chown -R mmuser:dlna *
 +
 +#------------------------------------------------------------------------------#
 +### Disk auswerfen
 +
 +if [ "$(uname -s)" == "FreeBSD" ] ; then
 +        ### FreeBSD
 +        #DVD_DEV="/dev/cd0"
 +        DVD_DEV="/dev/$(camcontrol devlist | grep -E 'DVD|BD' | awk '{print $NF}' | tr -s '[(,)]' '\n' | grep -Ev '^$|pass[0-9]' | egrep -v 'sg[0-9]')"
 +        #
 +elif [ "$(uname -s)" = "Linux" ] ; then
 +        ### Linux
 +        #DVD_DEV="/dev/sr0"
 +        DVD_DEV="/dev/$(grep -E 'DVD|BD' /sys/block/*/device/model | awk -F'/' '{print $4}' | egrep -v 'sg[0-9]')"
 +        #
 +else
 +        ### sollte in FreeBSD _und_ in Linux funktionieren
 +        DVD_DEV="$(ls -1 /dev/dvd* /dev/cd* 2>/dev/null | head -n1)"
 +fi
 +
 +eject ${DVD_DEV}
 +</file>
 +