MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.5k stars 287 forks source link

Severe Artifacts When Encoding With Free Formats #683

Open john01dav opened 5 years ago

john01dav commented 5 years ago

Whenever I record using any video encoding except for H.264 (an undesirable format, due to its non-free nature), I get severe artifacts. I have tried various free video encodings, and increasing the bitrate to absurd levels (with the intention to compress later -- ffmpeg's vp9 encoder seems to not have this issue). Neither of these worked. I have attached a sample video encoded with vp8 + webm, and the artifacts are very clear. They are especially bad around 0:30, where it is very difficult to make out what is happening.

stairs.zip

MaartenBaert commented 5 years ago

There's a reason why everyone uses x264: it's objectively better than everything else. The VP8 and VP9 encoders are too slow for real-time recording, and the other patent-free ones don't produce a decent compression ratio. If you really want to stick to 100% patent-free, you will need to use a two-step process: record to a fast but poorly compressed format with a high bit rate, and then re-encode with VP8/VP9 at a later point. For the first step you could use a lossless codec like FFV1, or a lossy codec like motion JPEG (the patents have expired). In either case the bit rate will be very high. FFV1 will give you the best possible quality but you will get a bitrate around 100Mbit/s for 1080p/30fps video.

john01dav commented 5 years ago

Thank you for your response. I have some follow up questions. You said that the VPx encoders are too slow for real time rendering. Do you know if this is a result of the file format, or is it from comparatively bad encoders? (ie. is it reasonable for a company with resources to, in the future, create a VPx encoder that is on par with x264?) I ask this question mostly out of curiosity. Additionally, I am wondering how, exactly, to use motion JPEG with simplescreenrecorder. It doesn't appear to be in the codec name drop down (I do, however, see similar things like ljpeg, but I can't figure out what these are from web searches).

MaartenBaert commented 5 years ago

The poor performance is mostly due to the fact that the encoders haven't been optimized as much as x264. In theory VP8 encoding speed should be comparable to H.264 and VP9 to H.265. However they will probably not get the same compression ratio at those speeds, because they have to work around various patents, which comes at a cost.

The codec name is mpjeg, however it seems that it won't work with SSR because it doesn't understand any of the pixel formats that SSR currently supports. I could add support for it if necessary, but I don't have an optimized converter for it so it will be slower. I think you're better off with FFV1.

darealshinji commented 5 years ago

Are the patents really such an issue? https://video.stackexchange.com/a/14706 Why not use x264 as an intermediate format and encode the final video in a patent-free format?