# Upscaling in Handbrake



## LightningJR (Feb 2, 2014)

I want to take my 1080p recordings and encode/upscale them using Handbrake but I have no idea how to get handbrake to upscale the original resolution. Is there an "extra option" that I can type in to Handbrake?

I have searched Google about this and only got people explaining how this is a bad idea... Some people may know this and not care but just need the ability to do it. Idk if Handbrake has the ability to upscale the resolution or not.

Any help is appreciated

Thanks, 

LightningJR

Alternative found, XMedia Recode. It upscales perfectly.


----------



## erocker (Feb 2, 2014)

Can't be done in handbrake, only scaled down.


----------



## lilhasselhoffer (Feb 2, 2014)

The reason people say not to do this is simple, any decent player will automatically change to resolution of videos to fit the screen size they are playing on.  For example

I have old videos recorded from VHS.  Their resolution is 320x480.  That means there are 153600 pixels available to me at any time.  My computer runs at 1920x1080 resolution, or 2073600 pixels.  The way the player makes that VHS video format fit my current screen is by making each pixel from the video occupy 13.5 pixels on my monitor.  This is done without my knowledge, but means everything on my monitor is blurrier than the original video at the original resolution (yes I am aware of ratio variance, but lets just put that out of our mind for now).  

DVD and Blu-ray players feature 1080p "upscaling" for DVDs.  They do this exact same thing, simply stretching the content to fit the screen.  Now since you can't have a pixel be half one color, and half another, they need to determine which color goes to which pixel.  High end players run an algorithm to determine when a pixel is one color or another, which requires a mathematical comparitor operation.  This requires extra processing, but again is transparent to the user.  


Now, why shouldn't I upscale my videos?  First, this isn't upscaling.  This is permanently adding what is effectively junk data, in order to artificially increase video size.  If you were to then play the video back at the original resolution it would be distorted, because the player again has to filter out data in order to shrink the video.  Some of that filtered out data is the interpolated values, but some of it will be the original good data.  This lost data, in the colloquial, will make the video look like crap.  This is why memes look like crap after 3-5 reposts, because people start messing with the data and degrading the images.  


Hopefully, this tells you why changing resolutions on video is foolish.  If you're aware of this, but still want to alter the resolution, then I'll help you.  Handbrake does not function as an interpolator, so you can't bump up the resolution.  Mediacoder http://www.mediacoderhq.com/ does.  Download Mediacoder, and use it to bump up the resolution.  No harm, no foul.  Again though, you should not be doing this.


----------



## LightningJR (Feb 2, 2014)

erocker said:


> Can't be done in handbrake, only scaled down.



Thanks, good to know. Now all I need is a great/fast encoder, like Handbrake, that can do this for me.



lilhasselhoffer said:


> The reason people say not to do this is simple, any decent player will automatically change to resolution of videos to fit the screen size they are playing on.  For example
> 
> I have old videos recorded from VHS.  Their resolution is 320x480.  That means there are 153600 pixels available to me at any time.  My computer runs at 1920x1080 resolution, or 2073600 pixels.  The way the player makes that VHS video format fit my current screen is by making each pixel from the video occupy 13.5 pixels on my monitor.  This is done without my knowledge, but means everything on my monitor is blurrier than the original video at the original resolution (yes I am aware of ratio variance, but lets just put that out of our mind for now).
> 
> ...



You could have saved yourself some time and just recommended MediaCoder but I guess some people will learn something from it. I understand exactly why doing this is bad but it has no bearing on why I want to do this which is why I just need an encoder to do this for me. I'll try MediaCoder and see how it does. I tryed TMPGEnc and it works perfectly but it's slow at encoding and also costs cash. I kinda need a free alternative.


----------



## lilhasselhoffer (Feb 3, 2014)

LightningJR said:


> You could have saved yourself some time and just recommended MediaCoder but I guess some people will learn something from it. .



I've tried not to assume any knowledge on the part of the poster.  It often requires superfluous explanation, but starting from the point of a basic google search that yields nothing particularly fruitful, I'm going to err on the side of caution.

