Since I'm in possession of an original DVD copy of this documentary, I made an H264 rip of it back in 2014, but since then I've learned a little more about video encoding, and technology has progressed. Now we have the H265 / HEVC standard, which has up to 50% better compression than H264 / AVC. So, I thought I should make a new rip. This time, the goal wasn't specifically to make a rip that's smaller than the original VOB files on the DVD disc, but just to make a rip that preserved as much detail as possible from the source. Since storage has gotten cheaper, it only makes sense to do it this way. This rip is only around 227 MB smaller than the video on the DVD, but it's still more convenient, since it's just one file and not a VIDEO_TS folder with multiple VOB files in it. Also, the video stream in my rip is progressive, but the video on the disc is partly interlaced. On the DVD, the documentary itself is actually split across multiple VOB files. The first thing to do was to merge those two titles on the disc, using Avidemux, from multiple VOB files into two MKV files (containing the unprocessed MPEG-2 stream). Matroska (MKV) is just a container, and putting audio and video streams in a Matroska file doesn't actually change anything in the streams themselves. And that's good. I wanted to make sure there was no degradation of the video quality at all while I was working on this rip. Each time you compress something in a lossy codec, you lose some of the information no matter how high you set the bitrate. My rip has only been compressed (by x265) in a lossy way once, by me, and the only other time it has been compressed lossily is on the DVD disc itself. Since the video source is interlaced @ 25 fps (PAL), I ended up with a 50 fps output file. In interlaced video, the frame is separated into two fields, and when deinterlaced that becomes two frames, so the framerate is doubled. My last encode only had 25 fps, but this one has 50. I encoded the two MKV files to FFV1 (in ffmpeg), which is a lossless video codec. Lossless compression means absolutely no information is lost. While I made that encode in ffmpeg, I used a deinterlace filter called 'bwdif', to deinterlace the interlaced parts of the video. I needed to make the video progressive before I concatenated the two files together, because otherwise the field order would get screwed up. Interlaced video means each frame is separated into fields, and those need to be processed in the correct order by the deinterlacer to avoid video artifacts in the finished encode. During this process, I also made sure to crop the video to remove the black bars on both sides, since encoding those are a waste of bits, and they're no fun to look at anyway. After the FFV1 encodes in ffmpeg were done, I opened each of those files in ffmpeg and cut out the scene at the very end of the first file, and at the beginning of the second file. The same scene was present in both files, but there were artifacts in that scene due to the primitive and harsh MPEG-2 compression used on DVDs. In ffmpeg, I blended the two versions of the scene together, by basically playing them on top of each other (using a filter), to make that scene look as good as it possibly can. I figured it had probably been compressed slightly differently on those two occasions (since it was in two separate files on the disc), and by blending the two versions together I would eliminate some of the artifacts. It's important to note I removed the audio track with 'mkvmerge' from one of the files, to make sure the audio was only coming from one of them instead of both. The video cutting in ffmpeg was done down to the accuracy of a single frame, because I was encoding the output to FFV1 anyway. Unless you re-encode, you can't actually get that accuracy when cutting or concatenating videos. After the blending of the two files, in ffmpeg, I concatenated the two main files together into one file. Then I encoded that single concatenated FFV1 file to HEVC using a CRF (Constant Rate Factor) value of 20, in ffmpeg (using the x265 encoder). I chose the main10 x265 profile, because 10 bits per pixel should always be used with HEVC / H265 / x265. It improves the compression in the encoder. During this whole process I made sure not to use any unnecessary video filters, but just the ones that were absolutely necessary. I chose not to use a denoiser or deblocker, for example, because both of those mean some of the video information is lost. You can't actually remove noise without also removing some of the detail in the video, for example. The audio wasn't changed at all, but the original AC3 track from the disc has been copied as is, throughout the whole process. The commands below are the ones I used in ffmpeg. In case you want to look up what the commands actually do, I include the complete ffmpeg documentation in a PDF file. ffmpeg -i 'VTS_05_1_1st_half_encodethis.mkv' -vf bwdif=mode=send_field:parity=auto:deint=interlaced,dejudder,cropdetect=limit=24:round=2:reset_count=0 -c:v ffv1 -c:a copy crop_test.mkv ffmpeg -i 'VTS_05_1_1st_half_encodethis.mkv' -vf bwdif=mode=send_field:parity=auto:deint=interlaced,dejudder,crop=702:576:10 -r 50 -c:v ffv1 -c:a copy 'thecodetest_part1_50fps.mkv' ffmpeg -i 'VTS_06_1_2nd half_encodethis.mkv' -vf bwdif=mode=send_field:parity=auto:deint=interlaced,dejudder,crop=702:576:10 -r 50 -c:v ffv1 -c:a copy 'thecodetest_part2_50fps.mkv' ffmpeg -i 'thecodetest_part1_50fps.mkv' -ss 00:39:59.520 -c:v ffv1 -c:a copy 'thecodetest_part1_50fps_billgates.mkv' ffmpeg -i 'thecodetest_part1_50fps.mkv' -c:v ffv1 -c:a copy -t 00:39:59.520 'thecodetest_part1_50fps_cut.mkv' ffmpeg -i 'thecodetest_part2_50fps.mkv' -ss 00:00:00.760 -c:v ffv1 -c:a copy 'thecodetest_part2_50fps_cut.mkv' mkvmerge -o thecodetest_part1_50fps_billgates_noaudio.mkv --no-audio thecodetest_part1_50fps_billgates.mkv ffmpeg -i 'thecodetest_part2_50fps_cut.mkv' -i 'thecodetest_part1_50fps_billgates_noaudio.mkv' -filter_complex blend=all_mode=normal:eof_action=pass -c:v ffv1 -c:a copy 'thecodetest_part2_50fps_cut_billgates_blended.mkv' ffmpeg -f concat -safe 0 -i concat.txt -vf setdar=dar=16/9 -r 50 -c:v ffv1 -c:a copy 'thecodetest_50fps_finished_cut.mkv' ffmpeg -i 'thecodetest_50fps_finished_cut.mkv' -c:v libx265 -crf 20 -preset slow -tune grain -profile:v main10 -c:a copy 'thecodetest_50fps_finished_cut_x265.mkv' *** This command was used to merge the rip with the subtitles: mkvmerge -o The.Code.Story.of.Linux.2001.DVDRip.50fps.HEVC.AC3-LiNUX.mkv The.Code.Story.of.Linux.2001.DVDRip.50fps.HEVC.AC3.mkv --language 0:eng Subs/eng.srt --language 0:swe Subs/swe.srt --language 0:ger Subs/ger.srt --language 0:chi Subs/chi.srt --language 0:ita Subs/ita.srt --language 0:pol Subs/pol.srt --language 0:por Subs/por.srt --language 0:rum Subs/rum.srt --language 0:rus Subs/rus.srt --language 0:spa Subs/spa.srt --language 0:tur Subs/tur.srt *** I thought that describing my method could serve as a guide for people attempting to edit, restore or preserve videos in a similar fashion. It also proves that the quality of my rip is about as good as it gets, considering that the source is a DVD. I hope you enjoy the documentary. Thanks for reading. PS: If anyone speaks Czech or French, feel free to finish the subtitles in Subs/unfinished, and upload the finished subtitle to opensubtitles.org or a similar site, so everyone can benefit!