Jellyfin Forum
What is your DVD ripping process? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: What is your DVD ripping process? (/t-what-is-your-dvd-ripping-process)



What is your DVD ripping process? - spmsl - 2024-04-15

I'm sorry if this has been asked before, I've attempted to search the forum to find mentions of topics that apparently do not exist so I thought I'd revive the subject. 

We've just recently re-discovered our trove of DVDs and I've set Jellyfin up in order for us to have easy access to them. At the moment, my process is relatively simple; MakeMKV to rip and I put it through Handbrake for file size and device compatibility as I'm currently using an old pi3 for our Jellyfin Server (I intend to upgrade to some sort of MiniPC in some time) and it's a bit hopeless when it comes to Hardware Acceleration. 

My biggest issue right now is that I cannot seem to get these Ripped DVDs working on our Mobile Devices, although they work fine on the computer or Smart TV app. 

I also don't really know what the best practices are when it comes to Subtitles as most of the DVDs do not provide SRT files but VOBSUB files. 

I've read that it's just easier to search for them manually rather than running them through some OCR process. For some of our movies, this has been a pretty solid strategy, but for many others I've spent hours testing various subtitles via the opensubtitles plugin that have the minimum amount of offset to and we don't always find subtitles in multiple languages (we are a multi-lingual household). I've heard good things with Bazarr, and I will eventually give that a go when I upgrade my hardware, but until then I was wondering how everyone else deals with this. 

What is your process and what have you found works the best for you?


RE: What is your DVD ripping process? - bitmap - 2024-04-15

MakeMKV > ffmpeg encode in batches

I use a docker container that allows me to set it up for auto-ripping and I originally experimented with a handbrake container to set a watch folder. This setup allowed me to continuously rip and encode and all I had to do was change out discs. I did my entire collection fairly quickly with five available disc drives. In the Guides subforum there's a detailed walkthrough of somebody's process from start to finish, so I'd recommend checking that out.

Your question is focused on subs, which is a tough one. Neither Blu-ray nor DVD provide SRT or ASS subtitles, they're mostly VOB and PGS. These will almost always require transcoding to view. You've identified the only other way to find SRT subs: hunt them down. Bazarr works pretty well but isn't a panacea. Manual searching is painful. There really isn't another good way.


RE: What is your DVD ripping process? - akirby83 - 2024-04-15

I do the same thing as you, OP, MakeMKV to Handbrake for conversion.  I can't speak to the subtitle issue but I've never had a problem playing files on mobile devices (Android phones/tablets).  I'm using H.264 codec and the default AAC for audio.


RE: What is your DVD ripping process? - spmsl - 2024-04-15

(2024-04-15, 01:46 PM)bitmap Wrote: MakeMKV > ffmpeg encode in batches

I use a docker container that allows me to set it up for auto-ripping and I originally experimented with a handbrake container to set a watch folder. This setup allowed me to continuously rip and encode and all I had to do was change out discs. I did my entire collection fairly quickly with five available disc drives. In the Guides subforum there's a detailed walkthrough of somebody's process from start to finish, so I'd recommend checking that out.

Your question is focused on subs, which is a tough one. Neither Blu-ray nor DVD provide SRT or ASS subtitles, they're mostly VOB and PGS. These will almost always require transcoding to view. You've identified the only other way to find SRT subs: hunt them down. Bazarr works pretty well but isn't a panacea. Manual searching is painful. There really isn't another good way.

Shame to hear about the subs. If only there was a better way!

I've been wanting to give ffmpeg a go for a while, but never really bothered to look much into it. What's the biggest difference you've noticed between the two? As I understand it, Handbrake is basically a GUI version of ffmpeg with some more limitations, though as I mentioned, I really don't know enough to make a statement like that.


RE: What is your DVD ripping process? - bitmap - 2024-04-15

Handbrake is fine? It's not nearly as flexible as raw ffmpeg and you have the additional overhead of a GUI if you run it that way (there is a Handbrake CLI).