You've got me curious though.  What exactly requires upscaled video?  A computer does it on the fly, all media players I know of do it on the fly, and a DVD/Blu-ray player is generally sold on this "feature."  I'm wracking my brain, but I can't see why one would need to do this.  Can you fill in the gaps for me, or would that be an unreasonable request?


----------



## LightningJR (Feb 3, 2014)

lilhasselhoffer said:


> I've tried not to assume any knowledge on the part of the poster.  It often requires superfluous explanation, but starting from the point of a basic google search that yields nothing particularly fruitful, I'm going to err on the side of caution.
> 
> You've got me curious though.  What exactly requires upscaled video?  A computer does it on the fly, all media players I know of do it on the fly, and a DVD/Blu-ray player is generally sold on this "feature."  I'm wracking my brain, but I can't see why one would need to do this.  Can you fill in the gaps for me, or would that be an unreasonable request?



That's not unreasonable. It's mainly for Youtube, idk how much you watch Youtube but when you upload fast moving video their encoder really does a number on it, introducing lots of compression and just poor quality. What I want to do it upscale the video to 4k so that on a normal 1080p monitor the video is clear. This can be done by uploading a 4k video to Youtube and watching it downscaled on a 1080p monitor. Obviously if you have a 4k screen it will be lost on you. I hope I am clear 

Example:
50k Bitrate 1080p Video









35k Bitrate 4k Video


----------



## lilhasselhoffer (Feb 3, 2014)

LightningJR said:


> That's not unreasonable. It's mainly for Youtube, idk how much you watch Youtube but when you upload fast moving video their encoder really does a number on it, introducing lots of compression and just poor quality. What I want to do it upscale the video to 4k so that on a normal 1080p monitor the video is clear. This can be done by uploading a 4k video to Youtube and watching it downscaled on a 1080p monitor. Obviously if you have a 4k screen it will be lost on you. I hope I am clear
> 
> Example:
> 50k Bitrate 1080p Video
> ...



That is the damndest thing .  I've avoided youtube uploading, so my apologies for my ignorance there.  I can see why you'd do that, given the obvious differences in video quality.  I still don't understand how it's happening, but the proof is there.  Hmmm....


----------



## Jetster (Feb 3, 2014)

How do you upscale 1080p? Answer you don't need to


----------



## LightningJR (Feb 3, 2014)

lilhasselhoffer said:


> That is the damndest thing .  I've avoided youtube uploading, so my apologies for my ignorance there.  I can see why you'd do that, given the obvious differences in video quality.  I still don't understand how it's happening, but the proof is there.  Hmmm....



Yeah, it's usually fine if you don't have a lot of movement in your videos but for a racing game and maybe fast paced FPS it can be very bad.



Jetster said:


> How do you upscale 1080p? Answer you don't need to



oh thanks..............


----------



## LightningJR (Feb 3, 2014)

Well it looks like MediaCoder is out of the question as they only support 4K in their premium edition of MediaCoder.. Any other suggestions for scaling video to 4k?


----------



## Steevo (Feb 3, 2014)

Buy an ATI card and use their filter packs, plus Shark007 and or VLC, force HTML5 video?










Taken from this video at 1080, it will not apply filters running 4K video other than scaling and interlacing.


----------



## LightningJR (Feb 3, 2014)

I don't follow what you're saying Steevo.. For one buying an ATI card is out of the question, I could easily buy MediaCoder Premium for cheaper than a whole new GPU. How would filter packs help Youtube's encoder do a better job with the uploaded file? The video files I upload are pristine looking, it's only after Youtube is done with them that it looks that bad.

Maybe you're referring to playback, I'm sorry but the video compression in the video's I posted can not be fixed by a sharpen/contrast/saturation filter. Did you watch the videos?

Force HTML5? Unless I am mistaken isn't that just a playback method? I can't encode my videos to HTML5 video format can I?


----------



## Steevo (Feb 3, 2014)

Ahh. I understand better now. Upload in mkv format.


----------



