[FFmpeg-user] Predicting Transcoding Parameters

Francois Visagie francois.visagie at gmail.com
Sun Aug 21 11:47:29 EEST 2016

> -----Original Message-----
> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of
> s00b4u 4u
> Sent: 20 August 2016 06:08
> To: FFmpeg user questions
> Subject: [FFmpeg-user] Predicting Transcoding Parameters
> Hi,
> I want to understand if there is any way to predict the transcoding
> parameters values based on parameters of input and output file
> specifications?
> For example, my source file is MOV file. It's Video Bitrate is: 122113 KB/s and
> Audio Bitrate is: 1536 KB/s.
> I want to convert it into an MP4 file with Video Bitrate: 11 MB/s and Audio
> Bitrate: 256 KB/s.
> When I tried to do this transcoding, I used command:
> ffmpeg -i myfile.mov -vcodec libx264 -acodec copy myfile.mp4 The results
> were way off the mark.
> So, played around with values of crf and preset.
> ffmpeg -i myfile.mov -vcodec libx264 -acodec copy -preset slow -crf 18
> myfile.mp4
> The results were better but still not as per requirement.
> After multiple iterations (playing with different values of crf and preset), I
> was able to find the right parameters.
> My question: Is there a way to predict the transcoding parameters based on
> input and output parameters of the video file? This can save time as we don't
> have to do hit and trial.

There are many parameters and most are interdependent. To "predict" some you may need to specify many.

E.g. h264levl.bat at this link (https://www.dropbox.com/s/notf94wyt1r0rmk/H264_level_and_maxref.rar?dl=0):
"for given encoding parameters, calculate H.264 level, maxDPB and maximum x264 --ref".

It may be of use, if only to illustrate the difficulty of the problem ;-).

> Thanks.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org
> with subject "unsubscribe".

More information about the ffmpeg-user mailing list