Low quality when uploaded to youtube

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Low quality when uploaded to youtube

Postby Refiu » Sat Dec 19, 2009 10:42 am

Hello everyone. I'm having some technical problems. I downloaded footage from the net, it's AVI and MKV files (ripped from a blu-ray so the quality is excellent). I followed each instruction, used AviSynth and VirtualDub to convert it to Lagarith, put the clips together in Vegas and rendered it with Lagarith as well. Then, I converted the file to mp4 (the quality still looked awesome) because I wanted to upload it to youtube and several other streaming sites. Once it's uploaded, the quality just sucks. I even tried avi xvid and wmv and it still sucks. I know youtube kills quality, I've uploaded million times before with different codecs, but this was way too much; considering I used a lossless codec, I was hoping I'd get a decent quality. And like I said, I used to upload vids to streaming sites before using different codecs, and it was never this terrible. So, I'm guessing it has something to do with Lagarith. I have missed some steps, haven't I?
Refiu
 
Joined: 19 Dec 2009

Re: Low quality when uploaded to youtube

Postby Minimoto » Sat Dec 19, 2009 11:56 am

First of all, don't download your footage from the net and buy the DVDs?
Image

Robert F. Young wrote:Day Before Yesterday I saw a rabbit, yesterday a deer, today you.
User avatar
Minimoto
 
Joined: 16 Oct 2008
Location: Wherever I smell good food!
Status: Trying to Live

Re: Low quality when uploaded to youtube

Postby Refiu » Sat Dec 19, 2009 12:14 pm

Minimoto wrote:First of all, don't download your footage from the net and buy the DVDs?


Needn't even say it. I'm a kind of a person that buys both DVDs and especially music CDs just to support the creators and further production rather than protocol, but if I can't find it, I'll download it. And second?
Refiu
 
Joined: 19 Dec 2009

Re: Low quality when uploaded to youtube

Postby NeoQuixotic » Sat Dec 19, 2009 6:35 pm

Another issue with YouTube and other sites is they change the way they encode things randomly. I used to be able to encode H.264 MP4s to the specs that YouTube used and it wouldn't even be re-encoded, but they now re-encode everything. They also seem to now encode everything to 29.97 or even 30 fps. So your 23.976, 24, 25, etc will no longer be encoded in its native frame rate. Now I haven't really seen the video to play visually different, but it's still annoying. Other times it keeps the native frame rate, makes it some random non-standard rate, or even a variable frame rate. Vimeo also converts everything to 24 fps last time I heard. Google uses or at least used to use ffmpeg, x264, and other open source tools for their encoding, so quality issues might change when they update their tools too. I can't complain too much being that YouTube is free and offers 1080p now.

Here is a little breakdown of the bitrates YouTube uses (H.264/AAC):
1080p • Video ~3800 Kbps | Audio ~125 Kbps | MP4 container
720p • Video ~2200 Kbps | Audio ~125 Kbps | MP4 container
480p HQ • Video ~850 Kbps | Audio ~125 Kbps | FLV container
480p LQ • Video ~450 Kbps | Audio ~125 Kbps | FLV container
270p • Video ~375 Kbps | Audio ~125 Kbps | MP4 container

These bitrates are decent, but with high motion or very detailed video it isn't so pretty. All the MP4 container encodes report as a variable bitrate, so assuming YouTube's encoding does any sort of analysis it should help a bit. I've also seen the bitrates vary depending on length and sometimes just randomly. Now we have no control over how the video gets re-encoded on YouTube or elsewhere, but we can try to upload the highest quality file possible. The ideal situation would be to upload a lossless version. However, the issue is the file size is generally way too big to upload, especially when 720p or higher. I also wouldn't expect sites to be able to convert a lossless format. YouTube does work with huffyuv, but not lagarith. I also tried lossless x264 and it encoded, but was screwed up. My solution was to use a constant quantizer or constant quality mode in x264. I found using x264 with CRF 18 (modifed from MeGUI "Unrestricted 1Pass MaxSpeed" profile) to give a decent file size and excellent quality; also it encodes very fast.
Insert clever text/image here.
User avatar
NeoQuixotic
Master Procrastinator
 
