Preset rendering for YouTube in Cinelerra.

Hi, I am looking presets rendering for YouTube.

.webm VP9 YouTube Cinelerra, currently it looks bad on youtube.

Many recommend uploading it in the best possible quality.

searching i found this: YouTube recommended upload encoding settings - YouTube Help

is it possible to put this in Cinelerra?

Im not sure how to do it in Cinelerra.

@sparkill

Sorry for the late reply and this is not yet a complete answer until I have more time to test further.

Render Menu setup:

  1. change File type to ffmpeg if not already AND file format to mp4

  2. click on the Video wrench and then in the Compression box use the arrow on the right side to scroll down to faststart_h264.mp4

  3. do the same for the Audio wrench, that is choose faststart_h264.mp4.

These were setup for a user a few years ago for his youtube preferences and at the time they were quite good but I have not rechecked them in a long time so I will look at the URLs you quoted to see how they match.

@sparkill

Were you using File Type of ffmpeg and File Format of youtube in the Render Menu? If so, use the Video wrench and down arrow on the right side of the Compression box to select uhd_h264.youtube AND READ what it says in the box about changing the Audio wrench too.

FYI: the Audio faststart_h264.mp4 as mentioned in the previous note is aac.

@sparkill

I have now had time to study your url:

[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264) · GitHub

and it looks like the ffmpeg/mp4 faststart_h264.mp4 Video and Audio wrench choices should do quite nicely. You can make minor adjustments if you feel that they are needed. Here is the matching url suggestion and what we are using with faststart.

URL suggestion Our faststart_h264.mp4 (you will see settings in bottom)

------------------------ -----------------------------------

c:v libx264 h264 Yes, that is what is being used

-profile:v high profile=high (see this in the Video Preset menu box)

-bf 2 bf=8 (shown in box) YOU CAN CHANGE this to 2

-g 30 Cinelerra is fussy about this and I only think that this is the last line of keyint=60 but really just guessing

-crf 18 crf=28 (shown in box) YOU CAN CHANGE this to 18

-pix_fmt yuv420p Yes, that is what is being used (see Pixels box)

You can drive yourself crazy with changing all of the parameters and it takes a lot of understanding of ffmpeg to get them all exactly what you want. However, if you find a particularly good combination (like what the user who gave us the faststart_h264.mp4 one), we can add it so that it is easily available for all.

@phylsmith2004

try this in faststart h264.

looks good.

But I had a problem with the color space.

The workspace was. BT709 + MPEG

At the end cinelerra rendering he ignored the FFMPEG color commands.

The final rendered video was in BT601 + JPEG but with BT709 + MPEG settings.

My solution

Workspace in BT601 + JPEG rendering will be normal.

the FFMPEG commands will work.

crf=18
g=30
maxrate=20000000
bufsize=20000000 I do not know how it works.
preset=veryslow
profile=high
cin_pix_fmt=yuv420p
level=41 I do not know how it works.
bf=2
refs=4 I do not know how it works.
color_primaries=bt709
color_range=mpeg
color_trc=bt709
colorspace=bt709

:down_arrow:I do not know how it works. :down_arrow:

use framerate for 1 keyframe/sec, needed for seeks

x264params=cabac=1:me_range=24:bframes=8:keyint=60:keyint_min=25:qpmin=0:qpmax=69:qpstep=4

@sparkill

I am somewhat confused by this statement:

The final rendered video was in BT601 + JPEG but with BT709 + MPEG settings.
When I change the Render Menu settings to include the lines in the box of the Video wrench of: color_primaries=bt709+color_range=mpeg+color_trc=bt709+colorspace=bt709

the rendered result retained BT709 and MPEG of the original input.

Am I understanding correctly that you have good final results that you are happy with?

@phylsmith2004

I went back to do more tests.

to replicate.

Preferences:

workspace: BT709

color range: MPEG

final video was BT601 + MPEG ???

Rendering does not use colorspace.BT709

But everything was BT709 + MPEG

Original video BT709 + MPEG

workspace was BT709 + MPEG

Additional commands:

color_primaries=bt709
color_range=mpeg
color_trc=bt709
colorspace=bt709

After many renderings I realized that the color was different.

Use workspace: BT601

color range: JPEG

with the color commands.

it will be a result equal to the original video.

Im still experiencing rendering.

it is very confusing for me.

Could it be considered a Bug?

Restart Cinelerra settings.

FFMPEG mp4

default Audio / Video h264.mp4

Preferences: BT709 + MPEG

YUVA-8bit

All video rendered in BT709 + MPEG

will result. BT601 + MPEG

this is normal?

@sparkill

About: Im still experiencing rendering. it is very confusing for me.

Yes, I agree. But the alternative is not enough flexibility.

There are so many options in ffmpeg, which makes it confusing but once you have the results you like, you can just use them. Unfortunately, or actually quite fortunately, so many options provide the different choices for the differences that allow users to choose what they want. The choices that are currently available in CinelerraGG were set up to at least let users get something rendered without having to learn all of the overwhelming possibilities.

About: Could it be considered a Bug?

Restart Cinelerra settings.

