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

Better color depth support #188

Open
sonigfr opened this issue May 21, 2020 · 2 comments
Open

Better color depth support #188

sonigfr opened this issue May 21, 2020 · 2 comments
Milestone

Comments

@sonigfr
Copy link

sonigfr commented May 21, 2020

Hi, when importing a 10 bit color depth video, output is at 8 loosing the original color depth quality.

I can confirm when importing 10 bit video files, png image files sequence generation respects the color depth of the original file. When importing an 8 bit video file, png files are at 8 bit, when importing 10 bit or more, png files pass at 16 bit, the maximum color depth per channel a png file can support, preserving the source color depth resolution quality.
But the color depth resolution is lost somewhere between image processing and the output, passing the color depth resolution of rendered png files systematically at 8, whatever source is used.

More and more cameras and productions recognize the importance of a higher color depth, both for visual effects and color correcting quality accuracy works, most of the time, speed and time remapping effects are practiced just after the cut editing and before any deeper postproduction works, that's why these days support of higher color depth resolutions began to be brought, and why it would be nice if in the future an application like slowmoVideo, that I really love, could support it too.

Following some further information captured from mediainfo or from image > image properties of Gimp :

Source video :
mediainfo Videos/test.x264.10bitwaveletcrf0.mp4
General
Complete name : Videos/test.x264.10bitwaveletcrf0.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 59.6 MiB
Duration : 3 s 80 ms
Overall bit rate mode : Variable
Overall bit rate : 162 Mb/s
Writing application : Lavf57.28.102

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2 Intra@L4
Format settings : CABAC
Format settings, CABAC : Yes
Format settings, GOP : N=1
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 s 80 ms
Bit rate mode : Variable
Bit rate : 162 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 3.132
Stream size : 59.6 MiB (100%)
Writing library : x264 core 148
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=1 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=0.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box : avcC

Original frames generated :
mediainfo Videos/slowmo/test10bit/frames/orig/frame00001.png
General
Complete name : Videos/slowmo/test10bit/frames/orig/frame00001.png
CompleteName_Last : Videos/slowmo/test10bit/frames/orig/frame00077.png
Format : PNG
Format/Info : Portable Network Graphic
File size : 743 MiB

Video
Format : PNG
Format/Info : Portable Network Graphic
Format_Compression : LZ77
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Bit depth : 48 bits
Compression mode : Lossless
Stream size : 743 MiB (100%)

Rendered frames generated :
mediainfo Videos/slowmo/test10bit/rendered/rendered-00001.png
General
Complete name : Videos/slowmo/test10bit/rendered/rendered-00001.png
CompleteName_Last : Videos/slowmo/test10bit/rendered/rendered-00301.png
Format : PNG
Format/Info : Portable Network Graphic
File size : 700 MiB

Video
Format : PNG
Format/Info : Portable Network Graphic
Format_Compression : LZ77
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Bit depth : 24 bits
Compression mode : Lossless
Stream size : 700 MiB (100%)

Here Bit depth 24 bits means 8 bit per rgb channel. 48 bit means 16 bit per rgb channel.

@Granjow
Copy link
Member

Granjow commented May 21, 2020

Thanks for the feature request, makes completely sense. Would you happen to have a small sample video that can be used for testing?

@Granjow Granjow added this to the vFuture milestone May 21, 2020
@sonigfr
Copy link
Author

sonigfr commented Jun 2, 2020

Hi Granjow, thank you for your reply. Yes with pleasure, I can't give personal videos because they mostly come from commercial projects under specific licenses but you can find pretty lot of 10 bit+ samples on the internet these days, mostly from camera builder companies.

Here is a 10 bit file encoded in h265 :
https://filetransfer.io/data-package/boQ9Qc0G

Here a 12 bit file encoded in prores :
https://filetransfer.io/data-package/vYAvxSa2

You can take a look at this page :
https://www.blackmagicdesign.com/products/blackmagicpocketcinemacamera/gallery

and from a most famous movie camera builder :
https://www.arri.com/en/learn-help/learn-help-camera-system/camera-sample-footage

If in checking files with ffprobe you don't have the good color depth value you should use a newer ffmpeg build at this page :
https://ffmpeg.org/download.html

Don't hesitate to come back to me if you have any question. And to finish I don't know for you but I think after some testing the best slow motion algorithm effect available from now is from speedwarp option on Davinci Resolve.

Thank you again for your work !

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

2 participants