Difficulty encoding POTC 1&2 from BR rips

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
rotational
Posts: 2
Joined: Sat May 05, 2018 4:30 pm

Difficulty encoding POTC 1&2 from BR rips

Post by rotational »

I'm slowly working through digitizing my library and have stumbled onto a problem with Pirates of the Caribbean 1 and 2, but seemingly not 3. These are the "standard" Region A releases.

Here's the setup:

Rip: MakeMKV 1.12.2 on Win10 x64 (problem also occurred with 1.12.0)
Encode: Handbrake 1.1.0 on Debian x64 (also occurred with 1.0.7).

POTC 1/2/3 - MPEG4 with LPCM 24bit 48KHz audio. Encoding to HEVC and 24-bit FLAC.

Briefly my results:

POTC 1 - final HEVC file appears intact w/metadata, but there is no audio playback at all
POTC 2 - final HEVC file appears intact w/metadata, but there are frequent skips/gaps in audio playback
POTC 3 - final HEVC file appears intact w/metadata, so far I have not found any audio defects

Playback was tested with the latest builds of VLC and MPC-HC, identical results. Neither player produces any kind of warnings or errors, so it does not appear to be an issue with decoding the HEVC file.

Long version:

I ripped and encoded these as a batch using the same workflow I've done for 150+ already in my library. In this case, PCM is the only lossless track available and needs to be converted to FLAC for downstream compatibility reasons. I have used FLAC for titles with PCM audio plenty of times before without issue.

Since POTC 3 passed a spot check, I purged the original source rips/logs before becoming aware of the problem, so since then I've been focusing just on POTC 1. I've re-ripped it multiple times, with identical results - no MakeMKV errors and identical output files. No errors or warnings in the MakeMKV debug log. The original ripped MKV appears perfectly normal and plays back with audio throughout. Likewise, Handbrake performs the encode with no errors or other unusual output except for the following when beginning the job:

Code: Select all

[14:17:29] scan: decoding previews for title 1
[14:17:29] scan: audio 0x1: pcm_s24le, rate=48000Hz, bitrate=6912000 English (pcm_s24le) (5.1 ch)
Scanning title 1 of 1, preview 6, 60.00 %[14:17:34] scan: could not get a decoded picture
Scanning title 1 of 1, preview 9, 90.00 %[14:17:36] scan: could not get a decoded picture
Scanning title 1 of 1, preview 10, 100.00 %[14:17:37] scan: 8 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/4, aspect 16:9, PAR 1:1
After re-ripping the disc a few times, I noticed that the two warnings above always occur at preview 6 and 9.

I haven't had a need to carefully watch all of my encode logs as this is the first real problem I've had, but I'm pretty sure I haven't seen this message before. Some brief searching found a few hits referencing running Handbrake against encrypted DVDs, but nothing specific to what I'm seeing. The issue would appear to be with the source media; I do all this with scripts, and the same script that produced the defective POTC 1 HEVC also produced the intact POTC 3 HEVC.

I'm just at a loss as to what the problem is, since there are no MakeMKV warnings and the source file appears perfect, unless it's Cinavia...but my neanderthal understanding was that Cinavia was only a concern if I was creating an "actual" Blu-Ray Disc and playing back with an actual player or software like Powerdvd/etc. I also have at least two other Cinavia-protected titles (Inglourious Basterds, Looper) that I had no trouble with. The physical disks are in excellent condition and clean with no apparent defects.

I'm not sure what to look for next! Is this copy protection, a MakeMKV error/decryption problem, bad metadata, a Handbrake error?

Thanks!

ps -

Handbrake job final output - no errors:

Code: Select all

[11:09:04] pcm_s24le-decoder done: 257847 frames, 0 decoder errors
[11:09:04] h264-decoder done: 206071 frames, 0 decoder errors
[11:09:04] sync: got 206071 frames, 206071 expected
[11:09:04] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x265 [info]: frame I:   2574, Avg QP:22.57  kb/s: 13532.84
x265 [info]: frame P:  49897, Avg QP:23.23  kb/s: 7036.89
x265 [info]: frame B: 153600, Avg QP:23.29  kb/s: 5555.61
x265 [info]: Weighted P-Frames: Y:5.9% UV:4.0%
x265 [info]: consecutive B-frames: 7.9% 5.0% 14.5% 31.8% 40.9%

encoded 206071 frames in 10108.39s (20.39 fps), 6013.92 kb/s, Avg QP:23.27
[11:09:04] mux: track 0, 206071 frames, 6461940781 bytes, 6014.63 kbps, fifo 102                                                                                                                               4
[11:09:04] mux: track 1, 89531 frames, 1527079130 bytes, 1421.37 kbps, fifo 512
[11:09:04] mux: track 2, 3851 frames, 24604038 bytes, 22.90 kbps, fifo 32
[11:09:04] libhb: work result = 0

