[FFmpeg-user] Different conversion results on similar conversion runs.

Anatol anatol2002 at gmail.com
Sun Oct 13 13:50:54 CEST 2013


First the command line u asked for:
ffmpeg -i input.mp4 -c:v h264  -subq 5 -qcomp 0.6 -qmin 10 -qmax 50 -qdiff
4 -coder 1 -refs 2 -vprofile main -force_key_frames
 0,2.002,4.004,6.006,8.008,10.01,12.012,14.014,16.016,18.018,20.02,22.022,24.024,26.026,28.028,30.03,32.032,34.034,36.036,38.038,40.04,42.042,44.044,46.046,48.048,50.0501,52.0521,54.0541,56.0561,58.0581,60.0601,62.0621,64.0641,66.0661,68.0681
-pix_fmt yuv420p -b:v 1200k -s 848x480 -r 29.97 -g 60 -c:a libfaac -b:a 64k
-ar 44100 -ac 2 -map_chapters -1 -map_metadata -1  -f mp4 -flags +loop+mv4
-cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -trellis 1 -refs 1
-me_range 16 -keyint_min 20 -sc_threshold 40 -i_qfactor 0.71 -bt 400k
-maxrate 1200k -bufsize 1200k -rc_eq 'blurCplx^(1-qComp)' -level 30 -async
2  -vsync 1 -y output.mp4

I got a hint from the FFmpeg Support Forum.
It is about setting encoding side 'threads' value (rather than decoding
side in my original post).
When the ENCODING threads are constrained to 1 - the results are the
consistent.
When they are no encoding 'threads' setting (or it is set 0), ffmpeg
allocates uses all machine cores. In my case - 48.
When I set the threads to 4 - the result is still consistent,
For 10 it became inconsistent again.

I understand why there are differences when the command line is executed
with different threads settings.
I don't understand why execution of exactly the same command line generates
different files on consecutive runs.

Anatol


More information about the ffmpeg-user mailing list