With ffmpeg I can run a short test clip with a couple of flags (-ss 300 -to 10 would seek to 300s in the file and encode to the 10-minute mark), batches are much easier IMO, and I went from wanting to blast my media with a shotgun encoder (e.g., tdarr, Unmanic, automated Handbrake) to carefully considering each piece of media. For example, I've had AV1 encodes where the final file size of a 4K HDR film is less than 8 GB and that's easy for me to catch when I don't automate. For me, flexibility and clear information about what you're doing are huge wins for ffmpeg, but the learning curve for Handbrake is WAY lower. You have to read the documentation for ffmpeg, it's often wrong (e.g., pretty much the entire av1_qsv encoder section is wrong), and it's ALWAYS less information than you need when learning...even with those shortcomings, I have been able to accomplish more with ffmpeg than I ever have with Handbrake.

Additionally, I can change metadata and mux with ffmpeg (although MKVToolnix is better for both) or set metadata while I'm encoding. With Handbrake, you're tied to the settings they choose to expose as well as the version of encoder/decoder they include. In the meantime, I wrote a quick and dirty bash script to compile any version of ffmpeg I want with the flags and dependencies I need, which has come in handy while troubleshooting QuickSync AV1 encoding.


RE: What is your DVD ripping process? - TheDreadPirate - 2024-04-15

ffmpeg also allows you to script and automate your process.

MakeMKV > "work in progress" folder > Run my script against the contents > Rename and place in the appropriate library folder


RE: What is your DVD ripping process? - spmsl - 2024-04-16

Interesting. I definitely need to get myself more comfortable with writing Bash scripts because I do find my process to be incredibly tedious and slow. Automating* the process would definitely be incredibly useful. I've read about a CLI version of Handbrake. Do any of you use it with your workflows? How does that compare with ffmpeg's capabilities?

I've also been testing out something called "Subler" last night (I'm on MacOS if it works with other Operating systems, but there are definitely alternatives out there) and it's been giving me quite promising OCR results with VOB subs to SRT. There's a bunch of spacing issues especially with words ending with "F" and the next one starting with a "T", but overall it's been pretty accurate both with sync and with text. Apparently there is also a CLI version of this which would be interesting to add to the process with Handbrake CLI/ffmpeg.

I'd definitely be curious to know if anyone in this forum has a similar workflow and if they had any tips on optimising that.

On another note, what (if any) issues have you had with AV1? I've yet to test it out, but I've heard some good things although I'm still unsure how universally compatible it is with most devices.


RE: What is your DVD ripping process? - bitmap - 2024-04-16

Can't promise it still works, but I wrote a Handbrake CLI script years ago for batch encoding (below). I used it for near-complete automation. If you check the off-topic forum here, you'll find a topic about ffmpeg where myself and a few others have discussed quite a bit of ffmpeg syntax and batching.

I haven't ever used sub OCR, though it's something I'm interested in due to the amount of very old hard-subbed anime I have where I can get better video, but it's raw (i.e., in Japanese) and nobody has subbed it previously. Most of what I've found is not CLI and/or not Linux-based which presents a problem for me.

As for AV1, I don't have any issues, but I'm running an i7-13700k and an Arc A380. The former decodes without much issue using QSV (QuickSync) and the A380 runs circles around other consumer encoders. Issues? Well, QSV is not fully mature and missing quite a few features available on bare SVT-AV1 or any other encoder but it's blazing fast and works well for any modern media. There have been bumps as ffmpeg has integrated AV1 encoding, but many of those are ironed out and I hope to see new features in the near future.

On the compatibility side, many common devices (e.g., Roku) don't actually support AV1 playback despite claiming to do so. However, my two main devices -- an LG C1 and a Google Pixel 6 -- both support AV1 natively and can render both ASS and SRT without transcoding. My Pixel can even play back AV1 with picture-based subs (VOB/DVD, PGS) without requiring server-side transcoding when I use VLC as an external player with VLC. Most other devices require AV1 --> H264 but I don't serve a ton of clients and haven't had any issues with 3-5 streams going at the same time.

Handbrake Batch Encoding:

