FFmpeg¶
The following are converted from my 2016 wiki, so things might have changed since.
I have a bunch more notes split out in many small text files in various places, I'll probably slowly add them here over time
x265¶
Presets can be ultrafast, superfast, veryfast, faster, fast, medium (default), slow and veryslow
Only use ultrafast if your media is not important, and you need the fastest speed. My friend butcha told me you shouldn't go lower than veryfast. Which sounds like a good idea if your video is important to you.
CRF for x265¶
The lower the better and bigger file size.
I have tested and recommend the following: * 19-20 for PAL
Suggestion: Compare it yourself!!
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=10 -t 25 output10.mkv
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=15 -t 25 output15.mkv
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=18 -t 25 output18.mkv
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=19 -t 25 output19.mkv
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=20 -t 25 output20.mkv
ffmpeg -i title00.mkv -c:v libx265 -preset ultrafast -x265-params crf=23 -t 25 output23.mkv
DVD Ripping¶
I had a lot of family DVD and VHS recordings I wanted to digitize
I used MakeMKV, to make sure I only got what I needed. MakeMKV depends on the speed of your optical drive, and harddrive, as there's nothing being transcoded.
MakeMKV is not freeware or opensource, but it's free while it's in beta, and you hunt down the beta key on their forum (it changes)
After getting the main title00.mkv(860MB) from MakeMKV, we can feed it into ffmpeg, to generate a much smaller output.mkv (212MB) using:
ffmpeg -i title00.mkv -map 0 -c copy -c:v libx265 -preset ultrafast -x265-params crf=20 output.mkv
This should also keep original sound & subtitle tracks :)
Using a MakeMKV, it took me 18s to convert a 4.76GB ISO to 4.69GB title00.mkv. But transcoding with ffmpeg took 460.88s (9.77x speed) in this text, using my i7-4770k and generated a 712MB output.mkv
Using these numbers, it means I should be able to convert and transcode 187 ISO's daily on my desktop.
Unfortunately I don't have such a large collection of DVDs, but it's definitely a good thing to do if you have a lot of ISO's and want to save some space :)
Windows Batch¶
Since my ingest station was a Windows machine (as I was also using a Windows-only capture card), I made this script, so once done capturing, I could just drag the file or files into the batch file, and it will generate the x265 version for me.
Put this script in the same location as where the bin folder is. Or just change the script to your needs.
Usage: Drag & drop the files onto your .bat file.
Setup: Read the script, understand it.. remove the rem word if everything looks good.
@echo off
echo.
echo Last chance to chicken out...
timeout 10
set "scriptDir=%~dp0"
set "append_to_filename= x265"
if [%1]==[] goto :eof
set n=0
:loop
echo.
echo Script dir: "%scriptDir%"
echo Input: "%~f1"
echo Output: "%~dp1%~n1%append_to_filename%.mp4"
cd %scriptDir%/bin/
rem ffmpeg -i "%~f1" -c:v libx265 -preset veryfast -x265-params crf=19 -c:a aac -strict experimental -b:a 128k "%~dp1%~n1%append_to_filename%.mp4"
shift
set /a n+=1
if not [%1]==[] goto loop
pause