## LightningJR (Feb 3, 2014)

Steevo said:


> Ahh. I understand better now. Upload in mkv format.



mkv? Why? Youtube recommends mp4 and plus mkv is just a container for mp4.. Can you explain why?


----------



## erocker (Feb 3, 2014)

Sony Vegas Pro can do it. V11 for sure.

YouTube seems to assign a certain amount of bandwidth for whatever resolution it thinks you're uploading to it.

This is an older tutorial from 2010. He uses a free program to do it, not sure if it's still around.


----------



## LightningJR (Feb 4, 2014)

erocker said:


> Sony Vegas Pro can do it. V11 for sure.
> 
> YouTube seems to assign a certain amount of bandwidth for whatever resolution it thinks you're uploading to it.
> 
> This is an older tutorial from 2010. He uses a free program to do it, not sure if it's still around.



Looks like the the program used is still available and updated about 2 weeks ago. I wonder about the quality of the encode though but i'll try it. thx.


----------



## Steevo (Feb 4, 2014)

LightningJR said:


> mkv? Why? Youtube recommends mp4 and plus mkv is just a container for mp4.. Can you explain why?


Its not a container for MP4, its an alternate container, and youtube from my experience compresses it less. 


Also youtube compresses (as of yet) unpopular videos to save space and bandwidth, considering how many videos they host and stream....


----------



## LightningJR (Feb 4, 2014)

Steevo said:


> Its not a container for MP4, its an alternate container, and youtube from my experience compresses it less.
> 
> 
> Also youtube compresses (as of yet) unpopular videos to save space and bandwidth, considering how many videos they host and stream....



Ahh yes you're right, I remember demuxing .x264 and the audio file from both.

Interesting, i'll have to try mkv then if they compress it less.

Yeah I understand they give popular Youtubers more bandwidth and better compression, I am just trying to make my fast moving content better looking so scaling videos to 4k should do that for me. I wont be doing it for anything else. I have also watched other Youtuber's Assetto Corsa videos and they have the same issue, albeit not AS bad as me but it's still there.


----------



## MxPhenom 216 (Feb 4, 2014)

I wouldn't be doing any sort of upscaling. Instead record at the highest resolution possible, and then encode at that resolution.



LightningJR said:


> Ahh yes you're right, I remember demuxing .x264 and the audio file from both.
> Interesting, i'll have to try mkv then if they compress it less.
> Yeah I understand they give popular Youtubers more bandwidth and better compression, I am just trying to make my fast moving content better looking so scaling videos to 4k should do that for me. I wont be doing it for anything else. I have also watched other Youtuber's Assetto Corsa videos and they have the same issue, albeit not AS bad as me but it's still there.



You need high bitrate. Unfortunately Youtube as of late are very strict on bitrate they give a video when they re-encode when you upload. Upscaling to 4k, will likely not help you much. It maybe even be worst, since itll end up with a bigger file, and Youtube compresses, and butchers quality of much bigger videos, then smaller.


----------



## erocker (Feb 4, 2014)

LightningJR said:


> Looks like the the program used is still available and updated about 2 weeks ago. I wonder about the quality of the encode though but i'll try it. thx.



Let me know if it works! I'd like to try it out.


----------



## LightningJR (Feb 4, 2014)

MxPhenom 216 said:


> I wouldn't be doing any sort of upscaling. Instead record at the highest resolution possible, and then encode at that resolution.
> 
> 
> 
> You need high bitrate. Unfortunately Youtube as of late are very strict on bitrate they give a video when they re-encode when you upload. Upscaling to 4k, will likely not help you much. It maybe even be worst, since itll end up with a bigger file, and Youtube compresses, and butchers quality of much bigger videos, then smaller.



Please... If you have a 1080p screen watch both videos I posted at their highest quality and then you'll realize that your statement is wrong. The evidence is right there. I even used the 50k bitrate copy of the video because I thought maybe I could improve the quality of 1080p Youtube, this is not the case. Youtube at 4k on a 1080p screen is much better than just Youtube at 1080p on a 1080p screen. I would even argue that if you have a 4k screen the upscaled 4k video will look better because, from what I can tell, Youtube's encoder seems to have a much better encoding profile for 4k than 1080p makingeven upscaled 1080p videos nicer to watch.

