<p>Youtube applies different maximum bitrates to different HD formats. A lot of people these days upscale their original 1080p HD content to 4k, since youtube allows higher datarate for 4k. Probably the same applies to 720p vs. 1080p, you should check. In general, you can optimize a video a lot so the same bitrate encoding will result in better quality, mainly by denoising it beforehand - or in you case, deblocking. I don't know if you are aquainted with AviSynth etc. but there are a couple of deblocking filters for it which might come in handy. From my experience there is no big difference if uploading a h264 with a high bitrate (like 25Mbps) or a ProRes file, after Youtube recompression quality is the same.</p>

CC BY-SA 3.0
2016-03-15T20:48:15.590Z
Could you expand a bit on the denoising & deblocking bit? In particular, Avidemux handles denoising with filters and I have no idea which of the 7 denoising filters to use, and if the denoising filter should be loaded before or after other filters like resampling and sharpening for the best quality/bitrate.

Edit: Wait, I see only 3 of those filters seem to actually be denoising filters; "FluxSmooth", "Mplayer Denoise 3D" and "Mplayer Denoise 3D HQ". The HQ filter has the most options but I don't know what those options do.
And G
CC BY-SA 3.0
2016-03-15T20:50:37.710Z
I am assuming that at 800kbit your flv files show quite some compression artifacts. The problem is that these are not well "compressible"...
Hans Meiser
CC BY-SA 3.0
2016-03-15T20:54:31.443Z
I'm general, technical noise (imagine all possible values of a signal in random order) is not well compressible since same values rarely happen in succession and therefore cannot be reduced well. So denoising a video works wonders in terms of getting a better result. H264 does denoising in general during compression, so I guess noise will not be the problem in your clips but rather the compression artifacts.
Hans Meiser
CC BY-SA 3.0
2016-03-15T20:58:27.680Z
Generally speaking the best denoisers use a wavelet algorithm, so check if one of the denoisers that come with avidemux uses that technology (if your clips have noise) - as for deblocking maybe do some tests with this filter: http://www.compression.ru/video/deblocking/index_en.html
Hans Meiser
CC BY-SA 3.0
2016-03-15T21:00:30.820Z
Well the original videos actually don't have many compression artefacts; after all 800 Kbps is quite good for 480x270. For reference, YouTube suggests 300-700 Kbps for 240p.
And G
CC BY-SA 3.0
2016-03-15T21:03:25.960Z
Ah OK, missed the framesize you where dealing with. Still, deblocking might do some good to counter the blockiness resulting from the upscaling, just give it a try.
Hans Meiser
CC BY-SA 3.0
2016-03-15T21:06:05.997Z
Out of curiosity, what kind of footage are you dealing with that is 50 days long???
Hans Meiser
CC BY-SA 3.0
2016-03-15T21:13:05.040Z
BTW given the amount of transcoding you are looking forward to, I'd research if there are decent gpu accelerated tools nowadays. I am not on Windows for quite some time anymore so I kind of lost track with the stuff that's going on there.
Hans Meiser
CC BY-SA 3.0
2016-03-15T21:22:17.167Z
Well, I've got 6 cores à 4 GHz and Avidemux is very good at using all of them, so I'm fine in that regard. The videos are a couple hundred football matches, and I just discovered that denoising makes the grass look a solid green, so I'll do without.
And G
CC BY-SA 3.0
2016-03-15T21:23:12.967Z
If it kills all detail, then you used too much of it ;)
Hans Meiser
CC BY-SA 3.0
2016-03-15T21:24:35.463Z
Also, deblocking is not the same as denoising.
Hans Meiser
CC BY-SA 3.0
2016-03-15T19:28:52.607Z
2016-03-15T19:28:52.607Z
Hans Meiser
<p>I have a huge number of low-res Flash videos (480x270, 30 fps, 800 Kbps) and I want to resample all those videos in 1280x720 with some added spatial sharpening and lomo filters to make them look nicer. I intend to store these larger videos on a HDD and also upload them on YouTube.</p>

<p>The total running time of the videos is around 50 days, so I'm not going to use a lossless codec. I experimented a bit and found that anything over 2 Mbps (H.264) didn't result in a noticeable increase in visual quality, which isn't surprising considering the tiny original resolution. 50 days at 2 Mbps is about 1 TB which would be great.</p>

<p>The problem is that YouTube seems hell-bent on re-encoding anything that is being uploaded regardless of the actual bitrate, so even though the local 1280x720 videos look great the uploaded 1280x720 videos look awful. I found some official <a href="https://support.google.com/youtube/answer/1722171?hl=en" rel="nofollow">recommended upload encoding settings</a> but using those settings still results in compression artefacts.</p>

<p>How can I avoid the artefacts from YouTube's lossy re-encode without uploading videos of a significantly higher bitrate?</p>

<p>(I'm currently using Avidemux for resampling/re-encoding but from what I've read most people use Handbrake or MeGUI; should I switch or is Avidemux fine for my purposes?)</p>

