Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T20:48:15.590Z
Answers.Text: 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.
Answers.UserDisplayName: And G
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T20:50:37.710Z
Answers.Text: I am assuming that at 800kbit your flv files show quite some compression artifacts. The problem is that these are not well "compressible"...
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T20:54:31.443Z
Answers.Text: 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.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T20:58:27.680Z
Answers.Text: 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
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:00:30.820Z
Answers.Text: 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.
Answers.UserDisplayName: And G
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:03:25.960Z
Answers.Text: 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.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:06:05.997Z
Answers.Text: Out of curiosity, what kind of footage are you dealing with that is 50 days long???
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:13:05.040Z
Answers.Text: 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.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:22:17.167Z
Answers.Text: 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.
Answers.UserDisplayName: And G
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:23:12.967Z
Answers.Text: If it kills all detail, then you used too much of it ;)
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T21:24:35.463Z
Answers.Text: Also, deblocking is not the same as denoising.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-15T19:28:52.607Z
Answers.LastActivityDate: 2016-03-15T19:28:52.607Z
Answers.UserDisplayName: Hans Meiser
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-15T19:23:00.223Z
Comments.Text: 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.
Comments.UserDisplayName: Gyan
Tags: <video-quality><encoding><youtube><h.264>
Title: How to prevent lossy re-encode of low-bitrate videos uploaded to YouTube
UserDisplayName: And G
ThreadText: # 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.  
  
  ---
  
  