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>
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

| improve this answer | |
  • 1
    thanks I am experimenting with that now.. – barlop Apr 3 at 23:04
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.

| improve this answer | |
  • Aw, shucks. Tried HEVC (h.265)? – K7AAY Apr 3 at 23:50
  • 4
    Your input video is already in yuv420p. You're using FFmpeg's defaults based on the file extensions of transcoding to h.264 using -c:v libx264 with its defaults of -preset medium and -crf 23. You can use -preset veryslow to spend more CPU time making a smaller file. Although if you really care about quality, you could go back to Premiere and export lossless, or use an x264 output plugin, to avoid the lossy step of encoding to a 6GiB file first. That's a pretty arbitrary choice of bitrate. Just like if you wanted a small JPEG, you wouldn't make a big JPEG first... – Peter Cordes Apr 4 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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