FFMPEG mp4

default Audio / Video h264.mp4

Preferences: BT709 + MPEG

YUVA-8bit

All video rendered in BT709 + MPEG

will result. BT601 + MPEG
this is normal?

It is not a bug. It is normal because when you render and do not specify exact parameter values, it uses what it has as the default for the codec, NOT the values of your original video.

** Posted by: @phylsmith2004 **It is not a bug. It is normal because when you render and do not specify exact parameter values, it uses what it has as the default for the codec, NOT the values of your original video.
I understand that.

But putting color parameters.

Settings> preferences> appearance

YUV Color space BT709

YUV Color range MPEG

When rendering the project.

FFMPEG Rendering Ignore the color parameters in all formats.

color_primaries=bt709
color_range=mpeg
color_trc=bt709
colorspace=bt709

FFMPEG will use the default BT.601 + MPEG a different color from the original

Use YUV Color Space BT.709

The color in the Compositor will work.

will become YUV BT.601 in rendering

But mediainfo will be BT.709

Only if this

Settings> preferences> appearance

YUV Color space BT601

YUV Color range JPEG

The color parameters will work.

color_primaries=bt709
color_range=mpeg
color_trc=bt709
colorspace=bt709

the colors will be the same as the original video project.

Im not sure if its just me.

But now Cinelerra GG works fine.

Change Workspacecolors before rendering + color parameters.

It will have a normal rendering.

A bit confusing.

But it works fine for me.

Usually, when I make a Project I write a README.txt with some Cinelerra-GG settings for Color Model, Proxy, and Rendering.

Below a little part of my README.txt for a project of mine after several tests time ago (like you).

  • Setting Format: 1280x720 (720p) HD @30fps 16/9 YUVA420p Color Model: YUVA-8bitSettings/Preferences/Appearance: Color: - YUV color space: BT709 - YUV color range: MPEG (16-235) - File Format: FFMPEG - webm - Audio: - Preset: vorbis.webm - Bitrate: 128000 (128k) - Quality: -1 - Samples: fltp - Video: - Compression: vp9_1280x720_24or25or30fps.webm - Bitrate: 0 - Quality: -1 - Pixels: yuv420p - Video Options ( * means changed by me): g=30 () color_primaries=bt709 () color_range=mpeg () color_trc=bt709 () colorspace=bt709 (*)

@sparkill wrote:

Im not sure if its just me.
I will try your set up. Thanks!

I made mistakes with the color space.

I had calibrated the colors in windows 10, 6 months ago.

but dont calibrate it on linux.

https://cinelerra-gg.org/download/CinelerraGG_Manual/Video_attributes.html

Model Color.

Will the composer always be sRGB?

The project looks good on the composer.

The rendering is not something gray.

---------- edit

this helped me a lot.

now I understand things better. :grinning_face:

@sparkill It seems like you are learning a lot all on your own.

@andreapaz Has helped explain some things about color management now and in the past as you found in the forum topic you quoted.

Will the composer always be sRGB?
maybe Andrea can answer that as I have not got a clue.

@andreapaz thx :slight_smile:

you have good content.

now use RGBA-8bit color model

rendering in yuv444p

the colors almost the same as the original video,

I have to experiment more.

I use OBS to record my screen.

Use NV12> bt709 > partial (limited mpeg)

its a great relief.

I was going crazy with the color.

Unfortunately, I havent made any progress since that thread that was mentioned. In fact, Im even more confused. Ive also tried contacting Adam Williams, but hes been known to never respond.

If anyone uses a workflow for color in CinGG, their input is welcome…

When I have time I will continue to investigate the color.

For youtube now I use yuv444p for 60FPS.

Mediainfo

– workflow –

Model Color YUVA - 8bit

Space color BT 709

Color range JPEG (full)

–Rendering preset –

VIDEO h264.mp4

Pixels yuv444p

format movflags=0x00000080


maxrate=20000000
bufsize=20000000
cin_pix_fmt yuv444p
preset=slow
crf=18
g=30
bf=2
color_trc=bt709
color_primaries=bt709
colorspace=bt709
refs=4

x264-params cabac=1:me_range=24:bframes=2:keyint=60:keyint_min=25:qpmin=0:qpmax=69:qpstep=4


AUDIO

h264.mp4

Format movflags=0x00000080

profile=aac_low
b=384k


Usage to record OBS:

Color Format: I444 (yuv444p)

Color Space: 709

Color range: Full (JPEG)


Making a profile is very confusing.

This is currently working for me.

Edit:

As far as I understand.

FFMPEG will settings default your video If you dont use parameters.

But in Cinelerra it will use the FFMPEG Defaults (presets) not your video.

it helped me understand this better.

@sparkill

I think you are now the expert! Thanks for sharing your final setup. Will it be OK to use this in the manual as a suggestion?

But in Cinelerra it will use the FFMPEG Defaults (presets) not your video.
This sounds true as far as rendering goes.

@phylsmith2004

Adding it would be fine.

FFMPEG has many settings.

it would help people used by other video editors.

Shotcut and Kdenlive rendering work almost the same.

but in Cin GG rendering changes many things.