Program description
Cine Encoder is an application, uses the FFmpeg, MKVToolNix and MediaInfo utilities, that allows to convert media files while preserving HDR metadata. Supported hardware encoding NVENC for codecs H265, H264 and Intel QSV (for Windows and experimental for Linux) for codecs H264, MPEG-2. The following encoding modes are implemented: H265, H264, VP9, MPEG-2, XDCAM, DNxHR, ProRes. The program can also be used to change the HDR metadata, such as Master Display, maxLum, minLum, and other parameters.
Download
https://github.com/CineEncoder/cine-encoder/releases
Linux versions:
https://www.pling.com/p/1406740/
Report a bug
https://github.com/CineEncoder/cine-encoder/issues
+ Reply to Thread
Results 1 to 18 of 18
-
Last edited by Helg1980; 25th Aug 2021 at 10:39.
-
The first program for Linux for encoding HDR videos appeared.
I want to know your opinion about the program.
Looks like a simple Qt based GUI which uses MediaInfo to analyse video and ffmpeg for decoding and encoding.
So another ffmpeg gui.
Problems I see are:- afaik ffmpeg doesn't allow to set light levels, master displaying information and chroma sample location.
You only set "-sei hdr -color_primaries {colorprim} -color_trc {transfer} -colorspace {colormatrix} -color_range tv" so 'while preserving HDR signals' also seems a big far fetched. - you hardcode tv luma range
- only support HDR10, no HDR10+, HLG or DolbyVision.
- rather limited usage due to the restricted HDR support and no additional filtering&co
-> Which you the best with your tool! Linux can always use some more coders.
Sadly it but it doesn't seem to offer anything to me which wasn't available before so for me it's a pass.
Cu Selur
Ps.: Why the mediainfo dependency? Why not use ffmpeg to analyse the source if you don't set stuff like light levels&co?users currently on my ignore list: deadrats, Stears555, marcorocchini - afaik ffmpeg doesn't allow to set light levels, master displaying information and chroma sample location.
-
Hi!
As far as I know, there is no support for HDR signals in Linux programs yet (we are only talking about Linux programs).
I tried running Hybrid, it has an experimental mode, but it doesn't work for me.
To add brightness signals I used the mkvmerge utility as recommended by Google:
https://developers.google.com/media/vp9/hdr-encoding
HLG mode is also supported, you can see it in the Advanced section of program.
Other modes are in development.
I know about your Hybrid program for a long time, it is a very good program,
but it works stably only for Windows for me (I haven't tried it under MacOS)
and an excessive number of settings, as it seems to me.
So I was forced to use my own program.
The version of my program under Windows and MacOS I don't know when it will appear, it is still only in my plans. -
Small suggestion, you could:
a. encode the video with x265 (decode with ffmpeg pipe to x265)
b. encoder audio and add passthrough video using ffmpeg
this way at least for H.265 you would have proper HDR signaling and you wouldn't be bound to mkv as container.
Yes, it would add one additional step to the processing, but this way the stream would have the proper signaling.
I'm wondering if you add the signaling through mkvmerge why not add all (colorprime, transfer, colormatrix, luma range) the signaling this way?
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
why not add all (colorprime, transfer, colormatrix, luma range)
mkvmerge \
-o HDR_strobe_scientist_18Mbps.mkv\
--colour-matrix 0:9 \
--colour-range 0:1 \
--colour-transfer-characteristics 0:16 \
--colour-primaries 0:9 \
--max-content-light 0:1000 \
--max-frame-light 0:300 \
--max-luminance 0:1000 \
--min-luminance 0:0.01 \
--chromaticity-coordinates 0:0.68,0.32,0.265,0.690,0.15,0.06 \
--white-colour-coordinates 0:0.3127,0.3290 \
HDR_strobe_scientist_18Mbps.webm -
ARGH!
I fust looked at your code:
Code:cmd = f'mkvmerge -o "{output_file}" --colour-matrix 0:9 --colour-range 0:1 ' \ f'--colour-transfer-characteristics 0:{trc} --colour-primaries 0:9 --max-content-light 0:1000 ' \ f'--max-frame-light 0:300 --max-luminance 0:1000 --min-luminance 0:0.01 ' \ f'--chromaticity-coordinates 0:0.68,0.32,0.265,0.690,0.15,0.06 --white-colour-coordinates ' \ f'0:0.3127,0.3290 "{temp_file}" '
Code:--colour-primaries 0:9 --max-content-light 0:1000 ' \ f'--max-frame-light 0:300 --max-luminance 0:1000 --min-luminance 0:0.01 ' \ f'--chromaticity-coordinates 0:0.68,0.32,0.265,0.690,0.15,0.06 --white-colour-coordinates ' \ f'0:0.3127,0.3290 "
You should either let the user decide their values and/or take those values from the source.
For a source with for example values like:
Code:colour_description_present : Yes colour_description_present_Source : Stream Color range : Limited colour_range_Source : Stream Color primaries : BT.2020 colour_primaries_Source : Stream Transfer characteristics : PQ transfer_characteristics_Source : Stream Matrix coefficients : BT.2020 non-constant matrix_coefficients_Source : Stream Mastering display color primaries : BT.2020 MasteringDisplay_ColorPrimaries_Source : Stream Mastering display luminance : min: 0.0020 cd/m2, max: 1000 cd/m2 MasteringDisplay_Luminance_Source : Stream Maximum Content Light Level : 992 cd/m2 MaxCLL_Source : Stream Maximum Frame-Average Light Level : 518 cd/m2 MaxFALL_Source : Stream
Those values on the google VP9 page were an example not a 'always use these'.
If those values were always the same signaling them would make no sense.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
When reading the MediaInfo data:
MediaInfo-Data -> mkvmerge parameters
'Mastering display luminance' -> gives you 'min-luminance' and 'max-luminance'
'Maximum Content Light Level' -> gives you 'max-content-light'
'Maximum Frame-Average Light Level' -> gives you 'max-frame-light'
'Color primaries' -> gives you 'colour-primaries'
'Color range' -> gives you 'colour-range'
'Mastering display color primaries' -> gives you 'chromaticity-coordinates' and 'white-colour-coordinates'
=> with those values you should be able to fix your tool
For help interpreting the 'Mastering display luminance' data, here's a short code snippet from Hybrid source code:
Code:if (line == QString("Display P3")) { line = QString("R(x=0.680, y=0.320), G(x=0.265, y=0.690), B(x=0.150, y=0.060), White point(x=0.3127, y=0.3290)"); // DCI-P3 D65 } else if (line == QString("DCI P3")) { line = QString("R(x=0.680, y=0.320), G(x=0.265, y=0.690), B(x=0.150, y=0.060), White point(x=0.314, y=0.3510)"); // DCI-P3 Theater } else if (line == QString("BT.2020")) { line = QString("R(x=0.708, y=0.292), G(x=0.170, y=0.797), B(x=0.131, y=0.046), White point(x=0.3127, y=0.3290)"); // Rec. ITU-R BT.2020-2 } QRegExp reg("^R\\(x=(.*), y=(.*)\\), G\\(x=(.*), y=(.*)\\), B\\(x=(.*), y=(.*)\\), White point\\(x=(.*), y=(.*)\\)$"); if (!reg.exactMatch(line)) { reg = QRegExp("^R: x=(.*) y=(.*), G: x=(.*) y=(.*), B: x=(.*) y=(.*), White point: x=(.*) y=(.*)$"); if (!reg.exactMatch(line)) { sendMessage(HANALYSE | HPOPUP, QString("Unknown 'Mastering display color primaries'-format, please report to Selur.Thanks!\n%1").arg(line)); return; } }
Cu SelurLast edited by Selur; 1st Aug 2020 at 08:55.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Hi,
I completely rewritten the program. Now everything clearly works.Last edited by Helg1980; 15th Nov 2020 at 04:09.
-
After several months of work, a new version of the Cine Encoder v3.0 was released.
In the new version:
- changed the design,
- added batch mode,
- added 2-pass mode,
- added a mode for working with presets,
- added a pause function during conversion.
There are packages for the main distributions: Debian, Ubuntu 20.04, Fedora 32, CentOS 7.8, Arch Linux, Manjaro Linux.Last edited by Helg1980; 15th Nov 2020 at 04:47.
-
In new version 3.1:
- released a package for Windows,
- fixed some bugs,
- improved design.Last edited by Helg1980; 25th Aug 2021 at 10:37.
-
In new version 3.2:
- added new features: metadata editing, audio track selection, subtitle selection, clip cropping, clip sorting,
- added presets,
- fixed some bugs,
- improved design.Last edited by Helg1980; 25th Aug 2021 at 10:37.
-
In new version 3.3:
- the interface has been redesigned into dock widgets,
- added new features: additional settings for presets.
- added presets for Intel QSV, XDCAM,
- fixed some bugs.Last edited by Helg1980; 25th Aug 2021 at 10:36.
-
In new version 3.4:
- added log window,
- added a light theme,
- added the ability to minimize the program to the tray,
- apply the preset with a double left click,
- change a preset's names in the preset window,
- added the ability to convert the color primary, color matrix, transfer,
- fixed some bugs. -
I love it when a plan comes together!
Similar Threads
-
how to measure video encoder quality
By colibri in forum Newbie / General discussionsReplies: 2Last Post: 19th Mar 2020, 19:44 -
Any video encoder please for 5.1 Ch videos
By minkoko123 in forum Newbie / General discussionsReplies: 4Last Post: 11th Oct 2019, 21:38 -
Encoder With a Video Pass through
By Daringbaaz in forum Newbie / General discussionsReplies: 2Last Post: 15th Jun 2019, 08:51 -
is libX265 encoder in latest FFMPEG is the same as standalone x265 encoder?
By junglemike in forum Video ConversionReplies: 5Last Post: 21st Sep 2016, 01:36 -
Best Fastest Video Joiner / Encoder
By nickthomas125 in forum EditingReplies: 5Last Post: 20th Oct 2015, 19:25