flathub / com.makemkv.MakeMKV

https://flathub.org/apps/details/com.makemkv.MakeMKV
9 stars 20 forks source link

Using FLAC profile fails ripping #71

Open Perkolator opened 7 months ago

Perkolator commented 7 months ago

I just tried for the first time the FLAC profile for a DTS-HD Master Audio stereo track and the rip fails. When the ripping starts, the "analyzing seamless segments" of the title just stays there the whole time, no actual ripping happens. During the whole process MakeMKV starts gradually hogging RAM (analyzing seamless segments for a while, and then RAM usage grows about 3-5 GB.. this repeats the longer you allow it to run) and eventually, when all available RAM is used, the swap starts to fill up too. In my case the ripping process ends before all RAM and swap space is used (otherwise it probably would crash the system) and MakeMKV reports:

Failed to save title 1 to file /home/USER/RIP/movie_t02.mkv 0 titles saved, 1 failed Copy complete. 0 titles saved, 1 failed.

The last line appears in the log file.

16 GB RAM + about 10 GB of swap space is taken when the ripping process stops and MakeMKV doesn't release all that until the program is closed.

Tried to turn on the log, but there's nothing in the about 80,000 lines that would give any hint of why the process fails.

Ripping the title with the DTS-HD Master Audio stereo track with "default" profile works. Although, the rip informs this:

AV sync issue in stream 1 at 0:26:01.726 : audio changes from 16bps to 24bps, you won't be able to convert this track to any other format later, please use a conversion profile with audio transcoding AV sync issue in stream 1 at 0:58:47.565 : audio changes from 16bps to 24bps, you won't be able to convert this track to any other format later, please use a conversion profile with audio transcoding AV sync issue in stream 1 at 1:32:49.522 : audio changes from 16bps to 24bps, you won't be able to convert this track to any other format later, please use a conversion profile with audio transcoding

The audio drops out for a second on those points when playing the ripped DTS-HD MA track. The disc obviously has an authoring problem. I have already confirmed that the actual audio in that track is not faulty, it's the "encoding"/metadata/or something similar, don't know the technical stuff (I used ffmpeg to convert the ripped .dts track to .flac and it plays fine). I don't know how true that "you won't be able to convert this track to any other format later" statement is, but I wanted to try to rip straight to FLAC with MakeMKV.

I tried the FLAC profile with another title that doesn't have any problems listed when ripping with the "default" profile and the same problem happens.

I then tried with MakeMKV installed in Windows 10 (in VirtualBox) and ripping with FLAC profile worked just fine, no problems at all!

I did all tests from a disc backup (encryption removed) made with MakeMKV. The backup process didn't give any errors.

Very hard to find any similar problems from the net about this, there's this one from 2015 that mentions "if attempt to use the FLAC profile to convert the lossless audio into FLAC the program crashes once it begins “analyzing seamless segments”". That user is not using Flatpak though. In the 10th message of that topic, the user mentions what might have fixed the problem:

... I’m not sure what the difference was from running these steps, maybe the libffmpeg-devel package which I don’t think was installed was the difference

I vaguely remember seeing somebody mention at some website, maybe in the MakeMKV forum, that only the Windows installer installs MakeMKV's own ffmpeg.

So, maybe the problem is that Flatpak MakeMKV can't access ffmpeg?

I tried to install runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/23.08 Flatpak (I believe the 23.08 branch is the same as Flatpak MakeMKV is currently using) and did the rip with FLAC profile again, but it fails the same way.

Anyone willing to test FLAC profile ripping with their Flatpak MakeMKV?

Perkolator commented 7 months ago

I just compared the FLAC "audio fingerprints" (md5 hashes of the audio itself) of the FLAC track created by MakeMKV and the FLAC track created with ffmpeg from the MakeMKV ripped DTS-HD Master Audio track, and they are different.

Muxed the ffmpeg created FLAC to the movie MKV file and playing that track in VLC, I think I see a very very small sync difference in the audio (checked at the end of the movie, just before where the last error was (it's the last spoken line)). I'm not 100% sure about this, but to me it looks/sounds like the audio/video sync is not the same as in the FLAC track in the MKV file that MakeMKV created.

So it seems that ripping the FLAC track with MakeMKV is preferable.

EDIT: One can compare the FLAC "audio fingerprints" like this:

metaflac --show-md5sum "input.flac" OR ffmpeg -i "input.flac" -map 0:a -f md5 - 2>/dev/null

Perkolator commented 5 months ago

Tried again with the new 1.17.6 version. Doesn't work. Has anyone tested ripping with FLAC profile?

lxs602 commented 2 days ago

Same error on Linux with version MakeMKV v1.17.7 [linux(x64-release)] (not flatpak). Ripping bluray works with default profile, but fails with FLAC.

Perkolator commented 2 days ago

Thanks @lxs602 for your input on the matter. It then seems that this is not a Flatpak problem. And thus this issue/report is in wrong place. It is a MakeMKV (linux package) problem then?

lxs602 commented 17 hours ago

Tried installing makemkv flatpak version but same error. I hadn't noticed this was the repository for flathub, not for Makemkv; the place to report MakeMkv bugs is on the MakeMkv forum.

This thread suggests the problem may be with ffmpeg. You could try installing an older version of ffmpeg and building makemkv against that. I'm not sure how to enable ffmpeg logging with makemkv.