I understand completely that in normal circumstances upscaling is BAD and pointless but when you upload to Youtube it isn't because it "looks" like Youtube encodes 1080p at ultra fast preset and 4k at medium preset. If you've done much encoding you'll understand how much this matters.



erocker said:


> Let me know if it works! I'd like to try it out.



I tried it and it does not work, I get an error when I press "start" 

So far only TMPGEnc worked flawlessly, I download a bunch of other encoders with no success. I tried Xilisoft Media Toolkit Ultimate (trial) and it came close to succeeding, it actually encoded the video but cut the length short and the sound was all noise. I think I might try Lightworks next but the learning curve is so high.


----------



## MxPhenom 216 (Feb 5, 2014)

LightningJR said:


> Please... If you have a 1080p screen watch both videos I posted at their highest quality and then you'll realize that your statement is wrong. The evidence is right there. I even used the 50k bitrate copy of the video because I thought maybe I could improve the quality of 1080p Youtube, this is not the case. Youtube at 4k on a 1080p screen is much better than just Youtube at 1080p on a 1080p screen. I would even argue that if you have a 4k screen the upscaled 4k video will look better because, from what I can tell, Youtube's encoder seems to have a much better encoding profile for 4k than 1080p makingeven upscaled 1080p videos nicer to watch.
> 
> I understand completely that in normal circumstances upscaling is BAD and pointless but when you upload to Youtube it isn't because it "looks" like Youtube encodes 1080p at ultra fast preset and 4k at medium preset. If you've done much encoding you'll understand how much this matters.
> 
> ...


 
I have done my fair share of video editing, encoding, etc. in the last few years now that I spend a lot of time mountain biking, and doing other things with my GoPro. I have run like 30+ of the same encoding with different settings, etc. and uploaded to youtube, with no difference in quality. Gets compressed, bitrate gets dropped, etc.

In those comparisons earlier in this thread, the difference is very small, most of the difference is coming from contrast and color changes. I do not recommend using any sharpen or color correction filters in your video, as its more work for Youtube's encoding, thus worst quality.

Now, if you find a way to upscale to 4k in a high motion video(I think you can imagine how much motion is in my GoPro videos charging down a mountain. ) and it looks better on a 1080p screen, then I'll just eat my words, and even try it out.

If you a truly serious about your videos, pay for Vimeo and upload there.


----------



## erocker (Feb 5, 2014)

Idk Phenom.. Pretty big difference for me.


----------



## LightningJR (Feb 5, 2014)

erocker said:


> Idk Phenom.. Pretty big difference for me.





MxPhenom 216 said:


> I have done my fair share of video editing, encoding, etc. in the last few years now that I spend a lot of time mountain biking, and doing other things with my GoPro. I have run like 30+ of the same encoding with different settings, etc. and uploaded to youtube, with no difference in quality. Gets compressed, bitrate gets dropped, etc.
> 
> In those comparisons earlier in this thread, the difference is very small, most of the difference is coming from contrast and color changes. I do not recommend using any sharpen or color correction filters in your video, as its more work for Youtube's encoding, thus worst quality.
> 
> ...



Idk how you don't see it phenom but maybe you're not watching the whole video. It's much more apparent in the second half of the video where I am using the outside camera and moving fast through tree shadows the quality of the 50K Original 1080p video is really bad. Watch both again at their highest resolution full screened between 3:15 - 3:30 and you should be able to see the difference, even in that spot the 4k video doesn't look the greatest, if you still don't after that then, to be frank, you're in denial.  If you're using the GoPro video for Youtube I would recommend upscaling it to 4k if not then don't upscale it, it's only be cause Youtube re-encodes it that the upscale matters.


Lightworks wont do it,  all I want is a free encoder that will upscale my 1080p videos to 2160p. I may have to go to a command line encoder like ffmpeg or x264 encoder.

