4k video from 1080 video

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?

VP9 is used by Google, because they own it
H.265 & H.264 is owned by MPEG and there has been alot of patent issues over time.

So it more about legal stuff, than it is about quality, YT transcode anything you upload to a lot of different formats and resolutions, so what you see when watching YT, is not the file you uploaded.

So it is a waste of time and resources to upscale you 1080p footage to a higher resolution of YT (IMHO)

Because bitrate depends on resolution, and presets are dumb. Quality based VBR is adaptive to resolution.

Ok. Good to know. Thanks. :slight_smile:

Btw, do you know is average bitrate option works ok for vp9 as I have doubts here…?

It’s best to throw away the official YouTube recommendations and pretend they don’t exist. YouTube created those parameters for beginners that don’t know anything about video formats, but still need numbers to enter into their software’s export screen in order to make a video. YouTube provided the most generic parameters possible just to get the beginners rolling.

In reality, YouTube will accept virtually any file type. They accept everything because they don’t want to risk turning away potential customers just because of “unsupported file type” errors. It’s possible to upload ProRes and Huffyuv to YouTube, both of which will provide higher quality than VP9 or H.264 (not counting their lossless modes). So, the YouTube recommendations literally do not matter.

Nor is there an advantage to providing YouTube with a VP9 file. As Tim said, YouTube uses VP9 because they don’t pay licensing fees for it since they own it. They’re interested in the cost savings more than the quality factor. Also, their hardware encoding will be better and faster than most people’s hardware because Google built a custom transcoding farm called Argos VCU. They’re in a different league. Google’s choices do not apply to us. For us, VP9 is a weak contender, and better options exist. Even Google is moving onward to AV1 where possible.

Average bitrate is useful for streaming environments, where a max transfer rate exists. Examples are over-the-air television (bandwidth limited by frequency spectrum) and Blu-ray discs (bandwidth limited by rotation and read speeds of a physical disc). Mobile services have max data rates, too.

But exporting a file from Shotcut is not a streaming situation. It’s offline. You can take all the time you want and make a file as big as you want in order to achieve the highest quality. The quality percent (CRF) method does this. It allocates more bits to the parts of the video that need it, and less bits to the parts that are easy to encode. This intelligent distribution of bits creates better-looking files with smaller file sizes than fixed-bitrate methods can do. Fixed-bitrate can simultaneous be too little bitrate to look good on the high-detail areas, and too much bitrate for the simple low-detail areas. There is no reason to use fixed-bitrate when uploading to YouTube. It will always hurt you with either suboptimal quality or bloated file size.

Granted, if the goal is to live-stream to YouTube, then okay, average bitrate becomes an option again. But that’s back to the difference between streaming and offline scenarios.

3 Likes

The answer to your question depends on how big your YT-Channel is. If you have lot of trafik, YT uses the VP09-Codec for your videos automatically. If not, you must live with the AVC1-Codec up to video formats of 1080p. The VP09 has double the power of the AVC1, as H.256 compared to H.264. This makes a big difference, mainly in critical situations with bad light conditions.
I myself make my videos in 1080p (I don’t know anybody, who can see a difference in a normal view distance of 2x display diagonale between 2k and 4k) and scale it up for YT to 1440p. Then the videos get the VP09-Codec, starting with 720p.

I have a channel approaching to 1k subscribers, and I’ve noticed that for some of my 1080p videos vp09 codec is already used. Around 500 views seems to be enough for video. Although I don’t have details what are exactly the criteria. You can have a look: https://www.youtube.com/c/ITGuyinaction/featured (it’s about vintage computers)

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