CC BY-SA 3.0
2016-03-15T19:23:00.223Z
Youtube will necessarily transcode everything you upload. Before wasting a lot of time trying out different H.264 bitrates and encoding flags, transcode one of the clips to 720p using a lossless codec and upload that. See how much difference does make that on Youtube. That will set the ceiling on what you can expect.
Gyan
<video-quality><encoding><youtube><h.264>
How to prevent lossy re-encode of low-bitrate videos uploaded to YouTube
And G
# How to prevent lossy re-encode of low-bitrate videos uploaded to YouTube

(Asked by: username_0 on 2016-03-15)

I have a huge number of low-res Flash videos (480x270, 30 fps, 800 Kbps) and I want to resample all those videos in 1280x720 with some added spatial sharpening and lomo filters to make them look nicer. I intend to store these larger videos on a HDD and also upload them on YouTube.

The total running time of the videos is around 50 days, so I'm not going to use a lossless codec. I experimented a bit and found that anything over 2 Mbps (H.264) didn't result in a noticeable increase in visual quality, which isn't surprising considering the tiny original resolution. 50 days at 2 Mbps is about 1 TB which would be great.

The problem is that YouTube seems hell-bent on re-encoding anything that is being uploaded regardless of the actual bitrate, so even though the local 1280x720 videos look great the uploaded 1280x720 videos look awful. I found some official [recommended upload encoding settings](https://support.google.com/youtube/answer/1722171?hl=en) but using those settings still results in compression artefacts.

How can I avoid the artefacts from YouTube's lossy re-encode without uploading videos of a significantly higher bitrate?

(I'm currently using Avidemux for resampling/re-encoding but from what I've read most people use Handbrake or MeGUI; should I switch or is Avidemux fine for my purposes?)

**Tags:** video-quality, encoding, youtube, h.264

> **Comments:**
> **username_1**: Youtube will necessarily transcode everything you upload. Before wasting a lot of time trying out different H.264 bitrates and encoding flags, transcode one of the clips to 720p using a lossless codec and upload that. See how much difference does make that on Youtube. That will set the ceiling on what you can expect.  

---

## 1 answers

### Answer by username_2 on 2016-03-15. Score: 1

Youtube applies different maximum bitrates to different HD formats. A lot of people these days upscale their original 1080p HD content to 4k, since youtube allows higher datarate for 4k. Probably the same applies to 720p vs. 1080p, you should check. In general, you can optimize a video a lot so the same bitrate encoding will result in better quality, mainly by denoising it beforehand - or in you case, deblocking. I don't know if you are aquainted with AviSynth etc. but there are a couple of deblocking filters for it which might come in handy. From my experience there is no big difference if uploading a h264 with a high bitrate (like 25Mbps) or a ProRes file, after Youtube recompression quality is the same.

> **Comments:**
> **username_0**: Could you expand a bit on the denoising & deblocking bit? In particular, Avidemux handles denoising with filters and I have no idea which of the 7 denoising filters to use, and if the denoising filter should be loaded before or after other filters like resampling and sharpening for the best quality/bitrate.  Edit: Wait, I see only 3 of those filters seem to actually be denoising filters; "FluxSmooth", "Mplayer Denoise 3D" and "Mplayer Denoise 3D HQ". The HQ filter has the most options but I don't know what those options do.  
> **username_2**: I am assuming that at 800kbit your flv files show quite some compression artifacts. The problem is that these are not well "compressible"...  
> **username_2**: I'm general, technical noise (imagine all possible values of a signal in random order) is not well compressible since same values rarely happen in succession and therefore cannot be reduced well. So denoising a video works wonders in terms of getting a better result. H264 does denoising in general during compression, so I guess noise will not be the problem in your clips but rather the compression artifacts.  
> **username_2**: Generally speaking the best denoisers use a wavelet algorithm, so check if one of the denoisers that come with avidemux uses that technology (if your clips have noise) - as for deblocking maybe do some tests with this filter: http://www.compression.ru/video/deblocking/index_en.html  
> **username_0**: Well the original videos actually don't have many compression artefacts; after all 800 Kbps is quite good for 480x270. For reference, YouTube suggests 300-700 Kbps for 240p.  
> **username_2**: Ah OK, missed the framesize you where dealing with. Still, deblocking might do some good to counter the blockiness resulting from the upscaling, just give it a try.  
> **username_2**: Out of curiosity, what kind of footage are you dealing with that is 50 days long???  
> **username_2**: BTW given the amount of transcoding you are looking forward to, I'd research if there are decent gpu accelerated tools nowadays. I am not on Windows for quite some time anymore so I kind of lost track with the stuff that's going on there.  
> **username_0**: Well, I've got 6 cores à 4 GHz and Avidemux is very good at using all of them, so I'm fine in that regard. The videos are a couple hundred football matches, and I just discovered that denoising makes the grass look a solid green, so I'll do without.  
> **username_2**: If it kills all detail, then you used too much of it ;)  
> **username_2**: Also, deblocking is not the same as denoising.  

---

