Low quality when uploaded to youtube
-
- Joined: Sat Dec 19, 2009 10:23 am
Low quality when uploaded to youtube
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?
- Minimoto
- Joined: Thu Oct 16, 2008 9:24 pm
- Status: Trying to Live
- Location: Wherever I smell good food!
Re: Low quality when uploaded to youtube
First of all, don't download your footage from the net and buy the DVDs?
-
- Joined: Sat Dec 19, 2009 10:23 am
Re: Low quality when uploaded to youtube
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?Minimoto wrote:First of all, don't download your footage from the net and buy the DVDs?
- NeoQuixotic
- Master Procrastinator
- Joined: Tue May 01, 2001 7:30 pm
- Status: Lurking in the Ether
- Location: Minnesota
- Contact:
Re: Low quality when uploaded to youtube
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.
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.
-
- Joined: Sat Dec 19, 2009 10:23 am
Re: Low quality when uploaded to youtube
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.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.
-
- Joined: Sat May 05, 2007 1:17 am
- Location: Under Your Bed
Re: Low quality when uploaded to youtube
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.
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 ;_;
- NeoQuixotic
- Master Procrastinator
- Joined: Tue May 01, 2001 7:30 pm
- Status: Lurking in the Ether
- Location: Minnesota
- Contact:
Re: Low quality when uploaded to youtube
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.
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.
- LittleAtari
- Call Me Moneybagz
- Joined: Sun May 22, 2005 10:23 pm
Re: Low quality when uploaded to youtube
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.
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.
- NeoQuixotic
- Master Procrastinator
- Joined: Tue May 01, 2001 7:30 pm
- Status: Lurking in the Ether
- Location: Minnesota
- Contact:
Re: Low quality when uploaded to youtube
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:
Taken from the guides about x264:
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.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.
Insert clever text/image here.
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
Re: Low quality when uploaded to youtube
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?