Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame rate change, dvhe removal #14

Open
cwills75 opened this issue Aug 8, 2022 · 9 comments
Open

Frame rate change, dvhe removal #14

cwills75 opened this issue Aug 8, 2022 · 9 comments

Comments

@cwills75
Copy link

cwills75 commented Aug 8, 2022

Hi, I tried running this on Ubuntu 20.04, and it converted the .mkv -> .mp4, but looking at both of them with Mediainfo, it removed the dvhe 8.07 information and changed the frame rate from 23.976 to 25, along with the duration.

mediainfo

@gacopl
Copy link
Owner

gacopl commented Aug 8, 2022 via email

@cwills75
Copy link
Author

cwills75 commented Aug 8, 2022

It's a new install I just did to test this out. I think I followed everything correctly. Where would a log file be? I re-ran it in a new folder and here is the output, along with MP4Box -version info:

log

@gacopl
Copy link
Owner

gacopl commented Aug 9, 2022 via email

@cwills75
Copy link
Author

cwills75 commented Aug 9, 2022

Sure, it's 4.4.2.0. Let me know if I should try anything else. Here's my normal process I use for a profile 7/8 file. I ran this yesterday, and it converted fine with 23.976 frame rate. I do a Handbrake step to compress the video down, but leave audio/subs as-is, keeping the tracks I want.

  1. Use ffmpeg and dovi tool to extract the RPU and convert it to Dolby Vision Profile 8.1.

ffmpeg -i input.mkv -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool -m 2 extract-rpu - -o RPU.bin

  1. Encode original DV file in Handbrake, rename output file to cooked.mkv.

  2. Use gMKVExtractGUI to extract the hevc video track (rename to cooked.hevc), audio tracks, subtitles and chapters from encoded.mkv.

  3. Use dovi tool to inject the RPU from step 2 into the encoded .hevc file

dovi_tool inject-rpu -i cooked.hevc --rpu-in RPU.bin -o injected.hevc

  1. Use MKVToolnix multiplexer to mux the new MKV with the injected.hevc, audio, sub and chapter files.

ffmpeg

Mediainfo comparison on OG file and one with above process:

compare_1

@gacopl
Copy link
Owner

gacopl commented Aug 9, 2022 via email

@cwills75
Copy link
Author

cwills75 commented Aug 9, 2022

I sent you an email with a link to the zipped files. pw: gacopl

Let me know if you didn't get it.

@SibrenVasse
Copy link

Had the same issue with a file. Specifying the FPS when muxing fixed the issue. See 7df1e98.

@gacopl
Copy link
Owner

gacopl commented Jun 1, 2023

Great that's exactly what i meant i suggest you make a switch for it as if i know life properly as many releases this might help there is same or equal number of releases that will be borked by this fps switch. And testing this is cumbersome.

Happy to accept PR :)

@JustasBud
Copy link

Had the same issue with a file. Specifying the FPS when muxing fixed the issue. See 7df1e98.

Thanks @SibrenVasse - had the same issue of it incorrectly guessing fps to 25. The issue was fixed by using your solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants