4k video from 1080 video

Hi,

I have the project made in 1920x1080 format. I was wondering what will happen if when exporting this I would set 3840x2160 resolution (in export video window).

Will it keep then all formatting, size etc. but just rescale it to 4k? And what influence on image quality will it give?

Is that worth to publish 4k videos from full hd projects on YouTube?

Most of clips in my projects are full hd. But some are 4k and were normally scalled to full hd when exporting to full hd. If now I will set 4k but only during export (not for project), will shotcut profit somehow from this higher resolution?

What parameters it’s the best to set for such export to 4k?

Thanks a lot for help.

You should keep the output video in the same size as you source material, you will loose quality when scale a video up, So no need to post a 1080p video as 4K on youtube, it is a waste of peoples bandwidth for no good reason.

That was exactly my initial idea. However I’ve heard that yt treats 4k videos in different way than full hd… not sure if it’s true and that’s why I posted my question.

And one small additional question. What export parameters do you suggest for youtube to get the best quality?

There is a special YT-preset, which provides the best settings for YT (h.264 format with GOP 15 when i remember correctly and moderate to good quality setting). I mostly use this preset for YT with no problems. Keep framerate to 30 fps.
It doesn’t make any sense to scale up a HD video to 4k - quality doesn’t get any better and its waste of space and bandwith for all users. Try to keep videos in the original size or even scale them down with little bit of sharpening (max. 50%) that makes them even more crisp :wink:

Shotcut renders the frame at project resolution. So, 1080 in this case. Then is upscales or downscales that frame according to the Advanced override. This process would be identical to taking a 1080 frame from Shotcut and upsizing it in GIMP or Photoshop.

Kinda depends on the source. If lots of sharp lines and edges and detail are in the source videos (worst-case scenario being cartoons), the quality difference will be pretty strong. If the source video is live-action footage that goes all-in with blurry backgrounds, then the difference will be minimal.

When upscaling, it’s also recommended to use Lanczos as the interpolation method (on the Advanced > Video panel) as this algorithm puts a little extra effort into producing sharper results than the other interpolators. It may also be beneficial to put a mild Sharpen filter on the Output track to make the 1080p frames extra crispy, then that crispiness gets smeared down to normal sharpness during the 1080->1440 upscale process. It takes a little experimentation to get best settings for your unique sources.

Shotcut, no. Your home viewing experience, no. After all, for home viewing, you could export 1080 and have the media player upscale to 4K just as effectively. The same process would be used in either case… it’s just a matter of which software is doing it and when.

Assuming you export with a quality percent instead of a fixed bitrate, just keep doing what you’re doing. Quality percent is not particularly affected by resolution once above 720p. (Technically, you could probably drop quality percent by a few when using 4K and not notice any difference, which would save a little on file size. This works because neighboring pixels in 4K are more similar in color than neighboring pixels in 1080, so there is compression efficiency gained with 4K material.)

If using a fixed bitrate… double it, and tweak from there.

You are correct. Videos posted above FHD resolution will go straight to VP9 or AV1, with Opus audio, which will result in significantly better quality delivered to the viewer.
It’s very worthwhile and a lot of channels upscale for this very reason. Well-upscaled 1080p delivered with VP9 looks better than native 1080p delivered with AVC (also due to the bitrates that YouTube chose for both). Since there is a codec change triggered by the resolution difference, people’s bandwidth is not going up, yet quality is improving because of the codec change. So it’s worth it.

However, the cut-over point for special treatment by YouTube is 1440p. There is no need to go to full 4K. So, you could export at 2560x1440 rather than 3840x2160 and get all the same benefits on YouTube. And the quality would be a little better compared to 4K since Shotcut isn’t upscaling as much. And file sizes would be smaller, and export times would be less. There is no additional benefit to posting to YouTube at 4K over 1440p, when the sources are only 1080p.

1 Like

Guys, thanks a lot for these remarks.

Is there any way to add Sharpen filter to the whole video with just one click? I mean not to add sharpen as filter for each clip, but just to set sharpening for the whole video (for everything)?

What export parameters would you suggest? Is YouTube profile in shotcut sufficient? What about changing Quality on Codec tab is if to do this, which value would you suggest to get better quality? Is audio 384kb/s bitrate sufficient?

If filters are applied to the Output track, they affect the entire video. That’s why I recommended the Output track.

Yes, the YouTube preset is sufficient. Audio at 384kbps (the YouTube default) is more than sufficient.

Wow, I’m using shotcut since 1.5 year and I’m still discovering new functionnality. I didn’t know about “Output track”. Cool!

Do you think that Amount 50% and Size 50% is a good option?

Is this filter added before or after upscaling?

Upscale is the last(ish) operation before actual encoding. No filters are applied after upscaling. Sharpen happens before the upscale.

The Sharpen amount would have to be determined entirely from experimentation. It varies by source type. The flatter the video is supposed to look, the less Sharpen that’s needed, and it may not be needed at all. Sometimes Lanczos interpolation is sharp enough.

Here’s the method I use, when Sharpen is deemed necessary:

First, I complete my project in 1080p as normal, with no Sharpen on Output yet. Save the project. (Make a backup too, while at it.) Then copy the timeline into the Source viewer using the timeline’s open-area right-click menu:

Then on the Source tab, I locate a representative frame of the project, preferably with people in it. I hit the “i” and “o” keys to mark this frame as both the In and Out point.

Then I go to the Export panel, do the 4K or 1440p override, and export using the PNG preset. Since the In/Out range is only a single frame, the “PNG sequence” is only one file.

I’m using a true export instead of File > Export Frame because I want to see how Sharpen looks at upscaled resolution. File > Export Frame would stay at 1080.

The first exported PNG image is the baseline. Now I apply a Sharpen filter. This Sharpen filter is applied to the Source window, not the project timeline. I start around 35%, then do the PNG export again with my settings noted in the filename. Then I raise the amount and re-export a few times. Finally, I review the exported PNG files with a full-screen image viewer, and pick the one that looks best. I note the settings that were used for it (should be embedded in the filename). Then I go back to the Project tab, put a Sharpen filter on the Output track with the same settings, re-save, and export the whole project for real.

1 Like

I’m wondering about one thing more. If 2k videos goes for better codecs, should I also use these codecs when exporting video from shotcut. I mean should I put vp9_vaapi as codec for video and libopus as audio? And if yes with what parameters? What is the difference between libvpx-vp9 and vp9_vaapi codecs? Is that that the first one is software one and the second is hardware one? Which means that software is probably better, isn’t it?

One thing more - I’m wondering if sharpening after upscale is possible.

I’ve found some interesting threads:

https://www.cloudacm.com/?p=3016

According to them adding ex.
-vf unsharp=3:3:1.5
-vf unsharp=5:5:2

for mid sharpening to ffmpeg should do some sharpening but not sure if it’s after upscaling. In shotcut we have window “other” in Advanced menu of Export. Thus…

Not sure if to post it, but I hope it might be interesting to someone having similar doubts…

I compared the situation with one of my old videos.
Old version was exported using H.264 High Profile (with 44.1khz audio and lanczos). It had 80MB.
New version was exported using YouTube profile with the following modifications:
Export: 2560x1440
Interpolation: Lanczos (best)

Codec libvpx-vp9
Rate control: Average Bitrate256
Bitrate 20Mbs

Audio 44100
Codec libopus
Bitrate 384kbs

What I noticed in the log, this codec was not able to manage 44.1kHz audio and changed it to 48kHz.

And the size is… 2.6GB. Crazy!!! So the file is about 33 times bigger. The export time increased 6 times.

Even if h.264 high profile was probably too low quality for youtube, I’m not sure if I can afford this new settings. To keep the files on my hard disk I would need a lot of space. Also export time is insanely long… Thus I have to experiment with sth simplier… Perhaps using 2k resolution but standard YouTube profile settings (with Lanczos as the only difference) would be a better idea…

Edit: What I noticed that audio is missing in the exported file. Probably due to this problem 44.1/48. And video bit rate is depending on the moment, ex. 154343 kbps thus 154Mbps or * 223877 kbps thus much higher then set before export. Not sure why? As I set 20Mbps only.

The uncompressed video is about 4.5Gbps (assuming 50fps and doing the maths in my head).
So you’ve already reduced the datarate by 225 times.

That’s quite a high ratio for a video that’s going to be recompressed.

I’m making 30 fps videos. Do I understand well, you suggest that the quality is still not sufficient (I mean I should increase quality parameter when exporting)?

The YouTube setting is rarely a good one to use. It increases filesize considerably over the default settings due to its small GOP size. See here for more info:

1 Like

I’m curious why yt forces such “bad” parameters…

Youtube doesn’t force these parameters, they are just a recommendation (it probably helps them use fewer resources when transcoding). You can send almost any format to Youtube and it will accept it. Dan created this preset because people asked for it, thinking that if they didn’t provide videos with this stupid GOP size somehow the results on Youtube wouldn’t be as good.

1 Like

This will not benefit you. YouTube is going to re-encode regardless of what format is sent to it. Since VP9 is very slow with software encoding and generally does not match the quality of H.265 with hardware encoding, there is little reason to use it.

Using Opus audio is fine.

With FFmpeg command-line… yes.
With Shotcut export… no.

You are correct that sharpen does its best work after the upscale. But adding additional filters after the final upscale is not supported by Shotcut. That’s why we do the over-sharpen hack on the Output track. It’s the second-best option.

Yes, but it doesn’t allow for adding additional filters to the filter graph. That part is managed internally by Shotcut.

The “Other” page is generally used to set container- or codec-specific flags that Shotcut itself wouldn’t know how to do, such as specifying a certain video profile or indicating +faststart for MP4 files. This basically tweaks the way the output file is written, but doesn’t do any actual video processing like a filter. It’s just format specification.

1 Like

VP9 is used by yt in some videos. Isn’t it some reason?

Btw, according to the official yt recommendation, whatever if you upload full hd of 4k you still should use h.264. Isn’t it a bit strange?

And I’m wondering one thing more. Yt gives recommended bitrate. However standard youtube profile in shortcut uses quality based method for encoding and not average bit method. Why it was configured like that? Sure I know I can change that, but I’m wondering why it’s like that.

Moreover I tried to set average bit rate for libvpx-vp9 and… it seems that it’s ignored. Is that somekind of bug?