Code:
#!/usr/bin/env bash
################DOCUMENTATION ONLY###################
# PURPOSE: Automate ripping of disc media via HandbrakeCLI
# USAGE:  Automatic Setup: ./hbcli-batchenc.sh
#          Manual Setup:    ./hbcli-batchenc.sh <preset> <title>
# INPUT:  Automatic Setup: NONE
#          Manual Setup:    Handbrake preset and/or disc title
#
# OUTPUT:  Automatic Setup: MP4 file using preset at /outDir/title-#.mp4
#          Manual Setup:    MP4 file using specified preset at /path/
#
# READ:    Lines with !AUTOMATIC should be commented out for manual use
#          Lines with !MANUAL must be uncommented and have values
#          Lines with !REMOTE should be commented out for local use
#          If using AUTOMATIC, use a staging area for media and organize after rip
#
# WIP:    Update for using on server (no remote)
#          Figure out how to auto-start on Ubuntu Server 20.04
#          Any way to connect to a DB for naming search?
#          Add flag for remote/local
########################################################################
########################### CHANGE THESE ###############################
########################################################################
# comment out if not using rip local --> store remote
user_name=<remote_host_username>
remote_host=<remote_host_ip_or_name>
# need path to Handbrake presets (can be anywhere)
hbDir=</path/to/handbrake/presets/>
# where is media stored e.g., /mnt/dvd-storage/
baseDir=</path/to/media/>
# what are your prefix names e.g., plex-DVD-[media_type]
# name all presets similar or use single preset
preset_prefix=<preset-naming-convention->
# set minimum title duration from disc to process (integer)
min_dur=<minimum_duration>
# !AUTOMATIC
# output folder for automatic storage
media=<media_store_folder_name>
# !MANUAL
# media is preset name AND media directory
# title is manual disc title input (useful for plex)
#media="$1"
#title="$2"
########################################################################
########################### DO NOT CHANGE ##############################
########################################################################
# !REMOTE
# scp to a remote destination (can comment out in loop rather than here)
# current usage is rip on different computer than server, will be updated
function scpubu () {
  folder=$(printf %q "$3")
  destDir="$2"/"${folder}"/
  ssh "${user_name}"@"${remote_host}" mkdir -p "${destDir}"
  scp "$1" "${user_name}"@"${remote_host}":"${destDir}"
}
# grab disc title for auto-naming purposes
title=$(diskutil info <DISC_DRIVE> | sed -n -e 's/^.*Volume Name: //p' | xargs)
# current usage is media type for folder name (movies vs. tv_shows)
dirSlug="${media}/${title}"
# e.g., plex-DVD-movies.json OR plex-DVD-storage.json
preset="${preset_prefix}${media}"
presetDir="${hbDir}${preset}.json"
# usage is for mounted media storage (/mnt/name/[movies OR tv_shows]/[disc_title])
outDir="${baseDir}${dirSlug}/"
# make HandbrakeCLI error for each title not 0, store errors in variable
rawout=$(handbrakeCLI -i <DISC_DRIVE> --min-duration=0 -t 0 2>&1 >/dev/null)
# count the error lines for total title count
count=$(echo $rawout | grep -Eao "\\+ title [0-9]+:" | wc -l)
# make output directory and any missing parents
mkdir -p "${outDir}"
# iterate through titles
for i in $(seq $count); do
  episode="${outDir}${title}-$i.mp4"
  handbrakeCLI \
  --preset-import-file "${presetDir}" \
  --preset ${preset} \
  -i <DISC_DRIVE> -t $i --min-duration="${min_dur}" -o "${episode}"
  # !REMOTE (comment out next 2 lines)
  scpubu "${episode}" "${media}" "${title}"
  rm "${episode}"
done
rm -r "${outDir}"
drutil eject <DISK_DRIVE>



RE: What is your DVD ripping process? - TheDreadPirate - 2024-04-16

@bitmap  Something you may not have known about your G1 equipped Pixel 6, it can direct play HDR10 in Findroid (exoplayer only).  Including AV1 HDR10.  On my Pixel 6a the screen gets bright enough for a pretty decent HDR experience.  And I'm pretty sure your non-A Pixel 6 has an even brighter screen.


RE: What is your DVD ripping process? - bitmap - 2024-04-17

I did know that! But to be fair I only knew that because I read it somewhere on here a while back. I'll have to check it out at some point, but most of what I use my phone for is watching old anime while I fall asleep at 1% brightness. I wouldn't feel right trying to judge my HDR experience with those constraints, haha...