I am recording a video using OBS Studio with the following settings: OBS Recording Settings OBS Video Settings

With these settings, OBS is consuming 55 to 60 MB storage for a minute long recording. Considering that my recordings span across multiple hours, a 2-hour recording ends up consuming as much as 4 GB space.

So I tried to transcode the recorded videos with FFMPEG with this command:

ffmpeg.exe -i [RecordedVideoFileName.mkv] [OutputVideoFileName.mkv]

The transcoded video consumes just 5-6 MB per minute in comparison to 55-60 MB per minute as consumed by OBS. The logs of the command are here.

While going through the logs, the following statements statements caught my eye:

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))

So I had the following questions:

  1. What is the difference between h264(constrained), h264(native) and h264(libx264) encoders?
  2. Does transcoding from one to another (as in my case) result in degraded video/audio quality?

1 Answer 1


Let me clarify what a stream mapping line such as the one below, indicates.

Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

Stream #0:0 indicates that the input stream is from the first file #0:0 and is the first stream in that file #0:0

-> #0:0 indicates that the input stream is sent to the first stream of the first output file.

h264 (native) means that the detected codec of the input stream is H.264 and that ffmpeg will use its native (builtin) decoder to decode the stream.

h264 (libx264) means that the codec of the output stream will be H.264 and that ffmpeg will use the libx264 encoder to generate this stream.

"h264(constrained)" usually seen in the input file dump e.g.

Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive)...

indicates that the input stream codec is H.264 and the stream profile is Constrained Baseline. A profile defines the kind of methods that an encoder can use to generate streams and also a set of methods that a decoder is expected to perform, in order to decode the stream.

With your ffmpeg command, libx264 is re-encoding your video stream with CRF 23 and profile High. If the output looks fine to you, there's nothing to do further.

To experiment, you can use

ffmpeg.exe -i [RecordedVideoFileName.mkv] -crf X [OutputVideoFileName.mkv]

where X can go from 0 to 51. 18 to 28 is a good range for good quality and file size. Lower is better quality and larger size.

  • Thanks for the explanation. I've upvoted your answer but it'll only reflect when I reach 15. I had a clarification to ask, though. Since FFMPEG is using a CRF of 23, does it mean that the output video is somewhat inferior to the original input and that whether my naked eye can find out the difference is another matter? I ask this because the transcoded video didn't seem to be inferior to the input video.
    – SOuser
    Commented Aug 18, 2019 at 7:58
  • Yes, modern video lossy codecs make use of psychophysics - the result is mathematically inexact but acceptable for subjective use.
    – Gyan
    Commented Aug 18, 2019 at 8:23
  • Thank you for the explanation once again, Gyan!
    – SOuser
    Commented Aug 18, 2019 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.