Log in

View Full Version : AVS produces very large video... why?


Starduster
7th November 2014, 20:34
I have a 2.9mb and 3.1mb .mp4 video with the following characteristics:

Video: MPEG4 Video (H264) 800x450 15fps 50kbps [V: Video Media Handler [eng] (h264 high L3.0, yuv420p, 800x450, 50 kb/s)]
Audio: AAC 44100Hz stereo 53kbps [A: Sound Media Handler [eng] (aac, 44100 Hz, stereo, 53 kb/s)]

I use the following .avs to normalize these with other types of videos:

a = FFAudioSource("2_110_0_0_3.mp4")
v = FFVideoSource("2_110_0_0_3.mp4")
sld3 = audiodub(v,a)
sld3 = changeFPS(sld3,15)
sld3 = sld3.ensureVBRMP3sync()
sld3 = sld3.ConvertToRGB32().Lanczos4Resize(800,450).SSRC(22050, fast = True)
sld3 = getChannel(sld3,1,1)

sld2 ++ sld3


I then use ffmpeg to write the consolidated .mp4 file with:

ffmpeg -async 15 -i 110_0_0.avs -vcodec flv -r 15 -s 800x450 -b:v 512k -ab 96k -ar 22050 -coder 1 -flags +aic+loop+mv4+naq -mpv_flags +cbp_rd -trellis 1 110_0_0.flv


The resulting file is 38.5mb! What have I messed up?

qyot27
7th November 2014, 20:57
You told it to increase the combined audio and video bitrate by nearly 6x, and you got an output file that's approximately 6x larger than its source files. It did exactly what you told it to do.

2.9 + 3.1 = 6 MB

50 + 53 = 103 / 8 = 12.875 KB/s original, v+a combined


512 + 96 = 608 / 8 = 76 KB/s, output bitrate

76 / 12.875 = 5.9029x increase in bitrate over the original files

6 x 5.9029 = 35.4174 MB

Starduster
7th November 2014, 21:17
Wow... I've been using that line of code so long, I never even realized... thanks so much for the response! I'll adjust to match the input.