Is there a way to export HDR video as SDR at export?

I know it’s possible to convert an HDR video to an edit friendly format. But is there a way, after i have made the edits (trim, crop etc) to the original HDR video, that i can export the trimmed/cropped video as SDR? Since the program knows how to convert to SDR, can it do it while exporting?

You can Convert the HDR video, open it the Source player when done, and use the Replace command in the Timeline clip context menu (or press R).

That much i know already. the only time i want conversion to take place is at export. Since the program can open and play the HDR video perfectly fine, from my understanding, all that’s needed is to convert to a different color space (from BT.2020 to BT.709). Can the export function not convert color space while exporting?

Yes, it can but not this particular kind conversion involving dynamic range.

It depends on HDR format. With HLG, you could just apply a 2020 to 709 Matrix and flag as BT.709. This video would work quite well.

You cannot do this today in Shotcut at the time of export. We do convert BT.2020 to BT.709 today upon decoding, but that uses libswscale, which is handling the color primaries and bit depth if needed. However, I do not understand what it is doing with transfer function in this case.

The HLG transfer function is designed to provide a usable image on a non-HDR display. The bottom section matches the 709 TF, the upper section compresses the highlights. In an HDR display, these are uncompressed, in an SDR display it has a similar effect to a camera knee.

Maybe a better explanation of the situation might help with coming up with a solution.
I want to trim (and retain) ~10 minutes of footage (spaced through out the video) from an MKV 4K HDR file that is ~2h30min long and 80Gb, the option to convert to an edit friendly format would obviously take waaaaay longer than converting 10 minutes of footage. I had even thought to trim the footage and export as HDR then converting it saving time and processing power but since shotcut can’t export HDR, that plan’s dead in the water.

Format : Matroska
Format version : Version 4
File size : 84.2 GiB
Duration : 2 h 27 min
Overall bit rate mode : Variable
Overall bit rate : 81.8 Mb/s
Encoded date : UTC 2021-11-29 07:28:32
Writing application : mkvmerge v63.0.0 (‘Everything’) 64-bit
Writing library : libebml v1.4.2 + libmatroska v1.6.4
Cover : Yes
Attachments : cover.jpg

Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 2 h 27 min
Bit rate : 77.9 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.392
Stream size : 80.2 GiB (95%)
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.2020
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 144 cd/m2
Original source medium : Blu-ray

Audio
ID : 2
ID in the original source medium : 4352 (0x1100)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Codec ID : A_DTS
Duration : 2 h 27 min
Bit rate mode : Variable
Bit rate : 3 873 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Stream size : 3.99 GiB (5%)
Title : DTS-HD MA 5.1
Language : English
Default : Yes
Forced : No
Original source medium : Blu-ray

Making a total guess here since I don’t have a file to test with currently…

What if you bring your 2h30m video into the Source viewer, set the In/Out points for a segment you want to keep with the “i” and “o” keyboard shortcuts, then do Properties > Extract sub-clip? It looks like this:

Extraction is not a Shotcut encoding. It is translated into an FFmpeg command that does a codec copy (no re-encoding, no loss) with start/stop points as defined by the in/out points.

What I don’t know is whether the extraction command will sufficiently preserve HDR metadata.

If it does, you can bring the extracted video files back into Shotcut and edit on them as if you were editing on the original file.

This topic was automatically closed after 90 days. New replies are no longer allowed.