[FFmpeg-user] Ffmpeg Nvidia GPU mkv encoding output file size

oktay eşgül oktayesgul at gmail.com
Tue Apr 17 11:37:15 EEST 2018


I have  been working with below environment.



==>Ubuntu 16.04.3



==>FFmpeg :3.4.2



-- configuration: --prefix=/usr/local/ffmpeg_new/ --enable-cuda
--enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp
--extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64 --enable-libvpx --enable-libvorbis
--enable-libfreetype



==>Cuda 9.1.85



==> GPU: GeForce GTX 1080ti



==> I have two media files :



caller_video.webm (80MB) and callee_video.webm (120MB)



==> Then I am demuxing audios from these videos via below command:



time ffmpeg -y -i caller.webm -vn -ab 256 caller.wav

Caller.wav = 260 MB



==>Then, muxing caller.wav file with callee_video.webm



time ffmpeg -y -i callee_video.webm -i caller.wav -filter_complex
'[0:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=0.5[a1];
[1:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=0.5[a2];
[a1][a2]amerge,pan=stereo|c0



File Size of tempfile : 87MB



==>Then, I am encoding the temp file via below command:



time ffmpeg -y -i temp_file.mkv -pixel_format yuv444p -preset default -vf
drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:x=8:y=8:fontsize=16:fontcolor=yellow at 1:expansion=strftime:basetime=1518172680000000:text='%Y-%m-%d
%H-%M-%S' -acodec libvorbis -c:v h264_nvenc final_video.mkv



Final_video Size: 270 MB



==>The thing I am trying to understand is that when I encode the orig webm
file which is 80MB,the encoded output mkv file size ~20MB .



==>Yet, when I performed the same operation on muxed temp media
file(callee_video.webm + caller.wav) that the size is 87MB before encoding,
becomes 270MB .



Would you please share your comments what I am missing or doing wrong.



Thank you


More information about the ffmpeg-user mailing list