x264vfw Compression - WTF am I doing wrong?

Discussion in 'MSI AfterBurner Application Development Forum' started by RadioActiveLobster, Jan 3, 2013.

  1. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,123
    Likes Received:
    6,686
    Because it is a question of personal preferences. Some people prefer the best compression rate and just store the video or upload it without editing so x264vfw is the best choice for them. Others prefer the best performance and minimum performance hit during gaming so RTV1/MJPG is their choice. Some people are crazy about capturing lossless video so their choice is Lagarith. And none of those choices can be called "right" or "wrong".
     
  2. De-M-oN

    De-M-oN Guest

    Messages:
    61
    Likes Received:
    0
    GPU:
    Nvidia Geforce GTX 1080
    People who just want to store the video should record lossless and then encode with x264cli. a GUI for x264 is free too and a good GUI is for example MeGUI. So you encode your recorded lagarith file with for example MeGUI and have it in a suitable H.264 container.

    You should in no way recommend a vfw lossy codec. AVI is very bad for H.264 and other lossy codecs which are usable with AVI have bad efficiency.
    Also: The CPU load is way higher than with a lossless codec (except maybe for MJPG/RTV1)

    On your page you're also not going into this. You recommend it as the one and only vfw codec as to be recommended.

    If you want to recommend something, then you should indeed recommend lagarith or any other lossless codec. You should recommend which is the best method. And the best method is lossless record and lossy encode after recording. Thats the optimal way.
    And the most people with a little bit knowledge want it this way.

    If you still want to mention x264vfw, then at least do more examples and mention what you wrote here. maybe like this: People who like to have that, can use that, and people who like that, use that etc.

    At the moment it looks like as a best for all people recommendation.

    I say: its for nobody the solution.

    x264vfw recording wont be very fast performance, especially if you encode lossy with b-frames and so on, avi not suitable for H.264.
    You recommend a ultrafast preset recording. You sure recommend then a lossless recording too, right? Then let the people record in lagarith and encode afterwards with x264cli and so you havent to record with very bad ingame performance while recording, and you dont have that very inefficient bad compressed lossy coding..

    x264vfw is in any way suboptimal for everyone.

    No one wants bad recording performance, no one wants bad encoding efficiency
     
    Last edited: Jan 28, 2013
  3. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,123
    Likes Received:
    6,686
    Many people record a lot of video during gaming and prefer to compress it on the fly with maximum possible compression ratio to avoid flooding HDD with gigabytes of uncompressed or lossless data. So no need to tell what people should do, you're personal preferences are not the only ones.

    Please let me decide myself what should I recommend to others. This solution provides tbe best compression ratio and it has pros and cons like any other.

    You forgot to add "and way higher compression ratio" to it.

    I don't know what do you mean by "my page", I don't host any webpages and post info only in the forum or in MSI Afterburner readme/context help system. And both of them say the following:


    o External VFW codecs support. Now in addition to built-in uncompressed, RTV1 and MJPG encoders it is also possible to encode video using external VFW codecs installed in the system. It is recommended to download, install and use Lagarith Lossless Codec for lossless video capturing or x264vfw codec for the maximum compression ratio, MSI Afterburner was developed to provide the best compatibility with these codecs


    So maybe you should just RTFM instead of pushing your preferences that aggressively?
     
  4. thatguy91

    thatguy91 Guest

    On the fly encoding of any video is never going to be high quality. The suggestion of recording video in Lagirith first then re-encode later isn't a bad one. If you record to x264 on the fly, I can absolutely guarantee 100 percent that either the quality won't be as good as it could be, possibly noticeably so, or the filesize will be much larger than what it would be otherwise.

    There are times when x264vfw may simply not work as expected not just because it isn't officially supported, but for the reason why it isn't officially supported. To work with vfw, some less than ideal code 'hacks' were used (apparently) that can never guarantee a perfectly successful encode all the time. To get to a high quality x264 output on the fly, you have to use settings that are conducive to much larger file sizes. Whilst this isn't a problem per se, it does mean you have to edit it later and re-encode if you want to distribute it. Re-encoding a lossy picture is like making a photocopy of a photocopy, you are not only encoding and introducing new artifacts, you are literally encoding artifacts that ere already part of the picture. If you record in a lossless format, when you re-encode it will be like photocopying off the master.

    So, if you do use x264vfw, you still have to re-encode anyway as you can drastically reduce the filesize. The higher resolution and better quality on-the-fly recording you do, the smaller you can get the filesize with the re-encoding. If you have the resolution and quality at a level that is actually good for an encode, you would either be clueless or lazy to distribute them online etc. If you have the resolution and quality settings such that the file size isn't too excessive, then the video won't really look too good!

    Like I said, if you disagree with this, argue it over in the x264 development thread (or open a new thread) on the Doom9 forum. You can argue directly with the lead programmer of x264 there, as well as a significant number of other users that know more about x264 specifically, and encoding than you do ;)
     

  5. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,123
    Likes Received:
    6,686
    Can both of you stop this useless flaming please? If x264vfw doesn't suit your needs, just don't use it, it is simple as ABC. It doesn't make it useless for others though, it is just not your way, but it absolutely doesn't mean that others have to follow your way.
     
  6. De-M-oN

    De-M-oN Guest

    Messages:
    61
    Likes Received:
    0
    GPU:
    Nvidia Geforce GTX 1080
    @thatguy91: Thank you so much..

    Other SHOULD follow this way. Why? because you get much smaller filesizes and much better quality if you encode afterwards and with x264cli ..
    Its in no way recommended for anyone. And this shouldnt be then recommended.
    I don't see why to complain about amount of storage lossless data needs ...
    Only at a very very special case, with very very small HDD. But then you should rather recommend him to buy a bigger HDD as soon as possible.
    HDDs are so damn cheap now, and in top of that: You can delete the lossless files after you've encoded them into lossy format.
     
    Last edited: Jan 28, 2013
  7. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,123
    Likes Received:
    6,686
    For the very last time: not everyone like to re-encode video after capturing. Not everyone need a lossless image. Not everyone edit or post-process captured video. Some people (including myself) are just searching for some form of realtime compression on-the-fly with the most balanced perf.hit/compression ratio. End of discussion.
     
  8. thatguy91

    thatguy91 Guest

    There are two ways in which encoding is done for efficiency. Spatial (over the current frame) and temporally (between frames). Spatial encoding is easy on the fly, but temporal encoding is difficult (I am simplifying this) because the picture structure and difference from frame to frame has to be tracked. This tracking takes into account repeatability of picture structure, movement of picture structure, and changes in the element of the picture structure being tracked. This repeatability is why video encoding can be quite efficient. The more advanced and better quality settings you use, the slower the encode. Basically if you are playing an intensive game and trying to encode the image, you will either cause the game to go slow as the encoding process is CPU intensive (with quality settings), or you will have to set the quality settings low so as to not impede the game. Of course, setting the image quality settings low isn't ideal for post-recording distribution because the file sizes will still be considerably larger than what they should be, and re-encoding them isn't necessarily an option because you are also encoding the image artifacts etc introduced by the original recording. Re-encoding a lower quality image may actually take up more space than re-encoding a high quality image. This is of course, assuming you are encoding usign CRF, which is advisable over doing 2-pass encode (for a set file size) and definitely advisable over using CBR mode which can be quite inefficient.

    Now, if you really want to use x264vfw to initially record the video (like I said, you definitely want to re-encode after). I would use CRF mode with quality of say, 18 or lower (lower is better). The CRF mode is a quality metric, such that if you use better other settings for encoding the file size will be smaller (but more CPU time used) but the quality will remain similar. I suggest 18 simply because you don't lose too much quality and it is simple for re-encoding later. When re-encoding, if you don't know anything about the settings and what to choose, the only recommendation I could give you is CRF 20 and use the preset 'slower'.
     

Share This Page