Joined: 01 May 2001
Location: St. Louis Park, MN
Status: I haz job!

Re: Low quality when uploaded to youtube

Postby Refiu » Sun Dec 20, 2009 6:23 am

NeoQuixotic wrote:Another issue with YouTube and other sites is they change the way they encode things randomly. I used to be able to encode H.264 MP4s to the specs that YouTube used and it wouldn't even be re-encoded, but they now re-encode everything. They also seem to now encode everything to 29.97 or even 30 fps. So your 23.976, 24, 25, etc will no longer be encoded in its native frame rate. Now I haven't really seen the video to play visually different, but it's still annoying. Other times it keeps the native frame rate, makes it some random non-standard rate, or even a variable frame rate. Vimeo also converts everything to 24 fps last time I heard. Google uses or at least used to use ffmpeg, x264, and other open source tools for their encoding, so quality issues might change when they update their tools too. I can't complain too much being that YouTube is free and offers 1080p now.

Here is a little breakdown of the bitrates YouTube uses (H.264/AAC):
1080p • Video ~3800 Kbps | Audio ~125 Kbps | MP4 container
720p • Video ~2200 Kbps | Audio ~125 Kbps | MP4 container
480p HQ • Video ~850 Kbps | Audio ~125 Kbps | FLV container
480p LQ • Video ~450 Kbps | Audio ~125 Kbps | FLV container
270p • Video ~375 Kbps | Audio ~125 Kbps | MP4 container

These bitrates are decent, but with high motion or very detailed video it isn't so pretty. All the MP4 container encodes report as a variable bitrate, so assuming YouTube's encoding does any sort of analysis it should help a bit. I've also seen the bitrates vary depending on length and sometimes just randomly. Now we have no control over how the video gets re-encoded on YouTube or elsewhere, but we can try to upload the highest quality file possible. The ideal situation would be to upload a lossless version. However, the issue is the file size is generally way too big to upload, especially when 720p or higher. I also wouldn't expect sites to be able to convert a lossless format. YouTube does work with huffyuv, but not lagarith. I also tried lossless x264 and it encoded, but was screwed up. My solution was to use a constant quantizer or constant quality mode in x264. I found using x264 with CRF 18 (modifed from MeGUI "Unrestricted 1Pass MaxSpeed" profile) to give a decent file size and excellent quality; also it encodes very fast.


Yes, I was thinking about uploading a lossless verson, a huffy one, but given the size, just no. It's way beyond the limit. Anyways, I've just tried using MeGUI, however with another preset and... wow. It drastically improves the quality, just the way I wanted it. Now I'll just play around with encoder settings a little bit more, trying those you suggested. Thanks you so much for your time and for helping me out. I'd never be able to figure this out on my own.
Refiu
 
Joined: 19 Dec 2009

Re: Low quality when uploaded to youtube

Postby Revenant Death » Sun Dec 20, 2009 5:21 pm

I don't know all that much about YouTube, but I'm pretty sure their FLV container encodes use the Sorenson codec...or some other H263/4 variant...or at least they did. I tend to use On2's VP6 and 7 codecs whenever possible with FLV, much better encoding overall.

Regardless though, if they're automatically reencoding all the video...then it's basically all gonna look like shit in most cases, simply because they aren't going to be wasting any of their processing power on properly reencoding millions of video files. They're gonna be using the cheapest settings with the fastest outcome...and it ain't gonna be pretty in most cases.

I would try experimenting with different codecs and containers and see how YouTube handles them. Also keep in mind that a straight lossless encode may not actually produce the best results. There may be some codec/container/settings combinations where YouTube *WON'T* try reencoding them, in which case that would probably be yer best bet.

There may also be some combinations in which, even if reencoding is done, whatever settings they're using, won't alter the existing encoded form very much if they're based on the same relative settings/codecs.
lbh unq n fvt ohg V ngrq vg ;_;
Revenant Death
 
