Giter VIP home page Giter VIP logo

Comments (12)

quietvoid avatar quietvoid commented on June 12, 2024 1

For example: ffmpeg -map 0:v:0 -c copy -f null - -i BL+FEL+RPU.hevc gives number of frame 161618.

I'm not sure FFmpeg is accurate with this command line.
I have piped from a MakeMKV remux as well as demuxed the video, and the number of frames was always correct.

With your command, the number of frames is increased by 1.
FFmpeg also errored: [NULL @ 0x55660d526a40] missing picture in access unit with size 287

So both piping & demuxing with ffmpeg -i title_t00.mkv -c:v copy video.hevc resulted in frame=189716
While your command results in frame=189717, and is incorrect.

The RPU contains 189716 metadata frames, so that's correct.
And I can do dovi_tool info -i RPU.bin -f 189715, which is fine because the -f parameter starts at 0.
According to the video length, the correct number of frames is also 189716.

I still have to test demuxing into BL+EL and reinjecting, but I'm not really seeing any use case for this.

from dovi_tool.

Vortexar avatar Vortexar commented on June 12, 2024 1

The issue can be closed now. The problem is really in bad initial demux. Eac3to and MKVExtract break RPU data while demuxing, making it one frame less.
I reripped disc and demuxed with Ffmpeg - everything is ok

from dovi_tool.

quietvoid avatar quietvoid commented on June 12, 2024

Well the only other option is that the RPU has less "metadata" frames, or there's a bug with the HEVC parsing.
Can you reproduce it consistently? Would need a sample of the source at the very least, if encoding can be reproduced.

from dovi_tool.

ydajwz123 avatar ydajwz123 commented on June 12, 2024

I also encontered the same problem. I have tested two sources. Both behave similarly. (Use Makemkv latest version to make two layers MKV)
Note: As for source A, I also test a remux mkv from a famous group. The problem also remains.
The following is the procedure.
The command dovi_tool -c -m 2 extract-rpu BL+FEL+RPU.hevc produces the RPU.bin. Further, I check the number of frames with command dovi_tool info -i RPU.bin -f INDEX_OF_FRAME.
I found that the the number of frames from RPU is always one frame less than that of video file.
For example: ffmpeg -map 0:v:0 -c copy -f null - -i BL+FEL+RPU.hevc gives number of frame 161618.
dovi_tool info -i RPU.bin -f 161616 is OK.
dovi_tool info -i RPU.bin -f 161617 will result in panick:

Parsing RPU file...
thread 'main' panicked at 'assertion failed: f < rpus.len()', src\dovi\rpu_info.rs:23:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Although it is possible the source video is unreliable, I just talk about my experience for a reference.

from dovi_tool.

Vortexar avatar Vortexar commented on June 12, 2024

I also encontered the same problem. I have tested two sources. Both behave similarly. (Use Makemkv latest version to make two layers MKV)
Note: As for source A, I also test a remux mkv from a famous group. The problem also remains.
The following is the procedure.
The command dovi_tool -c -m 2 extract-rpu BL+FEL+RPU.hevc produces the RPU.bin. Further, I check the number of frames with command dovi_tool info -i RPU.bin -f INDEX_OF_FRAME.
I found that the the number of frames from RPU is always one frame less than that of video file.
For example: ffmpeg -map 0:v:0 -c copy -f null - -i BL+FEL+RPU.hevc gives number of frame 161618.
dovi_tool info -i RPU.bin -f 161616 is OK.
dovi_tool info -i RPU.bin -f 161617 will result in panick:

Parsing RPU file...
thread 'main' panicked at 'assertion failed: f < rpus.len()', src\dovi\rpu_info.rs:23:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Although it is possible the source video is unreliable, I just talk about my experience for a reference.

I checked my sources again and that is right - extracted RPU is always one frame less than that of video file.
And the problem definitely not in encode. If I extract RPU from source, demux source file to BL and EL-RPU, and then try to insert RPU back into the source BL file - I still get this error. Looks like the problem is in RPU parsing or injecting process.

from dovi_tool.

quietvoid avatar quietvoid commented on June 12, 2024

It's quite likely to be a one off problem, however it feels a little odd that you can use the RPU file with x265, which verifies the number of metadata frames against the frames encoded.
It wouldn't fail but it should be warning.

I'll try to reproduce with a full MakeMKV file, but it would be useful to test with the same title.

from dovi_tool.

Vortexar avatar Vortexar commented on June 12, 2024

It's quite likely to be a one off problem, however it feels a little odd that you can use the RPU file with x265, which verifies the number of metadata frames against the frames encoded.
It wouldn't fail but it should be warning.

I'll try to reproduce with a full MakeMKV file, but it would be useful to test with the same title.

The source file is 50GB big - would be not so easy to upload to some file hosting

from dovi_tool.

quietvoid avatar quietvoid commented on June 12, 2024

@Vortexar I'm not asking for the file itself, just the title. I can buy it myself.

from dovi_tool.

Vortexar avatar Vortexar commented on June 12, 2024

Aquaman (2018)

from dovi_tool.

quietvoid avatar quietvoid commented on June 12, 2024

I did a dovi_tool inject-rpu -i BL.hevc --rpu_in RPU.bin and it worked perfectly fine.

So I can't reproduce the issue here.

from dovi_tool.

ydajwz123 avatar ydajwz123 commented on June 12, 2024

For example: ffmpeg -map 0:v:0 -c copy -f null - -i BL+FEL+RPU.hevc gives number of frame 161618.

I'm not sure FFmpeg is accurate with this command line.
I have piped from a MakeMKV remux as well as demuxed the video, and the number of frames was always correct.

With your command, the number of frames is increased by 1.
FFmpeg also errored: [NULL @ 0x55660d526a40] missing picture in access unit with size 287

So both piping & demuxing with ffmpeg -i title_t00.mkv -c:v copy video.hevc resulted in frame=189716
While your command results in frame=189717, and is incorrect.

The RPU contains 189716 metadata frames, so that's correct.
And I can do dovi_tool info -i RPU.bin -f 189715, which is fine because the -f parameter starts at 0.
According to the video length, the correct number of frames is also 189716.

I still have to test demuxing into BL+EL and reinjecting, but I'm not really seeing any use case for this.

THANKS. I found the problem is related to the way I demux the BL+FEL+RPU.mkv. I previously use gMKVExtractGUI. Currently, I will turn to ffmpeg.
BTW, the counting of number of frames is actually correct, but the BL+FEL+RPU.hevc by gMKVExtractGUI seems corrupt so that dovi_tool cannont extract a correct RPU.

from dovi_tool.

quietvoid avatar quietvoid commented on June 12, 2024

I just got around to testing inject-rpu on a very quick Aquaman (2018) encode and it worked fine as well.

from dovi_tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.