Splitting up AVI files and converting to mp4 for HTML5

So I had some problems splitting up an AVI movie into for segments, then converting it to mp4 so I could use it in HTML5. Here’s what worked for me:

  1. Split the file using avisplit. I could run it from the command line after installing transcode. The command should be something like avisplit -i moviein.avi -t 00:00:01-00:33:03. It will create a file with an appended number. Fix that file to give it an avi extension.
  2. I converted that file to mp4 in Winff using Very High Quality.

It worked. I tried many other ways, particularly using the command line with avconv, and I also tried Avidimux, but the sound was always out of sync or it would show as being corrupted in Firefox 28. This so far is the only thing that worked. The avisplit seems to be the deciding factor. I was using ffmpeg to split the file before converting, and it screwed up the sound.

If you’re working with an mp4 file that you simply want to split, you can use avconv in the command line:

avconv -ss 00:00:01 -i movie_in.mp4 -codec copy -t 00:34:15 movie_out1.mp4

 

Leave a Reply