Compressing Video Lectures (Screen Recordings)

RBX

In the zone
I need to compress several 720p video lectures. I don't care about how much time is taken in encoding, just want size is to as low as possible while retaining quality at same resolution.


I tried encoding a 1 hour long lecture (downloaded from youtube), 390 MB in size using handbrake 9.8. The time taken was 3 hours and size reduction was exactly 30%, and there was no noticable difference in source and result. The settings were


Code:
Container: MKV
Video Codec: H.264
Frame Rate: 23.976 | Option selected: Peak Framerate
Quality: Average Bitrate: 450 kbps | 2 Pass Encoding
Audio: AAC, 96 kbps, Stereo
x264 Encoder options: level=4.1:vbv-bufsize=78125:vbv-maxrate=62500:ref=6:bframes=5:b-adapt=2:direct=auto:b-pyramid=strict:me=tesa:subme=10:merange=64:analyse=all:trellis=2:psy-rd=1.0,0.10:deblock=6,6


Then I tried handbrake 9.9, which showed some error while selecting source file, so I swiched to handbrake svn6140.


Kept all settings same as above except
Code:
Frame Rate: 15
Quality: Average Bitrate: 400 kbps


Time taken 1 hour 25 minutes, size reduction 37%, and quality still looks same.

I'm wondering if I can further reduce the size because very little of the video changes over time. I'm also curious about the new codecs H.265 and VP9.
Handbrake shows H.265 as an option but there is nothing in advanced options, so I'm not sure I'd want to waste more time experimenting on that.

So what else can I do to reduce size? I'm aiming for 45-50% size reduction. Will reducing audio and video bitrate help? And what options should I choose if I use H.256 to retain quality?

Also provide some links to H.265 and VP9 encoders that allows fine tuning of options and support GPU accelerated encoding.

- - - Updated - - -

I have found a software - XMediaRecode. It allows VP9 encoding, but there aren't too many options to configure the encoder.
It allows two modes - PSNR and SSIM. I think PSNR is better, so I'm running a test to see how good the compression is.
 

SaiyanGoku

kamehameha!!
reducing the bitrate reduces the overall size, but if you reduce it too much, pixelation will occur and the video may get blurry or sound will start to stutter.

XmediaRecode is good for doing conversions, but Handbrake is better and takes lesser time to encode.
 

Vyom

The Power of x480
Staff member
Admin
Whatever software you choose to compress the size of a video, just remember to lower the Video Bit rate. Difference might surprise you.
 
OP
RBX

RBX

In the zone
reducing the bitrate reduces the overall size, but if you reduce it too much, pixelation will occur and the video may get blurry or sound will start to stutter.

XmediaRecode is good for doing conversions, but Handbrake is better and takes lesser time to encode.

I'm beginning to wonder if XMediaRecode even works. I was doing a 1 hour video and approximate time required was 1 hour 30 minutes, and it crashed exactly halfway through. So now I'm doing a 2 minute (1:43) video and time required still seems about 1 hour 15 minutes.

Whatever software you choose to compress the size of a video, just remember to lower the Video Bit rate. Difference might surprise you.
Yes, I've been experimenting with that. Started with 450kbps and have been going down by 50 each turn, need to find a sweet spot but that willll probably take a lot of time.
 

SaiyanGoku

kamehameha!!
i frequently use it to mux subtitles and video/movies together, clip out the opening/ending songs from anime episodes, convert media files to a readable format/codec for TV's, etc and it hasn't crashed yet.
 
OP
RBX

RBX

In the zone
i frequently use it to mux subtitles and video/movies together, clip out the opening/ending songs from anime episodes, convert media files to a readable format/codec for TV's, etc and it hasn't crashed yet.

I managed to convert that 2 minute game trailer into a webm VP9 using XMediaRecode, took 1 hour 45 minutes and size reduction was 74% with visible artifacts (blocking - maybe bitrate of 350kbps isn't good for game trailer). I'll try it again on that 1 hour video lecture to see if I can get low time (2-3 hours max) and high compression.

Edit:
This happened again when I tried converting the same 1 hour lecture with which it crashed earlier. This time the container was MKV instead of WebM.
*i.imgur.com/NVJ5Mly.png

Looks like this happens at the end of first pass. Also notice the number of frames(53703/53700).

Edit:
Change log on their site

XMedia Recode 3.1.8.3

  • Update of ffmpeg
  • Update of x264 (2409) Codec
  • New profiles (Acer, Huawei, Nokia, LG)
Troubleshooting

  • crashed when start
  • incorrectly end frame
  • Fixed minor bugs
Looks like this still hasn't been fixed because I'm using the latest version.
 
Last edited:
OP
RBX

RBX

In the zone
try to use an older version, i use 3.1.6.6

I mailed the developer about the problems, and today a new version was released (3.1.8.4).
Change log
Troubleshooting

  • crashes when use of XviD codec with 2 pass mode
  • Fixed minor bugs
I'm not too familiar with different formats, but this might have something to do with MKV and VP9, so I'll try this one first.

- - - Updated - - -

Look like the problem has been solved.
*i.imgur.com/fUuNTo2.png

Now I just hope that VP9 provides marginally better compression compared to H.264, and takes less time because XMedia Recode seems to be using GPU.

- - - Updated - - -

:shock: At current rate, looks like the second pass will take 2-3 days.
 
OP
RBX

RBX

In the zone
currently HEVC beats x264 & VP9 in video compression

Yes, it does but I couldn't find any encoder which supports this. Handbrake does have H.265 as an option but it doesn't work. Moreover, I think it is still too early to try encoding using H.265/VP9, we need hardware support to get decent speed.
 
Top Bottom