Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th September 2015, 05:29   #1  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
[GUIDE] Best Encoding Settings for YouTube Upload w/ Sony Vegas

Hello folks,

I do not post much here but I have been a member for some time and have used the information in this forum to create this guide for achieving the best quality possible on YouTube.

The premise is that by rendering a video specifically in accordance with the encoding settings suggested by YouTube you get the best quality possible.

Here is an example of difference in quality between my settings and the default Sony Vegas renderer (my settings are hej):



To achieve this one must use the Debugmode Frameserver, MeGUI, AviSynth, and the Nero AAC codec with the following command line: --keyint 30 --bframes 2 --b-adapt 0 --b-pyramid none --weightp 0 --me umh --direct none --no-fast-pskip --scenecut 0

Anyway, the tutorial is in video format and you may find it here if interested:

https://www.youtube.com/watch?v=DWt11kY5fpE

I also have it on a webpage here: http://www.hejyhej.com/render-settings-vegas-youtube/

Additionally I've made comparisons in quality between this method and others so that you may verify that this, indeed, looks better:

http://www.hejyhej.com/youtube-quality-comparison/

Last edited by NyaR; 9th April 2016 at 12:36.
NyaR is offline   Reply With Quote
Old 20th September 2015, 17:34   #2  |  Link
Sp00kyFox
Registered User
 
Sp00kyFox's Avatar
 
Join Date: Aug 2007
Posts: 79
there was a time when youtube wouldn't reencode if the video was encoded with specific settings but this isn't the case anymore. every uploaded clip will be reencoded period. so don't bother with that and just upload it in the best quality you can manage regarding bandwith and encoding time, the rest is up to youtube.
Sp00kyFox is offline   Reply With Quote
Old 22nd September 2015, 07:51   #3  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by Sp00kyFox View Post
there was a time when youtube wouldn't reencode if the video was encoded with specific settings but this isn't the case anymore. every uploaded clip will be reencoded period. so don't bother with that and just upload it in the best quality you can manage regarding bandwith and encoding time, the rest is up to youtube.
Bummer... When did this happen?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 22nd September 2015, 08:26   #4  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
I think they'll accept UT Video Codec. If you got the time and speeds, ofc.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 22nd September 2015, 08:36   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by SeeMoreDigital View Post
Bummer... When did this happen?
It's been several years now. 5, maybe? Just a guess.

My question is, "Why use Sony Vegas at all?" I'm not a gamer but get perfectly good videos using AviSynth and RipBot to create MP4s for upload to YouTube.

And I'm naturally suspicious of anything claiming to be the best.
manono is offline   Reply With Quote
Old 22nd September 2015, 13:17   #6  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 139
Quote:
Originally Posted by manono View Post
It's been several years now. 5, maybe?
I think it's more like 10 years.

Quote:
"Why use Sony Vegas at all?" I'm not a gamer but get perfectly good videos using AviSynth and RipBot to create MP4s for upload to YouTube.
Most importantly - gamers are not programmers. They don't write their own scripts. They don't know anything about avisynth.
They don't know RipBot/MeGUI/Handbrake up to the point someone advertises it in their "best settings guide".
But that's not all. Vegas is very easy to start with.
Even though sony creative software is gonna stop its development, userbase praises this composer:
Quote:
What I like most about Vegas is its ease of use. I work at a community college and regularly deal with students who have never used an NLE in their life. An hour or less with Vegas Pro and they're editing on their own. To the best of my knowledge you can't do that with any other editor.
Basically, it's visual editor with most important features already on board. It's like comparing 3D editor to scripting of 3D image generation. You can make anything with scripts, but it's much easier to do the job in visual editor and see what you get (more or less).

Quote:
And I'm naturally suspicious of anything claiming to be the best.
I'm suspicious too.
In this particular case NyaR:
* uses questionable capture technique (RGB lossless with 1700 Mbps - performance and intermediate file size are far from ideal for regular gamer)
* mentions no video levels issue
* uses 1-pass ABR rendering in x264 with some custom settings (I don't buy --scenecut 0 and --direct none)
* mentions no compatibility issues for different vegas and debugmode frame server
* uses "render loop region only", but doesn't mention it (and doesn't explain loop region thing)
* uses 32-bit project with video levels (it's slower than 8-bit)

Also mediainfo in this youtube explanation has different gop settings (N=72 doesn't correspond to --keyint 30).
Also if you use shadowplay capture or similar TV levels source, it's possible you'll still need to correct levels in vegas.

Last edited by Warperus; 22nd September 2015 at 13:20.
Warperus is offline   Reply With Quote
Old 22nd September 2015, 14:54   #7  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by manono View Post
It's been several years now. 5, maybe? Just a guess.
How odd... I'm sure I recently downloaded a YouTube mp4 contained file and when I ran it through MediaInfo all the x264 meta-data was present. Which would not have been the case if it had been re-encoded
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 22nd September 2015, 16:28   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by SeeMoreDigital View Post
How odd... I'm sure I recently downloaded a YouTube mp4 contained file and when I ran it through MediaInfo all the x264 meta-data was present. Which would not have been the case if it had been re-encoded
They use modified x264 library to re-encode
poisondeathray is offline   Reply With Quote
Old 23rd September 2015, 04:00   #9  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
+1 @Warperus

The only one of OP's points that I agree with is, higher bitrate is good. Encoding artifacts don't re-encode well, so it behooves you to upload a video with as few artifacts as possible.

For a guide that does address the points you mentioned, a group of videographers at the Sony Vegas forum have come up with an excellent guide, (4 years old now) called Sony Vegas to Youtube Tutorial - A Better Method, with "good," "better," and (forgive me) "best" recomendations, depending on your level of interest and commitment.

Also, use 30 or 60 fps where possible.
raffriff42 is offline   Reply With Quote
Old 23rd September 2015, 16:13   #10  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
For extremely difficult content (CGI) it may be necessary to sacrifice quality before uploading to YT - i.e. compress in similar way as YT doing so more or less YT encoder accepting outcome.
Going for insane, long time compression setting is pure waste of time and electricity - unless you can gain some time (your upload speed is slower than encoding speed).

I recommend to read this thread: http://forum.videohelp.com/threads/3...very-5-seconds

User/uploader is not capable to control YT encoder settings.
pandy is offline   Reply With Quote
Old 13th October 2015, 10:33   #11  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Does youtube convert all videos to YV12?
I'm planning to upload YV24 gameplay footage to Youtube.
bxyhxyh is offline   Reply With Quote
Old 13th October 2015, 13:13   #12  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 139
Does youtube convert all videos to YV12?
yes

I'm planning to upload YV24 gameplay footage to Youtube.
It's not a problem unless you concentrate on pixel-size lines like small characters in chat, but chat has to be enlarged anyway if you want it to be readable in realtime.
Warperus is offline   Reply With Quote
Old 15th October 2015, 18:47   #13  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Thank you

Last edited by bxyhxyh; 15th October 2015 at 18:51.
bxyhxyh is offline   Reply With Quote
Old 16th October 2015, 11:53   #14  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
Quote:
Originally Posted by Sp00kyFox View Post
every uploaded clip will be reencoded period. so don't bother with that
This is true, every clip gets re-encoded. However, when rendered with h264 rather than AVC the clip gets processed by YouTube very quickly. A 2 minute video will be finished encoding and available in 1080p in 2 minutes.

Quote:
Originally Posted by manono View Post
Why use Sony Vegas at all?
I tend to do videos, frag films mostly, that have heavy editing and match frags up with music. Or stuff with commentary.

Quote:
Originally Posted by manono View Post
And I'm naturally suspicious of anything claiming to be the best.
Well, so am I... When I started using Sony Vegas after Blender my video quality went way down and my colors were messed up. I watched a bunch of "best" videos and they were all absolute BS. So I did a lot of research and I came up with my own solution, then after a year of back and forth with people I finalized that solution into what you see here. And if there is a way to improve this even further I am absolutely eager to hear it.

Quote:
Originally Posted by Warperus View Post
I think it's more like 10 years.
* uses questionable capture technique (RGB lossless with 1700 Mbps - performance and intermediate file size are far from ideal for regular gamer)
I actually use lossy h264 AMD APP hardware accelerated encoding with Action! and Bandicam for my gameplay captures. However there are visible artifacts in those recording without any re-encoding. For testing purposes only I used RGB lossless, so that I could see specifically the difference in encoding techniques. That is the only time I used RGB lossless.


Quote:
Originally Posted by Warperus View Post
* mentions no compatibility issues for different vegas and debugmode frame server
I do not know of any compatibility issues. Care to enlighten?


Quote:
Originally Posted by Warperus View Post
* mentions no video levels issue
I don't understand what you mean. Are you talking about the video colors? I've found that the colors with this method are much more true than any other I've tried.

Quote:
Originally Posted by Warperus View Post
I don't buy --scenecut 0 and --direct none)
As I understand --scenecut 0 is required if I want the renderer to respect a custom keyint value, otherwise it will change it if a scene change dictates so. As I want the video to match YouTube's stuff I do not want scene changes dictating things. Learned in this thread: http://forum.doom9.org/showthread.php?t=167216

--direct none disables b-frame prediction, it is set in MeGUI under MV Prediction Mod under Analysis tab.

Quote:
Originally Posted by Warperus View Post
* uses "render loop region only", but doesn't mention it (and doesn't explain loop region thing)
This is a tutorial for render settings, not a tutorial for Sony Vegas basics, so I must stay on point to keep it concise rather than explaining what every function does.


Quote:
Originally Posted by Warperus View Post
* uses 32-bit project with video levels (it's slower than 8-bit)
My previous settings, 1 year ago, used 8bit and had some messed up video colors. By switching to 32bit video levels that was fixed. The output file, after megui process, is 8bit but with colors that look like the original video.


Quote:
Originally Posted by Warperus View Post
Also mediainfo in this youtube explanation has different gop settings (N=72 doesn't correspond to --keyint 30).
Ah, damn . Do you know a way I can force the keyint to be 30? That is why I set scenecut and direct none. I really would like to know how to make it do what I want, then I could put out a quick update to fix it.

Thank you for your replies. I hope I have addressed your concerns regarding this method. Perhaps --scenecut and --direct none are unnecessary as the video output is not respecting the bframes I have set anyway Can anyone suggest an alternate solution to force the output to respect the bframes set? Thank you once again.

Last edited by NyaR; 16th October 2015 at 11:56.
NyaR is offline   Reply With Quote
Old 16th October 2015, 12:35   #15  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
Hah! I figured it out!

GOP Calculation has to be set to Fixed rather than FPS Based (frame-type tab) for keyint to stick.

What a silly oversight.

Unfortunately I do not know how to verify this as mediainfo does not give an N= value with the new setting. The presets have been updated.
NyaR is offline   Reply With Quote
Old 19th October 2015, 11:38   #16  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 139
Quote:
Originally Posted by NyaR View Post
I actually use lossy h264 AMD APP hardware accelerated encoding with Action! and Bandicam for my gameplay captures. However there are visible artifacts in those recording without any re-encoding. For testing purposes only I used RGB lossless, so that I could see specifically the difference in encoding techniques. That is the only time I used RGB lossless.
...
I don't understand what you mean. Are you talking about the video colors? I've found that the colors with this method are much more true than any other I've tried.
Unfortunately, Vegas can handle different input sources differently. Vegas uses 8-bit or 32-bit sRGB for internal processing (studio levels or computer levels), so every YUV input is converted by Vegas and/or vfw filters.
It is important to stick to some input source variant or take a look at different options (and tweak guide accordingly).
From what I know, avi/lossless RGB uses vfw direct conversion and mp4/h264 uses vegas-integrated mainconcept avc decoder.
And it can become BT.601/BT.709 mess for avi/h264 sources (depends on OS, installed filters, capture software etc.).
Please take a look at this paper and make some further experiments:
http://www.glennchan.info/articles/v...s-9-levels.htm


Quote:
Originally Posted by NyaR View Post
I do not know of any compatibility issues. Care to enlighten?
In short, it's written in frameserver page.
http://www.debugmode.com/frameserver/
If you use Vegas Pro 13+: Get Frameserver 2.15.
Everyone else : Get Frameserver 2.14.

As far as I remember, you recommended one version in your guide.

Quote:
This is a tutorial for render settings, not a tutorial for Sony Vegas basics, so I must stay on point to keep it concise rather than explaining what every function does.
As far as this checkbox is promptly shown in guide video, people can follow this video directly, and not knowing loop region but setting the checkbox they will step into the trap "my video is empty"
http://www.tomsguide.com/answers/id-...er-videos.html

Quote:
Do you know a way I can force the keyint to be 30? That is why I set scenecut and direct none. I really would like to know how to make it do what I want, then I could put out a quick update to fix it.
As far as I know, min-keyint + keyint are more than enough for every purpose. Besides, I strongly belive that scenecut is here for the purpose and we should not disable it. Youtube will not follow scenecut settings anyway, all we can do is deliver good enough quality.

Speaking of wich, I use 8-bit projects, load ShadowPlay FullHD@60p captures directly into Vegas, disable resample and render in Mainconcept AVC Internet HD 1080p with tweaked bitrate (20M average, 30M max) and fps (double NTSC) using CPU only render. Works ok for me. Processing times can be not perfect, but it works for me.
Warperus is offline   Reply With Quote
Old 12th March 2016, 08:53   #17  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Why youtube resizes the videos vertically?
I've uploaded 832x720 60 Hz clip, but youtube resized it to 822x720 60 Hz.
This one. https://www.youtube.com/watch?v=mAEk1K23eog
bxyhxyh is offline   Reply With Quote
Old 3rd April 2016, 23:53   #18  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
Quote:
Originally Posted by bxyhxyh View Post
Why youtube resizes the videos vertically?
I've uploaded 832x720 60 Hz clip, but youtube resized it to 822x720 60 Hz.
This one. https://www.youtube.com/watch?v=mAEk1K23eog
You should resize it to a 16:9 resolution.

https://support.google.com/youtube/answer/1722171

look at the bottom resolutions dropdown
NyaR is offline   Reply With Quote
Old 4th April 2016, 17:41   #19  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
It says this.
Quote:
If you're uploading a non-16:9 file, it will be processed and displayed correctly as well, with pillar boxes
880x720 works ok, 832x720 is resized.
It seems youtube is doing something different from just re-encoding and playing it in the center of player.

Last edited by bxyhxyh; 4th April 2016 at 17:50.
bxyhxyh is offline   Reply With Quote
Old 9th April 2016, 12:35   #20  |  Link
NyaR
Registered User
 
Join Date: Nov 2012
Posts: 10
Quote:
Originally Posted by bxyhxyh View Post
It says this.
880x720 works ok, 832x720 is resized.
It seems youtube is doing something different from just re-encoding and playing it in the center of player.
those aren't 16:9 resolutions..

16/9 = 1.777777777777778
1920/1080 = 1.777777777777778

880/720 = 1.222222222222222
832/720 = 1.155555555555556


I again advise that you render in a 16:9 resolution.
NyaR is offline   Reply With Quote
Reply

Tags
debugmode frameserver, h.264, megui, sony vegas, youtube

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.