Joined: 05 May 2007
Location: Under Your Bed

Re: Low quality when uploaded to youtube

Postby NeoQuixotic » Sun Dec 20, 2009 7:47 pm

I'm analyzing the files with MediaInfo and they are all H.264 and AAC now. Since Flash 9 in 2007, FLVs can contain H.264 video and AAC audio. There are lower resolution versions that are Xvid (XviD 1.1.0 Beta2 to be exact) and H.263.

As I said earlier, I used to be able to get YouTube to not re-encode things. This was last year when 720p came out. But since you could possibly encode something slightly off spec, they must of switched to just encoding everything no matter what. They probably also do this because people used to be able to hack FLVs with a hex editor to make YouTube think they were low bitrate and short videos. This allowed people to create super high quality videos and beyond the 11 minute limit. They want to avoid people cheating the system, but to also make sure everything encoded will play properly. Maybe you still can fine the exact settings to use, but every article I read that used to work or claims to still work has not worked for me anymore.
Insert clever text/image here.
User avatar
NeoQuixotic
Master Procrastinator
 
Joined: 01 May 2001
Location: St. Louis Park, MN
Status: I haz job!

Re: Low quality when uploaded to youtube

Postby LittleAtari » Thu Dec 31, 2009 6:56 am

the simplest way to high quality on YT is an avi with Xvid set to quant 1. This was the format that DaikashiSan and I used on HerdULiekAMVs. It produced stable and clean results. DaikashiSan did manage to get even better quality and smaller file sizes when messing around with x264 settings inside of an AVI. He and I never talked about what he did exactly, but I'll see if I can get him to post something soon.

Sadly, the account just got suspended yesterday so I cant provide any examples right now. I'll post some examples later on to show you.
User avatar
LittleAtari
 
Joined: 22 May 2005

Re: Low quality when uploaded to youtube

Postby NeoQuixotic » Thu Dec 31, 2009 4:02 pm

Quantizer 1 will be fine for standard def material. However, I've been trying to find the balance for uploading 720p to 1080p and quantizer 1 can result in stupidly huge file sizes. After checking what other people used for a good balance of quality and file size, I found that using a constant quality mode seemed best. I couldn't see a quality difference between x264 CRF 18 vs quantizer 1. I forget what the file size difference was between a 1080p test I did, but I just did a 848x480 1 minute clip and CRF 18 was 12 MB and CP 1 was 192 MB. But of course, feel free to go crazy if you don't mind uploading larger files. Might as well give it the best possible, even if it might not really be any better to a point.

Taken from the guides about x264:
Quantizer/Bitrate: This setting is basically a trade-off between visual quality and filesize. If you are using bitrate mode, then you simply set the bitrate that you want to encode your video at. Higher bitrates increase the size of your output file, and you can see the estimated filesize as you modify the bitrate value. If you are using constant quality mode, then this is where you select the quantizer to use. Valid values are from 0-51, with lower values giving better quality, but larger filesizes. A quantizer of 18 is generally considered the lowest that you should select, as it's unlikely that you will see much visual improvement by going any lower. For those of you familiar with Xvid, a quantizer of 18 here is equivalent to Xvid's quantizer 2. The default quantizer value is 22, which gives a rather decent tradeoff between quality and size.

I use MeGUI and constant quality mode and constant quantizer mode. Constant quality shows values as CRF # and constant quantizer as CP #. Not sure if that means they are different or not. Anways, if your video doesn't have much motion or effects it can look really good. Here is a test I did with a 1080p clip from "The Girl Who Leapt Through Time" Blu-ray. (http://www.youtube.com/watch?v=9EMdDrONIPw) This encoded very nicely due to the background being pretty much static. I used quantizer 1 for this, but in my testing anything with a decent amount of motion results in really large file sizes.
Insert clever text/image here.
User avatar
NeoQuixotic
Master Procrastinator
 
Joined: 01 May 2001
Location: St. Louis Park, MN
Status: I haz job!

Re: Low quality when uploaded to youtube