Before I go that route though im going to try just about every encoder I can find. I will find a free option.......


----------



## LightningJR (Feb 5, 2014)

YES! Success! I found a free encoder that does it! Not to mention it has a basic editor as well (which Handbrake doesn't have) It also seems pretty quick, faster than TMPGEnc.

XMedia Recode is what it's called, I know, THAT name  Trust me though I went through about 20 different encoders and this was the only free encoder that did the job flawlessly. It has ALL of the advanced options too, a lot of the programs I downloaded didn't.

The program is easy to navigate and doesn't look flashy or "cheap", if you know what I mean.

Apparently it was made by one person, Sebastian Dörfler, the website is in German but the program is English.

Thread can be closed if necessary.


----------



## MxPhenom 216 (Feb 5, 2014)

LightningJR said:


> YES! Success! I found a free encoder that does it! Not to mention it has a basic editor as well (which Handbrake doesn't have) It also seems pretty quick, faster than TMPGEnc.
> 
> XMedia Recode is what it's called, I know, THAT name  Trust me though I went through about 20 different encoders and this was the only free encoder that did the job flawlessly. It has ALL of the advanced options too, a lot of the programs I downloaded didn't.
> 
> ...



 Ill have to try it out on a clip of one of my GoPros. Only probably with playing a 4k video online, is it takes a while to buffer. Not everyone has 1Gb/s internet speeds haha.


----------



## mhs1014 (Mar 31, 2017)

LightningJR said:


> YES! Success! I found a free encoder that does it! Not to mention it has a basic editor as well (which Handbrake doesn't have) It also seems pretty quick, faster than TMPGEnc.
> 
> XMedia Recode is what it's called, I know, THAT name  Trust me though I went through about 20 different encoders and this was the only free encoder that did the job flawlessly. It has ALL of the advanced options too, a lot of the programs I downloaded didn't.
> 
> ...



Hi!
I've tried this program but it won't let me adjust the resolution to any setting higher than the original. Can you give me any tips as I'm looking to upscale 1080p to 4k due to YouTube compression. Thanks!


----------



## LightningJR (Mar 31, 2017)

mhs1014 said:


> Hi!
> I've tried this program but it won't let me adjust the resolution to any setting higher than the original. Can you give me any tips as I'm looking to upscale 1080p to 4k due to YouTube compression. Thanks!



It's possible that in the newer versions that feature has been removed but i'll check to see if it still work for me.


Edit:
Looked in to it, it does work. It's codec dependent. Change the format to MP4 then go to the Video tab and choose MPEG-4 or MPEG-4 AVC (NVidia NVENC) or even H.265. Once you do that go to the Filters/Preview tab and go to resolution and you should be able to increase the resolution.


----------



## mhs1014 (Mar 31, 2017)

Great thanks, I wonder if it's possible to still download the old version?


----------



## LightningJR (Mar 31, 2017)

mhs1014 said:


> Great thanks, I wonder if it's possible to still download the old version?


I edited my previous post, just look at that.


----------



## hat (Apr 2, 2017)

You could use MeGUI. It's intertwined with AviSynth. If you can use AviSynth, you can do most anything. So upscale a 1920x1080 video, all you'd have to do would be add spline64resize(3840,2160) to the avisynth profile. I've personally done it as a test to see if my roku could handle 4k hevc content by blowing up a much smaller video to 4k.


----------



## mhs1014 (Apr 2, 2017)

hat said:


> You could use MeGUI. It's intertwined with AviSynth. If you can use AviSynth, you can do most anything. So upscale a 1920x1080 video, all you'd have to do would be add spline64resize(3840,2160) to the avisynth profile. I've personally done it as a test to see if my roku could handle 4k hevc content by blowing up a much smaller video to 4k.



Thanks for the tip! I haven't tried AviSynth yet but will definitely bear it in mind. I used Xmedia recode and the first time it outputted in 1080p but I tried a couple more time and I managed to create 4k files, so I'm not entirely sure what I was doing wrong.


----------

