Hi! I am trying to compare output of two programs,
one is ffmpeg.exe and another is my test program based on same version of ffmpeg lib.
Doing simple encode and trying to set same options with ffmpeg lib (preset medium, crf 23).
However the resulting file from ffmpeg.exe is roughly 2x smaller and worse quality.Code:ffmpeg.exe -i "input.avi" -c:v libx264 -preset medium -crf 23 -keyint_min 1 test.avi
Tried to compare mediainfo reports of both files: all relevant parameters are identical (lib version, x264 options, profile, level etc.) Only bitrate values are different.
Tried to compare ffprobe outputs - no clue.
So if they both are encoded with crf 23 how is it possible to get different quality/bitrate?
Any ideas.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 16 of 16
Thread
-
-
also post the log output of the encodes - it will give the frametypes , avg frame quantizers
-
range and matrix are set in my code, should have no effect?
ok I can remove it and extract log output. -
range and matrix should have no effect if input format and output format are the same ; if --input-range and --range differ, there is a change made by x264 . So is your code doing "something else" to the input before libx264 ?
-
test1.log is complete from this cmd
ffmpeg.exe -i "input.avi" -c:v libx264 -preset medium -crf 23 -keyint_min 1 -loglevel verbose test1.avi 2>test1.log -
-
One thing I can think of that could cause this is the frame rate. If x264 thinks the frame rates are different it will allocate different numbers of bits per frame. For example, I just CRF encoded a 12 fps animated video and got a 17 MB file. After adding AssumeFPS(60) to the script and encoding with the exact same settings I got an 8 MB file. The encoding log shows a difference (much high average quantizers at 60 fps, and other small differences) but the MediaInfo report of the x264 options is identical. Remuxing the 60 fps stream and flagging it as 12 fps makes it play at 12 fps and the MediaInfo report looks the same except fot the bitrate related fields -- and one additional field "original frame rate: 60". But I suspect one might be able to remux in a way that doesn't show that.
After posting I noticed some discussion of frame rate has started. From you logs I suspect this is what's going on.Last edited by jagabo; 21st Apr 2017 at 10:54.
-
test2.log is messed up
Don't edit it. Post the full logs . You're missing some of the important parts
again, add
Code:-report -loglevel verbose
Last edited by poisondeathray; 21st Apr 2017 at 10:51.
Similar Threads
-
x264 preset 'slow', but MediaInfo shows the result differently...
By Lathe in forum Authoring (Blu-ray)Replies: 5Last Post: 10th Dec 2016, 19:56 -
x264 Mediainfo to MeGUI x264 Settings
By Arugen in forum Video ConversionReplies: 2Last Post: 13th Aug 2015, 01:14 -
Please confirm my understanding of x264 encoding settings
By gilgamesh-au in forum Newbie / General discussionsReplies: 32Last Post: 21st Jul 2015, 14:32 -
show x264 command line output when using megui as x264 gui
By codemaster in forum Video ConversionReplies: 4Last Post: 12th Mar 2013, 10:35 -
Xvid vs x264 -- Bit Rate: 1900 kbps -- Same quality but smaller x264 file?
By kingaddi in forum DVD RippingReplies: 17Last Post: 2nd Sep 2012, 11:45