3

If I have a really big multi-gigabyte video file produced by premiere pro, involving powerpoint-like slides and audio, how can I make the video a lot smaller?

Either in ffmpeg or premiere pro

The file should not be more than a GB really surely.. It's only audio and very low resolution images.

It only has one or two images.. the images don't change frequently.

There's some text that changes every 5 minutes or so.

The video is 3.5 hours.

C:\Users\User\Desktop\pprogenproj>mediainfo GenVideo.mp4
General
Complete name                            : GenVideo.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/mp41)
File size                                : 6.76 GiB
Duration                                 : 3 h 30 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 4 597 kb/s
Encoded date                             : UTC 2020-01-01 23:28:03
Tagged date                              : UTC 2020-01-02 00:15:22
TIM                                      : 00:00:00:00
TSC                                      : 25
TSZ                                      : 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Format settings, GOP                     : M=4, N=25
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3 h 30 min
Source duration                          : 3 h 30 min
Bit rate                                 : 4 403 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.191
Stream size                              : 6.47 GiB (96%)
Source stream size                       : 6.47 GiB (96%)
Language                                 : English
Encoded date                             : UTC 2020-01-01 23:28:03
Tagged date                              : UTC 2020-01-01 23:28:03
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 3 h 30 min
Source duration                          : 3 h 30 min
Bit rate mode                            : Variable
Bit rate                                 : 192 kb/s
Maximum bit rate                         : 276 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 285 MiB (4%)
Source stream size                       : 285 MiB (4%)
Language                                 : English
Encoded date                             : UTC 2020-01-01 23:28:03
Tagged date                              : UTC 2020-01-01 23:28:03



C:\Users\User\Desktop\pprogenproj>
barlop
  • 25,198

2 Answers2

3

Use ffmpeg to recode the video and audio, or re-record it at a lower audio bitrate and lower video profile.

added by barlop

Re-encoding it so the default for mp4, -vcodec libx264 made it much smaller, as it encodes it as a much lower bit rate than the original, so that makes the biggest difference. And also, since the video is mainly like slides, I adjusted the frame rate. Doing -r 3 is a frame rate of 3 frames per second. That also reduces the bit rate a lot.

ffmpeg -i input.mp4 -r 3 output.mp4 which is the same as

ffmpeg -i input.mp4 -vcodec libx264 -acodec aac -r 3 output.mp4

barlop
  • 25,198
K7AAY
  • 9,725
2

This ffmpeg was suggested to me and has made the video much smaller.

ffmpeg -i GenVideo.mp4 -pix_fmt yuv420p out.mp4

C:\Users\User\Desktop\pprogenproj>ffmpeg -i GenVideo.mp4 -pix_fmt yuv420p out.mp4

C:\Users\User\Desktop\pprogenproj>dir GenVideo.mp4
 Volume in drive C has no label.
 Volume Serial Number is 4645-5DCE

 Directory of C:\Users\User\Desktop\pprogenproj

02/01/2020  01:23     7,253,511,627 GenVideo.mp4
               1 File(s)  7,253,511,627 bytes
               0 Dir(s)  113,148,440,576 bytes free

C:\Users\User\Desktop\pprogenproj>dir out.mp4
 Volume in drive C has no label.
 Volume Serial Number is 4645-5DCE

 Directory of C:\Users\User\Desktop\pprogenproj

03/04/2020  22:50       465,971,012 out.mp4
               1 File(s)    465,971,012 bytes
               0 Dir(s)  113,148,375,040 bytes free

C:\Users\User\Desktop\pprogenproj>

added

I will accept K7AYY's answer as it had led to significant improvement over what I had

adjusted framerate -

ffmpeg -i GenVideo.mp4 -pix_fmt yuv420p -r 3 out2.mp4

C:\Users\User\Desktop\pprogenproj>ffmpeg -i GenVideo.mp4 -pix_fmt yuv420p -r 3 out2.mp4

C:\Users\User\Desktop\pprogenproj>dir out2.mp4
 Volume in drive C has no label.
 Volume Serial Number is 4645-5DCE

 Directory of C:\Users\User\Desktop\pprogenproj

04/04/2020  00:23       244,072,990 out2.mp4
               1 File(s)    244,072,990 bytes
               0 Dir(s)  112,900,947,968 bytes free

C:\Users\User\Desktop\pprogenproj>

Re adjusting bitrate. it looks like adjusting the frame rate, -r 3, (3 frames a second), brings the bitrate way down..

In doing this line ffmpeg -i GenVideo.mp4 -pix_fmt yuv420p out.mp4 The -pix_fmt yuv420p makes no difference here because the original file is already that. eg mediainfo shows it's YUV and chroma sampling 4:2:0 that's yuv420p. And ffmpeg -i Genvideo.mp4 shows yuv420p. One should specify codecs(-vcodec and -acodec). The default seems to be -vcodec libx264 -acodec aac.

So, ffmpeg -i GenVideo.mp4 -vcodec libx264 -acodec aac -r 3 out.mp4 would be good.

C:\Users\User\Desktop\pprogenproj>ffmpeg -i GenVideo.mp4 -vcodec libx264 -acodec aac -r 3 GenVideoSmaller4.mp4

C:\Users\User\Desktop\pprogenproj>dir GenVideoSmaller4.mp4
 Volume in drive C has no label.
 Volume Serial Number is 4645-5DCE

 Directory of C:\Users\User\Desktop\pprogenproj

04/04/2020  22:16       244,072,990 GenVideoSmaller4.mp4
               1 File(s)    244,072,990 bytes
               0 Dir(s)  110,397,407,232 bytes free

C:\Users\User\Desktop\pprogenproj>

ffmpeg -i input.mp4 output.mp4 (that's -vcodec libx264 -acodec aac), drastically reduces the bit rate from e.g 4000kb/s to 171kb/s. (turning 7GB to 400MB, or 35MB to 2MB). And adding -r 3, reduces it to 45kb/s, turning 400MB file to about 240M, and turning 2MB to about 2.1MB to 1.2MB.

barlop
  • 25,198