Issues with creating OV and VF from Blu-ray

Anything and everything to do with DCP-o-matic.
FriesischScott
Posts: 2
Joined: Fri Sep 24, 2021 11:57 pm

Issues with creating OV and VF from Blu-ray

Post by FriesischScott »

Hi there,

I am currently trying to create an OV (EN) and German VF DCP based on a Blu-ray rip and I am encountering several issues. If at all relevant, the Blu-ray in question is Star Wars Episode I. I ripped the Blu-ray with MakeMKV and proceeded from there.

I thought the workflow should as follows:
  • Create OV using Video, English Audio (DTS-ES) and English forced subtitles
  • Create VF by referencing the OV and using German Audio (DTS HD-MA) and German forced subtitles
This is where the problems start.

Loading the (full) MKV and creating the OV works flawlessly. It takes a few seconds to parse the video file on load and perfectly detects frame rate, length etc. However, when I demultiplex the video file into individual video and audio stream using eac3to first (.h264, .dts, .dtsma, .sub) and only load the required tracks into dcp-o-matic it takes ~40 minutes (2.14.55) or ~10 minutes (2.15.160) to parse the tracks and will then become unresponsive and crash with the following logs:

Code: Select all

Sat 25 Sep 2021 02:16:47 AM CEST: Sub-job Computing digest starting
Sat 25 Sep 2021 02:16:47 AM CEST: FFmpeg: [h264 @ 0x7f15800058c0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Sat 25 Sep 2021 02:16:47 AM CEST: Sub-job Finding length starting
Sat 25 Sep 2021 02:24:38 AM CEST: FFmpeg: Invalid return value 0 for stream protocol
Sat 25 Sep 2021 02:24:38 AM CEST: FFmpeg: Invalid return value 0 for stream protocol
Sat 25 Sep 2021 02:24:38 AM CEST: FFmpeg: Invalid return value 0 for stream protocol
Sat 25 Sep 2021 02:24:38 AM CEST: Temporal reference was B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2
Sat 25 Sep 2021 02:24:38 AM CEST: Video length obtained from header as 1 frames
Sat 25 Sep 2021 02:24:39 AM CEST: FFmpeg: [dts @ 0x564b63fb9dc0] Estimating duration from bitrate, this may be inaccurate
Sat 25 Sep 2021 02:24:39 AM CEST: FFmpeg: [h264 @ 0x564b62e931c0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Sat 25 Sep 2021 02:25:37 AM CEST: FFmpeg: Invalid return value 0 for stream protocol
Sat 25 Sep 2021 02:25:37 AM CEST: FFmpeg: Invalid return value 0 for stream protocol
Sat 25 Sep 2021 02:25:37 AM CEST: FFmpeg: Invalid return value 0 for stream protocol

Code: Select all

ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[h264 @ 0x5563be3bff00] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from '/media/jasper/SSD/Videowork/The Phantom Menace_t01 - 1 - h264, English, 1080p24.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1200k tbn, 47.95 tbc
The DTS-ES track loads sucessfully, while the DTS-HD Master Audio tracks fails with the error

Code: Select all

Error: Programming error at ../src/lib/ffmpeg_examiner.cc:84
and no log entry. Loading a regular DTS track works but reports an incorrect length (2:13:39:07 instead of the 02:16:02:18 it reports for the video).

While using the MKV to create the OV works flawlessly, creating the VF seems to be impossible. The closest I get is to use mkvtoolnix to create an mka containing only the DTS-HD Master Audio in German and the subtitles I want. I can load them into dcp-o-matic without problem (which is weird, because the audio track on its own won't load) but I can not reference the original DCP as an OV because of Cannot reference this DCP's audio: its reel lengths differ from those in the film; set the reel mode to 'split by video content' although all tracks origin from the same Blu-ray rip. The DCP will report a full length in video frames and audio samples of 195906 (content rate in the OV) and 391812000 in both content rate and DCP rate, while the mka file reports 196102 (DCP rate in the OV) and 392204272.

Since the original video is in 23.976 I tried using eac3to to manually stretch the audio to 24 fps but it doesn't seem to change anything.

I'd really appreciated any help in figuring this out and hope this wasn't too confusing. I encountered lots of different problems and tried to gather them in one post as best as possible.

Jasper
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: Issues with creating OV and VF from Blu-ray

Post by Carsten »

Hmm. Don't know about the specific issues you have with the demultiplexed streams.

There is indeed no straight workflow to create OV+VFs from typical Bluray/DVD sources. This is not a specific DCP-o-matic OV/VF weakness, but the problem is how the source material is typically wrapped in media RIPs and how to integrate them into an OV+VF project.

If I remember right, what I usually do (because dealing with demultiplexed subtitles streams is often tedious), is, I first create full OV versions for all languages, and then reuse the DCP assets for creating the VFs. That way, no MKV demultiplexing is needed. If all OVs are using the same video stream, conversion goes quickly, as video will not have to be recompressed. As forced subtitles are usually only a few, it is no problem to create them as PNG subtitles - it should then be able to reuse these PNG subtitles in an OV or VF as well.


Sometimes I load the MKV into Audacity (with FFMPEG plugin installed). This will allow you to extract specific audio tracks and save multichannel audio files per language. Another way to have separate audio instead of demultiplexing.
carl
Site Admin
Posts: 2548
Joined: Thu Nov 14, 2013 2:53 pm

Re: Issues with creating OV and VF from Blu-ray

Post by carl »

Unless I'm missing something you might be able to make your VF by doing something like

1. add the OV to a project and tick "Use this dcp's video as OV and make VF"
2. add the MKV to the project, go to "Advanced content settings" and tick "Ignore this content's video and use only audio, subtitles and closed captions"
3. set up the audio/subs you want and make VF.

Though I'm not sure if the 23.976 -> 24fps conversion that will happen with the OV DCP might confuse things.

We can look at your problems loading demultiplexed streams; the detection of such things can be a bit unreliable. If you're able to send me any example .h264 / .dts / .dtsma / .sub files that cause problems when loaded into DoM I can take a look at some point: carl@dcpomatic.com
FriesischScott
Posts: 2
Joined: Fri Sep 24, 2021 11:57 pm

Re: Issues with creating OV and VF from Blu-ray

Post by FriesischScott »

carl wrote: Sun Sep 26, 2021 8:23 pm 2. add the MKV to the project, go to "Advanced content settings" and tick "Ignore this content's video and use only audio, subtitles and closed captions"
Thank's a lot! I did not know that options exists and it seems to work flawlessly. I created an OV and VF and everything seems to be in order, video, audio and subtitles.

I'll have a look at sending you some example demultiplexed files just in case.
chrusli
Posts: 22
Joined: Sun Jul 17, 2022 12:32 pm

Re: Issues with creating OV and VF from Blu-ray

Post by chrusli »

carl wrote: Sun Sep 26, 2021 8:23 pm 1. add the OV to a project and tick “Use this dcp's video as OV and make VF”
2. add the MKV to the project, go to “Advanced content settings” and tick “Ignore this content's video and use only audio, subtitles and closed captions”
3. set up the audio/subs you want and make VF.
Hi Carl

I have a mkv from a Blu-ray rip which I did with MakeMKV. As I usually do, I create the OV without any subtitles. Then I typically try to find good SRT subtitles and create a VF which uses the video and the audio from the OV. This works in almost every case. Sometimes, though, the SRTs are timed differently or have a bad quality. Then I typically create another OV with the original Blu-ray subtitles, which I use as open subtitles (without burning them). This comes obviously with ending up with two OVs which takes up double the space. I want to avoid that.

In the manual it says:
“The advantage of separate subtitles is that the same video content can be used for DCPs in many different languages. This means that only a small text file needs to be changed for each target language, rather than a large video file. It also means that the time-consuming video encoding need only be done once for the project rather than once for every language.”

This gave me hope that I could always use the original Blu-ray subtitles, but still had the advantage of creating VFs based on the OV and safe the space.

I assumed, this also applies to subtitles that come from the Blu-ray, but I had a hard time understanding how that would work. Because when I create a new DCP Project for the VF, add the OV DCP without subtitles, I can't access the Blu-ray subtitles. In this post, you mentioned that you could in addition to the OV DCP add the MKV and ignore the video stream, but instead use the OV video, which is already an improvement. But then I have the audio that appears to be double, one from the OV DCP and one from the MKV.

Am I missing something, or is there no other way to create a VF DCP based on the OV DCP, use the original video AND audio from the OV, and then just add the subtitles from the Blu-ray as open subtitles?
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: Issues with creating OV and VF from Blu-ray

Post by Carsten »

Should be possible - although Bluray subtitles are usually raster images, and DCP-o-matic can not convert them to timed text. But DCP-o-matic can add them as PNG subtitles. The trouble, as far as I see, is that currently you can not load these subtitles from the RIP MKV separately to add them to a VF.

I have some ideas about how to solve this, also, the method that Carl explains above should work, but I have to try it myself first.
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: Issues with creating OV and VF from Blu-ray

Post by Carsten »

Well, I did have some issues arranging the content, but, probably only because I wanted to get a quick result and thus trimmed my content down to a few minutes.

But it works. I created a VF using an OV DCP, and using the bitmap subtitles from an MKV (that was previously used to generate the OV). These were added to the VF as timed PNGs by DCP-o-matic - not by burning in (which would be impossible as a video referencing VF anyway).

Whatever - reusing/referencing video and/or audio from an OV, and adding PNG subtitles-only from a Bluray MKV does work, as Carl explained above. Just add your OV DCP, set referencing options, add MKV, right click it and choose ''Advanced settings' and ''Ignore this contents video and use only audio, subtitles and closed captions'. Depending on what you want to do in the VF, you may also need to deselect the MKVs audio in the audio matrix. Or you deselect the OV audio and create VF with different language audio AND subtitles in one go.

I wouldn't call it intuitive to use these advanced settings to arrive at what you want, but it does work.
chrusli
Posts: 22
Joined: Sun Jul 17, 2022 12:32 pm

Re: Issues with creating OV and VF from Blu-ray

Post by chrusli »

Thank you, I appreciate your effort. I think this solution is what I'm going to use and fits exactly my use case. I agree that it is not super intuitive if you don't know about it. But now I know 😄.

Update: It worked exactly as you explained. In my case, for the VF I deselect the audio from the MKV and use the audio from the OV DCP. The VF is ~50 MB. Perfect!