Postby Zarxrax » Thu Dec 31, 2009 4:37 pm

Youtube encodes 2 versions. A low quality version and a high quality version. Are you sure you weren't just looking at the low quality one?
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Re: Low quality when uploaded to youtube

Postby Refiu » Sun Feb 07, 2010 10:57 am

Zarxrax wrote:Youtube encodes 2 versions. A low quality version and a high quality version. Are you sure you weren't just looking at the low quality one?

I'm a lilttle bit late with the reply but anyway... Of course I am certain. I upload 1280x720 resolution at 23.976 and youtube gives an option of watching it in 360p, 480p, and 720p and they are all terrible; 720p is somewhat decent but not as good as in other people's videos. No matter what I encode the lossless version to before uploading, it looks terrible once being published on youtube which totally baffles me off. I know bunch of editors who also work with Lagarith and Huffyuv and then convert their videos to mp4 in various resolutions and it just looks excellent on youtube.

I have no idea where I'm making a mistake... Hmm, may I try this way: say you want to make an AMV with 1280x720 MKV file using Sony Vegas... so how would you do it? Just in a few general steps (yes, I've read all tutorials concerning Avisynth and VirtualDub and all that).
Refiu
 
Joined: 19 Dec 2009

Re: Low quality when uploaded to youtube

Postby Mister Hatt » Wed Mar 31, 2010 10:37 am

This might sound a little odd, but to get better quality on YouTube, blur your video before uploading it. The reason things look so bad is because of how their quantizer works. If there is less sharp detail to suck up the bitrate, it won't overquantize and generally comes out a lot better.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Low quality when uploaded to youtube

Postby Mally » Thu Apr 01, 2010 9:34 am

Well the best way of ensuring the best quality on youtube . Is Making sure you have a High Quality Blue ray , dvd rip or equilivant rip . Making sure that when editing the source that no resampling methods have been used . Then you can simply use Xvid settings found on 'AbsoluteDestiny & ErMaC's Technical Guides to All Things Audio and Video mk3' Guide . And you should be fine .

With Myself i use Sony Vegas , so i just simply right click the appropriate clips when brought onto the timeline . Go onto properties and disable the resample . Then Export the final edit as a Lagarith Compressed file or Lossless Equilivent with uncompressed wav source . Finally Compress video and audio on Virtual Dub Mod .
User avatar
Mally
 
Joined: 16 Apr 2009
Location: London
Status: Blah

Re: Low quality when uploaded to youtube

Postby post-it » Thu Apr 01, 2010 11:56 am

.. there are too many things going-on with videos these days that the basics
are all but forgotten.

A) There are filters that stabilize the Luminance balancing "all" the frames against
each other for a "pure-motion" and "easy-viewing" video -- but no one uses them!
.. a codec would have no problems if everything were encoded with only 256
colors because if a COLOR changes from Blue to Grey or Red ... well, we can see
that happening but; just how many shades of colors and shades if Brightness
are taking place between every frame of an AMV???? -- we don't see it .. the CODEC "does" see it.

..Virtual Dub is the only editor which has a filter available to handle this, "Auto-Level"
a stabilizer for Brightness. a filter for Avidemux failed. AviSynth never had one.
No Video Editor out today even offers this as an option.
Thin-out your Video's before you encode them; any codec can shrink it from that point.

B) Resize the images X4 Bi-Cubic, Soften/Blur it, Resize the images ÷4 Bi-Linear.

if your video is not clean, the codec will reward you with "shimmers" "micro-burst's" and distortions later.
The codec is not the issue, even the .RMvb files are cleaner than those found on uTube.

Thin-out your Video's before you encode them.
User avatar
post-it
 
Joined: 17 Jul 2002
Status: Audio: bass remains; if else, 3D

Re: Low quality when uploaded to youtube

Postby post-it » Thu Apr 01, 2010 12:59 pm

Thanks ^_^
User avatar
post-it
 
Joined: 17 Jul 2002
Status: Audio: bass remains; if else, 3D

Next

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 0 guests