Encode done!

HandBrake has exited.
MediaInfo from the ripped source file:

Code: Select all

General 
Unique ID : 181386109479906251148306218139020131357 (0x8875B1A84D2764958FB423B796C37C1D) 
Complete name : \\blah\scratch\rip-input\title00.mkv 
Format : Matroska 
Format version : Version 2 
File size : 27.0 GiB 
Duration : 2 h 23 min 
Overall bit rate : 27.0 Mb/s 
Encoded date : UTC 2018-05-05 16:36:01 
Writing application : MakeMKV v1.12.2 win(x64-release) 
Writing library : libmakemkv v1.12.2 (1.3.5/1.4.7) win(x64-release) 

Video 
ID : 1 
ID in the original source medium : 4113 (0x1011) 
Format : AVC 
Format/Info : Advanced Video Codec 
Format profile : High@L4.1 
Format settings : CABAC / 3 Ref Frames 
Format settings, CABAC : Yes 
Format settings, RefFrames : 3 frames 
Format settings, GOP : M=3, N=24 
Codec ID : V_MPEG4/ISO/AVC 
Duration : 2 h 23 min 
Bit rate : 20.1 Mb/s 
Width : 1 920 pixels 
Height : 1 080 pixels 
Display aspect ratio : 16:9 
Frame rate mode : Constant 
Frame rate : 23.976 (24000/1001) FPS 
Color space : YUV 
Chroma subsampling : 4:2:0 
Bit depth : 8 bits 
Scan type : Progressive 
Bits/(Pixel*Frame) : 0.403 
Stream size : 20.1 GiB (74%) 
Language : English 
Default : No 
Forced : No 
Original source medium : Blu-ray 

Audio 
ID : 2 
ID in the original source medium : 4352 (0x1100) 
Format : PCM 
Format settings : Little / Signed 
Codec ID : A_MS/ACM / 00000001-0000-0010-8000-00AA00389B71 
Duration : 2 h 23 min 
Bit rate mode : Constant 
Bit rate : 6 912 kb/s / 6 912 kb/s 
Channel(s) : 6 channels 
Channel positions : Front: L C R, Side: L R, LFE 
Sampling rate : 48.0 kHz 
Frame rate : 30.000 FPS (1600 SPF) 
Bit depth : 24 bits 
Stream size : 6.92 GiB (26%) 
Title : Surround 5.1 
Language : English 
Default : Yes 
Forced : No 
Original source medium : Blu-ray 

Text 
ID : 3 
ID in the original source medium : 4608 (0x1200) 
Format : PGS 
Codec ID : S_HDMV/PGS 
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs 
Duration : 2 h 12 min 
Bit rate : 24.7 kb/s 
Count of elements : 3851 
Stream size : 23.5 MiB (0%) 
Language : English 
Default : No 
Forced : No 
Original source medium : Blu-ray 

Menu 
00:00:00.000 : en:Chapter 01 
00:08:51.280 : en:Chapter 02 
00:16:05.547 : en:Chapter 03 
00:27:16.343 : en:Chapter 04 
00:35:59.323 : en:Chapter 05 
00:41:02.960 : en:Chapter 06 
00:48:19.938 : en:Chapter 07 
00:54:01.279 : en:Chapter 08 
01:04:05.675 : en:Chapter 09 
01:15:56.802 : en:Chapter 10 
01:21:21.418 : en:Chapter 11 
01:35:00.152 : en:Chapter 12 
01:40:00.744 : en:Chapter 13 
01:48:15.614 : en:Chapter 14 
02:02:02.189 : en:Chapter 15 
02:13:09.648 : en:Chapter 16
rotational
Posts: 2
Joined: Sat May 05, 2018 4:30 pm

Re: Difficulty encoding POTC 1&2 from BR rips

Post by rotational »

I've managed to work around this problem using a few of the techniques suggested in the PCM to FLAC sticky:

1. Audio track converted to FLAC and remuxed to original BR rip MKV via FFMPEG
2. mkclean utility run on ffmpeg result file

The mkclean result file was run through Handbrake for HEVC encode with FLAC audio passthrough, and everything came out great.

I tried just mkclean first on the BR rip with PCM but it made no difference, still no audio after encode. I don't know if it made a difference with the FFMPEG workflow but it didn't hurt.

Not sure what's special/different about these particular titles, but it's not a terribly painful workaround.
Post Reply