Closed andrasmaroy closed 10 months ago
Could you try either disabling the additional audio tracks or only removing them from the movie ? You can update the flags using MP4Box -add src:tkhd=enable
(see MP4Box -h tkhd
)
Yes, if I completely remove the audio tracks, or only have 1, then DV works correctly. My point is that I'd like to maintain multiple audio tracks along with DV.
I mean not removing the track, but deactivating them - some UIs still allow track selection on tracks not enabled or not in movie
Ah, understood, I'll try it and get back with the results.
I've tried with the following command, but it is behaving exactly the same.
MP4Box -new -add movie.rpu.hevc -add 0.hun.0.eac3:tkhd=enable -lang 2=hun -name 2=Hungarian -delay 2=0 -add 1.eng.0.eac3:tkhd=enable -lang 3=eng -name 3=English -delay 3=0 -brand mp42 -ab isom -ab dby1 --force_dv movie.mp4
I've tried both tkhd=enable
and tkhd=-enable
but it made no difference.
I've tried both tkhd=enable and tkhd=-enable but it made no difference.
can you try using tkhd=enable,movie
for first track and tkhd=enable
(or tkhd=-enable
) for second ?
Tried with 0.hun.0.eac3:tkhd=enable,movie
and 1.eng.0.eac3:tkhd=enable
, but still the same. Both track show up in the selector the same and just like originally the hungarian track (as it is the first) plays with Dolby Vision, english track plays as HDR.
I'm not sure if it is any help, but I'm using Jellyfin to play the track back, version 10.8.11.
could you try another player ? I doubt the issue comes from gpac here...
You are correct, playing back the same file from a pendrive with the built in player works correctly. I'll raise this issue with Jellyfin instead.
I'm sorry for not checking this before, thank you for the assistance!
Just to confirm in case anyone looks at this in the future: the issue was Jellyfin wrongly reporting no support for multiple audio tracks, forcing the server to transcode the file when selecting the non-default audio track.
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
Detailed guidelines: http://gpac.io/bug-reporting/
I'm struggling with muxing dolby vision mkv's into mp4. Usual suspect is an LG tv (B9).
What I'v ran into is that for files that have multiple audio tracks the tv will only recognize dolby vision when playing with the first audio track for other tracks it falls back to HDR10. I'm completely puzzled by this as I don't see how the audio tracks relate to dolby vision. This behaviour is regardless of which track is actually used, if I add the audio streams in reversed order then still the first audio stream works correclty (originally last).
This issue doesn't seem to be specific to one file, all sources I tried (though limited, only 4 files) behaved the same. If I drop the second audio track then the file plays correctly, again regardless of which track is left.
I went through all the issues I found about dolby vision here and tried the varios options from there to avail.
The process I followed:
ffmpeg -y -i /media/movie.mkv -map 0:1 -c:a:0 copy /media/audio_streams/Hungarian/0.hun.0.eac3 -map 0:2 -c:a:0 copy /media/audio_streams/English/1.eng.0.eac3 -map 0:0 -c:v:0 copy -bsf:v hevc_mp4toannexb /media/movie.hevc
dovi_tool -c -m 2 extract-rpu /media/movie.hevc -o /media/movie.rpu.bin
ffmpeg -y -hwaccel qsv -i /media/movie.hevc -map 0:0 -c:0 hevc_qsv -qp 25 -preset fast -pix_fmt + -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:range=limited:transfer=smpte2084:colormatrix=bt2020nc:range=limited:master-display='G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,0)':dolby-vision-profile=8.1:dolby-vision-rpu='/media/movie.rpu.bin' -vf scale_qsv=w=1920:h=1080 /media/movie-1080p.hevc
dovi_tool inject-rpu -i /media/movie-1080p.hevc --rpu-in /media/movie.rpu.bin -o /media/movie.rpu.hevc
MP4Box -new -add /media/movie.rpu.hevc:dvp=f8.1.hdr10 -add /media/audio_streams/Hungarian/0.hun.0.eac3 -lang 2=hun -name 2=Hungarian -delay 2=0 -add /media/audio_streams/English/1.eng.0.eac3 -lang 3=eng -name 3=English -delay 3=0 -brand mp42 -ab isom -ab dby1 --force_dv /media/movie.mp4
Altough I'm resizing the streams, it doesn't seem be the cause of this, if I skip that step the behaviour is still the same.
I'm using the following versions: