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 16th December 2008, 20:11   #1  |  Link
StreamRipper
Media Stream Ripping Pro
 
Join Date: Jun 2006
Location: Streaming media recording world
Posts: 28
x264 settings to get Higher Quality videos on YouTube

I've been trying to get Higher Quality videos on youtube.

Of course most people are not smart enough to use &fmt=22 or other variable in the URL (see the following forum thread to learn the details http://stream-recorder.com/forum/wat...ube-t3086.html)

I've used x264vfw (Build date Nov 25, 2008). The problem is that we do screen capture using Camtasia and other software to produce video tutorials. Here they are
http://www.youtube.com/user/appliantechnologies

The picture is not very dynamic, so the bit-rate is pretty low. And YouTube requires a bit-rate of 800 kbps and higher.

I've started using Single Pass encoding Ratefactor based with Ratefactor=1. I've also changed Min QP, Max QP and Max QP step equal to 1 and disabled CABAC.

Adaptive DCT is turned off, because otherwise YouTube videos have pretty weird artifacts.

I use 640x480 videos as recommended.

After using these setting I've managed to increase bit-rate to about 800. But I still can't get it high enough for some videos.
I'm not very good at these I,P,B frames, CABAC, Trellis and other things. Could you please suggest me the best settings to get the bit-rate of 800+ kbps for the video tutorials? Thank you very much in advance!
StreamRipper is offline   Reply With Quote
Old 16th December 2008, 20:43   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
I'm pretty sure at this point in time that there's no way to bypass Youtube's re-encoding process. If you want to be able to upload without your videos being re-encoded, you can either host it yourself like I do or use one of the sites that allows it (example: Zoome).
Dark Shikari is offline   Reply With Quote
Old 16th December 2008, 22:26   #3  |  Link
cogman
The Crazy Idahoan
 
Join Date: Jun 2007
Location: Idaho
Posts: 249
Dark, I thought I read somewhere that if you have the right settings youtube won't re-encode (they are craptastic settings).

All in all, though, I agree. Probably the best way to get the highest quality from youtubes encoder is to send them a denoised, raw (IE Lossless) video. After that, you pray to the gods that your video is easily encoded by their encoder.
cogman is offline   Reply With Quote
Old 16th December 2008, 22:29   #4  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by cogman View Post
Dark, I thought I read somewhere that if you have the right settings youtube won't re-encode (they are craptastic settings).
That was back with FLV1 (not H.264) and they patched that hole because of abuse, AFAIK.
Dark Shikari is offline   Reply With Quote
Old 17th December 2008, 08:38   #5  |  Link
StreamRipper
Media Stream Ripping Pro
 
Join Date: Jun 2006
Location: Streaming media recording world
Posts: 28
I don't mind to get the video re-encoded. The problem is that when you send a low bit-rate video even if it looks really amazing, the Higher quality option doesn't appear. So I just need the proper settings for x264 to increase bit-rate. Is there anything you can suggest about it?
StreamRipper is offline   Reply With Quote
Old 17th December 2008, 09:30   #6  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by StreamRipper View Post
I don't mind to get the video re-encoded. The problem is that when you send a low bit-rate video even if it looks really amazing, the Higher quality option doesn't appear. So I just need the proper settings for x264 to increase bit-rate. Is there anything you can suggest about it?
Try some other codec (huffyuv, perhaps) and complain to Google/Youtube about the bitrate limit.
nm is offline   Reply With Quote
Old 17th December 2008, 11:58   #7  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Use ABR.

If that doesn't help, force more I-frames by reducing the keyframe interval. For static content, that will drive the bitrate up proportionally.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 19th January 2009, 23:42   #8  |  Link
StreamRipper
Media Stream Ripping Pro
 
Join Date: Jun 2006
Location: Streaming media recording world
Posts: 28
ABR didn't seem to help.

I didn't know how to force more I-frames, so I did the following changes in the settings:
Min GOP size=5
Max GOP size=25
Scenecut threshold=10
Adaptive DCT=off
CABAC=off
MinQP=1
MaxQP=1
MaxQP step=1
QP factor between I and P = 1.40
StreamRipper is offline   Reply With Quote
Old 20th January 2009, 00:51   #9  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 303
I believe the higher quality option is based on your video resolution, not the bitrate

Help link: http://help.youtube.com/support/yout...50&topic=16612

I also agree with Dark Shikari, that was FLV and the hole has been patched

Last edited by Aktan; 20th January 2009 at 00:56.
Aktan is offline   Reply With Quote
Old 20th January 2009, 00:54   #10  |  Link
imk
|ン、)
 
imk's Avatar
 
Join Date: Feb 2008
Posts: 77
I find that uploading a ridiculously high quality source at 1080p will result in a better looking re-encoded video.

I did a test just yesterday. I uploaded two videos that were of a high quality source (http://imk.cx/videos/files/uploaded1080source.png).One was 720p and the other was 1080p.

These were the results:

720


1080



Both versions look pretty terrible in their final rendition, but the one that came from a 1080p source retains more detail throughout the scene.


(The videos were resized to 854x479 because that's the resolution YouTube plays the video at when in the browser window and not full screen.)
imk is offline   Reply With Quote
Old 20th January 2009, 01:02   #11  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 303
Also note, x264 lossless currently isn't supported since YouTube's decoder doesn't decode it correctly currently
Aktan is offline   Reply With Quote
Old 20th January 2009, 15:07   #12  |  Link
Trahald
Wewkiee
 
Trahald's Avatar
 
Join Date: Feb 2002
Location: kashyyyk
Posts: 2,269
ive only ever gotten 2-pass encodes to display the 'watch in HD' link. i use a bitrate over 1k and set level to 5.0. these are videos with isolated motion as well.
__________________
...yeah...but...why on earth would I compare apples with apples?
Trahald is offline   Reply With Quote
Old 21st January 2009, 01:22   #13  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
Re: lossless not supported by Youtube's decoder: (they haven't implemented the standard then ) Use a q value more than 0 (you can use decimal IIRC) and that means it won't be lossless.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Old 21st January 2009, 01:27   #14  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Inventive Software View Post
Re: lossless not supported by Youtube's decoder: (they haven't implemented the standard then )
They use mencoder for encoding--they just haven't updated to a recent version.
Dark Shikari is offline   Reply With Quote
Old 26th April 2009, 02:04   #15  |  Link
zilog jones
Registered User
 
zilog jones's Avatar
 
Join Date: Mar 2004
Location: Ireland
Posts: 481
I've been doing some testing with YouTube uploads recently and the whole system seems a mess. I'm trying to upload HQ non-SD videos, which are now 640x480 for 4:3 or 854x480 (not sure if right) for 16:9 (&fmt=35). I'm using the 1-pass CQ HQ x264 preset and MKV on MeGUI with pretty good results, giving around 3-4Mbit/s. However I've noticed some weird things:

- It will encode at other aspect ratios with a height of 480. I've gave it a 732x480 video and the result was 736x480 (guess it only likes mod 8 or mod 16), and 676x556 became 592x480.
- x264 lossless still doesn't work right
- I might be getting the same problem as imk was with his HD uploads - if I upload at somethingx480 the result looks quite bad, almost like vertical resolution has been halved (even though it's still 480). But if I upload at a higher resolution e.g. 768x576 (as my source is PAL anyway), the 640x480 output looks significantly better. I thought doing my own resizing (using lanczos4) would be better but I am clearly wrong! This poses an annoying problem with NTSC sourced material - anyone had better luck with 480 line uploads?

I have to say, the technical support at YouTube regarding encoding for uploading leaves a lot to be desired. The website mentions MKV support nowhere, and it says very little regarding how to achieve best results.
zilog jones is offline   Reply With Quote
Old 26th April 2009, 14:40   #16  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 303
Quote:
Originally Posted by zilog jones View Post
- I might be getting the same problem as imk was with his HD uploads - if I upload at somethingx480 the result looks quite bad, almost like vertical resolution has been halved (even though it's still 480). But if I upload at a higher resolution e.g. 768x576 (as my source is PAL anyway), the 640x480 output looks significantly better. I thought doing my own resizing (using lanczos4) would be better but I am clearly wrong! This poses an annoying problem with NTSC sourced material - anyone had better luck with 480 line uploads?
Yep, I just encountered this. I recently uploaded a 720x480 clip with the 4:3 flag and found that the vertical resolution seemed to been halved even if the FLV is still at the 640x480 res. I see jags everywhere
Aktan is offline   Reply With Quote
Old 26th April 2009, 17:30   #17  |  Link
zilog jones
Registered User
 
zilog jones's Avatar
 
Join Date: Mar 2004
Location: Ireland
Posts: 481
My solutions to that so far are to either crop 8 pixels vertically (it will render at whatever x 472 fine) or just upscale to 720 - or maybe even double the resolution!
zilog jones is offline   Reply With Quote
Old 26th April 2009, 20:19   #18  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by imk View Post
I find that uploading a ridiculously high quality source at 1080p will result in a better looking re-encoded video.

I did a test just yesterday. I uploaded two videos that were of a high quality source. One was 720p and the other was 1080p.
I'd think that a great 720p and a great 1080p would come out looking pretty similar when scaled to 720p. If anything, coming in with a source they don't have to scale would eliminate the risk of them using a sub-optimal resolution.

I regret that YouTube has sent the whole UGC industry off in the wrong direction. On modern systems, we're generally more limited by upstream bandwidth than CPU speed. And pretty much by definition, you already can decode the file you're trying to upload on the machine you're uploading from.

Most users would have had a better experience if YouTube provided a lightweight local client transcoding software that could validate already compatible streams.

I wonder how much of their huge losses come from having to provision all the CPU power for server-side transcoding, including cooling, etcetera...
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 26th April 2009, 23:49   #19  |  Link
Yoshiyuki Blade
Novice x264 User
 
Yoshiyuki Blade's Avatar
 
Join Date: Dec 2006
Location: California
Posts: 169
Yeah, it would be nice for us video junkies to use our own time/CPU power to encode our videos. The end results would be much more efficient because we will know exactly when our transcoding will finish.

Right now, if I wanted to upload some gameplay videos that i FRAPS'ed, I'll have to transcode it anyway because it would be a waste of time to upload gigabytes of data that'll be butchered to hell. So it ends up being Source -> medium bitrate video -> upload -> youtube encode butchering -> done. It'd be nice to have Source -> low bitrate, youtube compliant video -> upload -> done.
__________________
"I'll take a potato chip... and eat it!"

Last edited by Yoshiyuki Blade; 26th April 2009 at 23:55.
Yoshiyuki Blade is offline   Reply With Quote
Old 29th April 2009, 12:58   #20  |  Link
chaynik
Registered User
 
Join Date: May 2002
Location: Los Angeles
Posts: 88
I've had great luck uploading FFV1 (ffmpeg's implementation of huffyuv) to youtube. Unlike huffyuv, ffv1 supports the 4:2:0 colorspace (native to h264, mpeg4, mpeg2, etc) and has some adaptive routines to further shrink down the size while remaining lossless. Perfect intermediate IMO for youtube uploads.
chaynik is offline   Reply With Quote
Reply

Tags
x264 for youtube, youtube, youtube higher quality, youtube hq videos

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 17:07.


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