0

Wondering if ffmpeg could help me reduce the size of the resulting file called "OBS_VLC_replay.mp4" which is produced as a result of using VLC to playback a video at x1.3 speed (with audio pitch correction to retain x1.0 playback speed audio pitch) of "original_video.mp4", and OBS (OpenBroadcase Studio) used to capture the desktop and speaker-output.

Note that the frame-size/resolution of "original.mp4" and "OBS_VLC_replay.mp4" is same i.e. full-HD @1920x1080, although frame-rate of "original.mp4" is 25fps, and that of "OBS_VLC_replay.mp4" is 30fps. The audio stream in "original.mp4" is aac, recorded @48kHz, while reencoded one by OBS is @44.1kHz. However, the file size of "OBS_VLC_replay.mp4" is significantly larger (order-of-magnitude), than "original.mp4". I think, it is the video stream's encoding (and extra frames due to higher framerate) that is to blame.

The "original_video.mp4" is produced using Kdenlive and then trimmed using ffmpeg. ffprobe on "original_video.mp4" says:

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.3.100
  Duration: 00:03:48.46, start: 0.000000, bitrate: 316 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 1920x1080 [SAR 1:1 DAR 16:9], 127 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 182 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

ffprobe on "OBS_VLC_replay.mp4" says:

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.84.100
  Duration: 00:12:14.47, start: 0.067000, bitrate: 2657 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2499 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 145 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

So question is, can I use ffmpeg on "OBS_VLC_replay.mp4" to get back to 25fps and similar level/type of encoding to bring back the resulting mp4 filesize in close proximity to the "original.mp4" ?

  • This is very inefficient workflow, just use ffmpeg with rubberband filter. – Gyan May 21 '18 at 6:48
  • Thanks again. Indeed, this workflow is terribly inefficient, but recompiling ffmpeg with rubberband filter support was going to be a lot more time-consuming. So, I just trimmed the initial 1 second, and the trailing 1 second of the "OBS_VLC_replay.mp4", using ffmpeg, and it's file size dropped significantly (5% lesser than "original.mp4") ! – icarus74 May 21 '18 at 10:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.