S@G
Joined: 9/7/2006
Posts: 81
Location: Luxemburg
I did a little codec comparision on youtube, with NES Games. I encodet the same video three times, (Bitrate 336, single pass) one time in wmv3 aka windows media video 9 codec (with Windows Media Encoder) one time in h264 (Intel H.264) (with MEncoder (SUPER© GUI) and one time in DivX 6.8 (with DrDivX) then I uploadet them to youtube to see waht looks best on youtube. I think h.264 looks the best, and divx is the crappyest (not that it looks that bad, but it seems h264 is much better). Here they are: divx wmv h264 what does you think?
I don't need a Signature
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
I found that H.264 was very slightly better (nothing new or surprising here, though — H.264 has been a superior codec from the start), and WMV was very slightly worse. The difference was pretty insignificant, though. In fact, a better way to increase quality for YouTube videos is to maximize the encoding quality parameters (not bitrate!) and adjust the filesize so that it's barely below the limit (which is 100 MB). Since YouTube will reencode it anyway with a lower bitrate, bandwidth is not much of a concern.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
S@G
Joined: 9/7/2006
Posts: 81
Location: Luxemburg
moozooh wrote:
In fact, a better way to increase quality for YouTube videos is to maximize the encoding quality parameters (not bitrate!) and adjust the filesize so that it's barely below the limit (which is 100 MB).
and how to do that, i never have seen an option to incrase the encoding quality parameters, the only thing I know is that highter bitrate gives (mostly) higher quality. The problem is that i don't understand this input command on MEncoder, and I don't understand options like B-Frame reduction or Bitrate variability or Min/Max QP. And waht are Bias and IDR To be honnest I don't understand any word of that ^^'
I don't need a Signature
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Well, MEncoder comes with a manual file, which explains most encoding parameters and their use for the included codecs, like subpel refinement quality, reference frames, motion estimation type and range, etc. You don't have to understand how any particular feature or parameter works, what you need to understand is: 1) when to use it, 2) what drawbacks it will have, and 3) what is the syntax to insert in the commandline. That's pretty much it.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Player (206)
Joined: 2/18/2005
Posts: 1451
It actually doesn't matter at all which codec or bitrate you use as long as the picture quality of the video doesn't suffer too much. The only problem we have with YouTube when uploading game videos is the frames per second rate of the video (fps). YouTube is designed for 30 fps videos only, while most games have 60 fps, so after YouTube converts them back to 30, the video movements aren't that smooth anymore due to a halfed fps rate. The reason why x264 works best is because YouTube can handle this format better than most other ones when converting it. There is still a unavoidable quality loss, but not as much as with a format like DivX. Another option would be to convert videos manually to 30 fps before uploading them, but in most cases the quality turns out more worse than letting YouTube do the convertion job entirely. If YouTube would someday support 60 fps, the problem with game videos would be solved. Until then we just have to accept the slight quality loss there.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
I think doing that manually would be more beneficial in the end since lower frame rate requires less bits to preserve image quality, which in its turn means the video will look better and will be less damaged by YT reencoding. It won't matter for short videos, but for longer ones (say, over 5 minutes), I believe the difference will be easily noticeable.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Player (206)
Joined: 2/18/2005
Posts: 1451
I tried to convert videos to 30 fps manually (and even resized them for YouTube standards, which didn't change anything either), but after comparing, the movements were almost twice as jittering compared to a directly uploaded 60 fps one. This applies to videos done through VirtualDub at least.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Hmm, a different framerate converting algorithm, perhaps? I'm sure there must be different ones to try…
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Experienced player (614)
Joined: 4/24/2005
Posts: 612
Well, what you could try is interlace the video so that every 2 frames would become 1 frame (basically they're stricken with scanlines at this point. Doing this also increases the resolution's height) and then deinterlace the video so that there's the illusion of 60 frames per second (then you can resize it back to normal). AVISynth can do this for you with its 'Weave' function. I'll try and come up with an example of what the hell I'm talking about.
Player (206)
Joined: 2/18/2005
Posts: 1451
It would be great if a solution for this exists. I actually tried some 2:3 fps overlapping during convertion, but didn't got a satisfying result back then.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Post subject: Tutorial - Workaround of YouTube's 30 fps limit
Experienced player (614)
Joined: 4/24/2005
Posts: 612
(This doesn't quite fit the codec criteria but still, it's meant for use on YouTube). Okay, here's a bit of a workaround that'll give off the illusion of 60 fps. Here at TASVideos, we all know what wobbling in a TAS is, right? Well, I thought this would be a pretty good example since when you cut the frame rate in half, you lose the wobbling effect (for the most part). So, here's how it'll work. We'll take every 2 frames and combine them into 1 frame but still keep the wobbling effect. Here's an example: We've got our two frames, This one: And this one: And so, we want to combine them. What tool better to do so than AVISynth. Well, if we're going to use AVISynth, then you're going to need to know some of AVISynth's script (it's not difficult to learn). You can find information for it here. We'll also need an encoder that can handle AVISynth like VirtualDub or MediaCoder hell, even MeGUI. I used VirtualDub in this example as it's quick and painless. To get the effects of AVISynth, you want to open up a blank .txt file, type up your script and save it with the extension of .avs. When you have the .avs file, you want to act as though that is the video file at hand and open that up in your encoder. Okay, on with the tutorial. With this script:
AVISource("1.avi")
AssumeFieldBased.Weave
We can combine the 2 frames into 1 which makes it look like this: Notice Trevor is all scanlined up as well as the image's height being twice the size. That's from weaving the 2 frames together. This works great for making DVDs because when the images are processed on a TV, they're deinterlaced and look to be 60 fps. But I digress. We're not quite done yet. In order for this to be complete, we need to deinterlace the image so that it's without the scanline look. So, we'll add to the previous script:
AVISource("1.avi")
AssumeFieldBased.Weave.VerticalReduceBy2
This allows us to get this result: Trevor is now facing forward and backward in the same frame. But how does it look in video, you might ask? Well, for starters here's the unaltered video file (encoded with X264) I went ahead and used (sorry, if I upload it to YouTube, it'll lose half the frames.) Now, here's what usually happens when you upload a 60 fps video to YouTube. Not very pretty without the rest of the frames. And now, here's the interlaced/deinterlaced video (there's really no need to see the video where it's only interlaced as the concept has already been shown off, at the top of this page. Also, if I uploaded it to YouTube, it'd get resized and wouldn't show off the concept). That's it. This is just a concept that tries to bypass YouTube's encoder that decimates frames. What codec you use to encode it is entirely up to you. I'm sure there are probably better deinterlacers out there but this one is built-in AVISynth, it was fast and much less confusing than if I were to use an external one. I urge those who post their TASes on YouTube, to use this method because the end result is much nicer looking. If you do in fact consider using this method and for some reason need help, I'm usually around in IRC on Freenode under the nick of Samhain-Grim.
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
That's clever. On the other hand, if you take not wobbling, but instead a 30 Hz strobing or blinking (after taking damage, for instance; many, if not most, games blink the character sprite at 30 Hz), this workaround will combine "sprite shown" and "sprite not shown" states in a ghostly translucent form, which will not look as bad as completely discarding every other frame, but still nothing close to how it's actually supposed to look. A workaround for this that is used on SDA's low quality encodes, for instance, will be decreasing the frame rate to 1/3 (20 fps), therefore successfully showing the alternate sprite states, but I bet that's going to make it look all the more jittery. Any ideas on how to deal with that?
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Player (206)
Joined: 5/29/2004
Posts: 5712
I was thinking you could do some kind of weird pattern, like... The new frame 1 is the old frame 1 at 33% transparency layered with the old frame 2 at 67% transparency. Then the new frame 2 is the old frame 3 at 67% transparency layered with the old frame 4 at 33% transparency. Then frame 3 is done like frame 1, and so on. With something like that, there'd be an alternation in whether the even frames or odd frames show through more. But all the frames would still show through a little bit. That's probably a lot harder to script, though, and I don't know that it wouldn't look jerky.
put yourself in my rocketpack if that poochie is one outrageous dude
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Nitpicking: H.264 is not a codec, it's a video format. A codec is a piece of software which encodes/decodes some format. An example of a codec which supports the H.264 format is x264.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Warp wrote:
Nitpicking: H.264 is not a codec, it's a video format. A codec is a piece of software which encodes/decodes some format. An example of a codec which supports the H.264 format is x264.
I'm all the way towards calling those as "codecs" even though the proper term is video compression method. A video format is one such as NTSC or PAL.
Former player
Joined: 12/22/2006
Posts: 193
Location: Flowood, MS
It's a standard, you knuckleheads!
<adelikat> tony hawk is porn for me <Comicalflop>my mom is hot
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
mushroom wrote:
It's a standard, you knuckleheads!
It was indeed "standard" on the Wikipedia page I used as reference in that post, but I chose "method" instead because I don't think all codecs deserve to be called standards.
Former player
Joined: 12/22/2006
Posts: 193
Location: Flowood, MS
...but I thought it wasn't a codec. now you've got me all confused with your tangled web of contradictions and falsehoods!
<adelikat> tony hawk is porn for me <Comicalflop>my mom is hot
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Several Wikipedia pages related to video compression periodically refer to H.264 as a codec; there are also sources like this.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
Hey, youtube recommends Divx MPEG4.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Player (206)
Joined: 2/18/2005
Posts: 1451
Wow, thank you Vandal! It indeed looks much smoother that way. I actually tried some interlacing methods long time ago, but I didn't know that you could merge 2 frames in one to create a pseudo 60 fps effect that looks that well. I will be sure to use this method for my next game video, no doubts. moozooh: I tried to convert the vids to 20 fps to maintain the blinking effect, but as you guessed right, it looks horrible jittering that way. Vandals method is much better to use, and I don't really care if the blinking isn't 100% accurate that way. Getting smooth movements in the vid is what counts most. Everything else is not that important.
pirate_sephiroth wrote:
Hey, youtube recommends Divx MPEG4.
Maybe they tested it only on 30 fps, in which DivX should work fine. However I'm pretty sure x264 is not a worse choice in any case here. They probably just didn't test x264 that well yet, since it's not as popular as DivX, but in every aspect superior to it when it comes to quality/filesize.
See my perfect 100% movie-walkthroughs of the best RPG games on http://www.freewebs.com/saturnsmovies/index.htm Current TAS project (with new videos): Super Metroid Redesign, any% speedrun
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Bisqwit wrote:
Warp wrote:
Nitpicking: H.264 is not a codec, it's a video format. A codec is a piece of software which encodes/decodes some format. An example of a codec which supports the H.264 format is x264.
I'm all the way towards calling those as "codecs" even though the proper term is video compression method.
Yes, that would be more precise. It probably is indeed so that H.264 doesn't specify the specific *format* in which to write the video data (ie. headers, word endianess, interleaving block sizes...) to a file, only an algorithm about how to compress raw video to a compressed form. H.264 is thus a video compression method/algorithm, eg. AVI is a multimedia container *format*, and eg. x264 is a codec (ie. a piece of software which supports encoding and decoding certain type of video data, in this case H.264-encoded data).
moozooh wrote:
Several Wikipedia pages related to video compression periodically refer to H.264 as a codec
Wikipedia is not always right in the small details. "Codec" might sometimes be used interchangeably with "video compression algorithm", but that doesn't mean it's a technically correct usage. A codec is a piece of software.
Joined: 10/20/2006
Posts: 1248
But if the whole world calls H.264 a codec because it's shorter, then it gets normal to call it a codec. And the meaning of the word codec may change over time as a consequence. That's how language evolves. So, whatever.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
I think there's a difference between saying "a H.264 codec" and "the H.264 codec". For example x264 is an example of the former and the latter doesn't exist.
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
Yeah... that thing in Metal Gear Solid is a codec too! The language evolved!
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.