How to encode video by ffmpeg using DivX codec

Posted by

This is just a remark for me, because occassionally I need to convert mp4/x264 video using DivX codec, but due to random applicability I am not able to remember it. Why DivX? Video encoded by DivX is only one reliable option for me how to stream video from my NAS to TV without any interruption. I am using ffmpeg utility for video conversions, it is a reliable cross platform tool with lot of features and I am mostly happy with it.

So how to do it? Simple run something like  following command (the most important bolded):

ffmpeg -i input.mp4 -vtag DIVX -f avi -vcodec mpeg4 -s 640×360 -b:v 1145k -acodec mp3 -ab 128k -ac 2 -ar 44.1k output.avi

Brief explanation:

-vtag DIVX -> force video tag/fourcc to DivX

-f avi -> output in avi format

-vcodec mpeg4 -> DivX is mp4 compatible

-s 640×360 -> frame size

-b:v 1145k -> video bit rate

-acodec mp3 -> audio in mp3

-ab 128k -> audio bit rate

-ac 2 -> two audio channels

-ar 44.1k -> audio sampling frequency

Leave a Reply

Your email address will not be published. Required fields are marked *