Jellyfin Forum
Convert Dolby Vision to MKV - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: Convert Dolby Vision to MKV (/t-convert-dolby-vision-to-mkv)

Pages: 1 2 3


RE: Convert Dolby Vision to MKV - TheDreadPirate - 2023-08-08

Handbrake doesn't have a "copy" function.

I think this can be achieved with ffmpeg.

Quote:ffmpeg -i my_movie.mkv -c:v copy -c:a copy -c:s copy my_movie.mp4



RE: Convert Dolby Vision to MKV - bitmap - 2023-08-28

(2023-08-08, 10:17 PM)TheDreadPirate Wrote: Handbrake doesn't have a "copy" function.

I think this can be achieved with ffmpeg.

Quote:ffmpeg -i my_movie.mkv -c:v copy -c:a copy -c:s copy my_movie.mp4

I know this is old...but...

Code:
ffmpeg -i my_movie.mkv -map 0 -c copy my_movie.mp4

Use the -map option to map everything from the input file, otherwise you only get the first matching stream. So the codec declaration will only convert/copy the first matching stream that matches whatever you've said to convert or copy. One video, one audio, one subtitle. Some things aren't automatically mapped (certain metadata, attachments). The -map 0 option will pull over everything from that file. The -c copy just says that everything is a straight copy. If you have anything out of spec in the original file, it may throw errors.


RE: Convert Dolby Vision to MKV - alan - 2023-08-28

Quick try:
[mp4 @ 000002a126b00d80] track 1: codec frame size is not set
[mp4 @ 000002a126b00d80] track 2: codec frame size is not set
[mp4 @ 000002a126b00d80] Could not find tag for codec subrip in stream #3, codec not currently supported in container
[out#0/mp4 @ 000002a125004ec0] Could not write header (incorrect codec parameters ?): Invalid argument
Error opening output file my_movie.mp4.
Error opening output files: Invalid argument

Using ffmpeg from JF. ffmpeg version N-111510-gbe7ac511a6-20230719.

I'm sure ffmpeg can do it but just not getting 'there' yet. I'll dig further tommorrow.


RE: Convert Dolby Vision to MKV - nyanmisaka - 2023-08-28

Make sure you are really using Jellyfin-FFmpeg. It should has a banner like this [ffmpeg version x.y.z-Jellyfin]

Run this command to remux the DoVi Profile 5 video from MKV container to MP4 container.

Code:
ffmpeg -y -strict -2 -i "profile5.MKV" -map 0:v:0 -map 0:a -sn -c:v copy -tag:v dvh1 -c:a copy "profile5.MP4"



RE: Convert Dolby Vision to MKV - fabwal - 2023-08-29

I think this problem is related to the LG WebOS App.

I have tried converting DV Profile 5 MKVs to MP4s as well but it is always the same:
The LG TV always does direct playback instead of transcoding (Jellyfin has, as far as I know, no possibility of "force-transcoding"; I have tried Limit Bandwidth without success).
In a Browser on PC it works fine, iOS App works fine as well.

Maybe this is related as well:
https://github.com/jellyfin/jellyfin-webos/issues/159


RE: Convert Dolby Vision to MKV - bitmap - 2023-08-29

Uh...the idea is to get direct playback and avoid transcoding. Getting profile 5 DV into an MP4 container with the ffmpeg command nyanmisaka (not tagged purposely) posted allows a webOS LG TV to direct play a profile 5 DV file which is otherwise not possible at the moment as far as I know.


RE: Convert Dolby Vision to MKV - fabwal - 2023-08-29

I have tried the command from nyanmisaka without success. Still green and purple overlay.

Original:

Video test.mkv
Titel: 4K HEVC HDR
Codec: HEVC
Profil: Main 10
Level: 150
Auflösung: 3840x1580
Seitenverhältnis: 192:79
Zeilensprungverfahren: No
Bildrate: 23.976025
Bitrate: 14964 kbps
Bit-Tiefe: 10 bit
Videobereich: HDR
Video range type: DOVI
DV title: DV Profile 5
DV version major: 1
DV version minor: 0
DV profile: 5
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 0
DV bl preset flag: 1
DV bl signal compatibility id: 0
Pixelformat: yuv420p10le
Referenz-Frames: 1

Converted MP4:

Video test.mp4
Titel: 4K HEVC HDR
Codec: HEVC
Codec-Tag: dvh1
Profil: Main 10
Level: 150
Auflösung: 3840x1580
Seitenverhältnis: 192:79
Zeilensprungverfahren: No
Bildrate: 23.976025
Bitrate: 14578 kbps
Bit-Tiefe: 10 bit
Videobereich: HDR
Video range type: DOVI
Pixelformat: yuv420p10le
Referenz-Frames: 1

I am still convinced that LGs cannot play DV from Containers (then why not transcode?) or am I missing something here?


RE: Convert Dolby Vision to MKV - bitmap - 2023-08-29

I have a large volume of 4K media with Dolby Vision in various profiles. I also run an LG C1 and don't have a ton of issues, but have experienced these problems in the past. My least success comes from Profile 5, unless it's in an MP4 container. What does the playback data say when you get the tinted colors? Do you get enough granularity to see what profile the metadata alleges?


RE: Convert Dolby Vision to MKV - fabwal - 2023-09-02

After a journey trough various iterations of using tools I finally found a solution based on the thread here:
https://forum.doom9.org/showthread.php?t=183479&page=1

The tools are awesome, I personally only needed (as bitmap posted correctly) the MKV to MP4 conversion.
Although I am not an ffmpeg expert I needed to modify the call from nyanmisaka a bit as it was not working.

What did work for me is this:
sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -y -strict -2 -i input.mkv -map 0:v? -map 0:a? -map 0:s? -dn -map_chapters -1 -c:v copy -c:a copy -c:s mov_text -strict -2 output.mp4

Now I finally can enjoy Profile 5 DV content without the green and purple tinting Smiling-face


RE: Convert Dolby Vision to MKV - alan - 2023-09-02

This code above worked for me too (Win 10)

ffmpeg -y -strict -2 -i input.mkv -map 0:v? -map 0:a? -map 0:s? -dn -map_chapters -1 -c:v copy -c:a copy -c:s mov_text -strict -2 output.mp4

used ffmpeg from JF and checked via USB on an LG G3. Interestingly VLC still exhibited DV 'green' properties.