I recently shot some video with my new Panasonic HX-DC01 video camera which was a leaving gift from the last company I worked for after 6.5years of loyal service. I was really impressed by the quality of the video, and shot a 15min test clip in 1080p hi definition with all the settings turned up to maximum. Unfortunately when it came time to playback the video on my ancient laptop, my machine was unable to do so smoothly without jumping and skipping in 2 second intervals, the video playback was more like a slide slow.

I decided to play around with some codecs to see if I could get the video to playback smoothly on my aging machine and by encoding the video into divx format. The result was that I was able to get my video to playback flawlessly whilst maintaining the 1080p hi definition and at the same time also reducing my filesize from 1.7GB for a 15min clip down to 432MB, a ~75% file size reduction!

Below is the command I used to do the encoding and also a for loop command in case you’d like to bulk encode an entire directory in one go.

ffmpeg -i /home/user/filename.MP4 -s hd1080 -b 4000k -ab 160k -vtag DIVX /home/user/output_in_divx_format.avi"

for i in *.MP4; do ffmpeg -i "$i" -s 640x360 -b 4000k -ab 160k -vtag DIVX "/home/user/Videos/${i%.MP4}.avi"; done


No Comment.

Add Your Comment