Convert AVI to MP4 without losing the right picture, timing or sound
Convert an old AVI into a checked H.264/AAC MP4 copy. Inspect legacy codecs, interlacing, frame timing, pixel aspect and the right sound before delivery.

An old AVI that plays on one computer may fail in a browser, presentation or newer editor. To make a useful MP4 copy, identify what is inside the AVI, encode the picture and sound the destination accepts, and reopen the saved result. Changing the filename extension does not perform that conversion.
CutNow is an AI editor for existing footage: it helps find useful shots and passages and build a first cut. An archive of old demonstrations can become editing material once its files are readable in the receiving workflow. AVI conversion is the compatibility step before that selection, or the final handoff step for an already chosen recording. Keep the original alongside the copy. Use the HandBrake GUI route below for a qualifying ordinary viewing copy, or FFmpeg for the explicit stream and interlacing choices; neither route assumes a particular AVI can be uploaded to CutNow.
AVI names a container, not one video codec
AVI stores streams inside a RIFF-based file structure. Its video encoding, audio encoding and timing are separate properties. Microsoft's AVI file reference describes video/audio streams and video-only files. A decoder that understands one AVI's picture may not understand another AVI's codec.
For ordinary SDR playback, an MP4 containing H.264 video and AAC audio is a practical delivery choice. Ask the recipient about supported resolution, frame rate and audio too. An MP4 extension alone is not an assurance that their app accepts every codec inside it.
Stream copy changes the package without decoding and encoding the selected streams. It therefore cannot turn an unsupported legacy picture codec into H.264 or remove interlacing. It is an option only when both the MP4 muxer and the recipient accept those existing streams. This guide focuses on creating a new H.264/AAC copy when that compatibility change is needed, rather than treating every AVI as safe to remux. See FFmpeg's stream-copy explanation.
If the recipient actually requires an AVI, an MP4 is not the requested delivery. Confirm the accepted video and audio codecs, picture size and timing, and any indexing or file-size limits first. Do not rename the MP4 suffix to satisfy that request; this page covers AVI-to-MP4 conversion.
A GUI alternative for an ordinary AVI review copy
Prefer a graphical workflow? This HandBrake route creates a single MP4 viewing copy from a known progressive, opaque SDR AVI, no larger than 1080p and no faster than 30 fps, with the intended sound delivered in stereo. Confirm that scope from the source’s capture/export information and scanned properties. Unknown color or scanning information is not permission to guess. For confirmed interlacing, telecine, HDR/Log, alpha, higher frame rates or a required multichannel master, use a separately chosen workflow rather than applying this preset unchanged. The interlaced robotics example later in this guide does not belong in this GUI shortcut.
1. Open the actual source and check its range. In HandBrake, use Open Source, choose the AVI, and let it scan. Confirm the displayed filename and, if more than one is offered, the correct Title. Keep the complete title for a full recording: check the range’s start and end rather than leaving a previously shortened interval. Opening a source and range selection are documented separately. AVI appears in HandBrake’s supported source formats, but that is not a guarantee every legacy codec or damaged file will decode. If scanning fails, keep the source and inspect the error or Activity Log; changing the suffix does not resolve it.
2. Start with the bounded delivery preset. Under General, select Fast 1080p30. Its official preset contract is MP4, H.264 and AAC stereo. It is a starting viewing-copy choice, not lossless conversion or automatic best quality. Resolution and frame-rate limits can change a source above those limits, which is why this route qualifies the input first. Do not enable upscaling merely to turn a smaller recording into “1080p.” Check the Video frame-rate settings; keep an appropriate source-rate or peak-limited setting rather than forcing 25 fps to constant 30 just because the preset name ends in 30. HandBrake distinguishes source, constant and peak frame rates.
3. Review framing and the selected sound. Check the picture/dimensions settings and preview. Automatic cropping is an estimate: if an intended border, robot label or pointer is being removed, choose Custom cropping and correct the affected values; use zero crop when the entire source image is required. Preserve its displayed shape rather than stretching an anamorphic image into a wider rectangle. Leave “Allow upscaling” off for this ordinary copy. HandBrake’s picture settings documentation explains these controls. On the Audio tab, choose the intended source track and confirm AAC stereo for this delivery; a preset stores selection rules, not proof that the desired microphone was chosen. Audio/subtitle defaults explain that distinction. Keep required captions and additional tracks with the matching source version if this single-stereo copy does not carry them.
4. Encode a short preview before the full job. Select Preview, choose Position around a moving detail or spoken action and set Duration, then select Live Preview. Watch the encoded sample and listen to the intended voice. Repeat at another position if fine text, crop or synchronization needs checking. The official preview workflow tests only a portion: the preview’s duration is not the requested whole-file range, and it does not establish that the final recording has been checked.
5. Choose a new destination and encode. Set Save As to a new name such as avi-review-v01.mp4, use Browse for its destination folder, then select Start. Keep the original AVI and any previous accepted copy. HandBrake’s destination and encoding instructions show where the resulting file is written. Completion is a prompt to inspect it, not an acceptance result. Open that exact MP4 in the receiving player or editor and play it through. Compare the beginning, middle and ending with the source: intended words, action/sound sync, proportions, crop, moving edges and readable labels. Record which version was checked.
If you have several already reviewed sources, Add to Queue → Show Queue → Start Queue is an optional way to run separate jobs. Check each title, range, settings and unique destination first; the queue does not choose the right settings or validate every output for you.
Inspect the AVI and the available decoder
With FFmpeg and ffprobe available, open a terminal in the file's folder. Replace the quoted filename with your own. This reports properties without converting the video:
ffprobe -v error -show_streams -show_format -of json "robotics-demo-v03.avi"
Read codec_name for video and audio, width, height, sample_aspect_ratio, display_aspect_ratio, r_frame_rate, avg_frame_rate, field_order, durations and stream start times. Note color information, rotation if present, and which audio track holds the wanted microphone. The ffprobe documentation explains the stream/container reports. Missing tags do not establish progressive scanning or SDR color.
If the source codec is recognized but decoding fails, check this FFmpeg build before changing output settings:
ffmpeg -hide_banner -decoders
ffmpeg -hide_banner -encoders
ffmpeg -hide_banner -filters
Find a decoder for the source codec, libx264 and aac for the output, and yadif if the interlaced route below is needed. These are capability lists from the installed build, not proof the entire source decodes cleanly. A missing decoder requires a build supporting that codec or a new export from the original application. A damaged/truncated AVI calls for source recovery or another original, not a different extension. Keep the exact error message.
The following commands are for ordinary SDR, 8-bit delivery. HDR, Log, transparency or unusual scientific image formats need a separately agreed conversion. Requesting yuv420p is not HDR-to-SDR tone mapping.
Encode a progressive source as H.264 and AAC
Use this route when the source is progressive and its picture geometry is understood:
ffmpeg -n -i "robotics-demo-v03.avi" -map 0:V:0 -map "0:a:0?" -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -fps_mode passthrough -c:a aac -b:a 160k -movflags +faststart "robotics-demo-v03-progressive-h264.mp4"
0:V:0 chooses the first video excluding embedded cover pictures. "0:a:0?" chooses the first audio if present; a silent AVI stays silent. If the intended sound is the second audio track, use "0:a:1?". Audio-relative indices differ from global stream numbers. These stream selectors are deliberate: the command does not include every microphone, language or subtitle track.
The pad expression rounds dimensions up to even values for this 4:2:0 delivery. With square pixels it adds at most one black pixel on the right and bottom; even dimensions remain unchanged. It does not upscale detail or crop the picture. For non-square-pixel footage, check its display aspect ratio rather than forcing setsar=1, which can distort it. Pad options
CRF20 is a starting quality setting, not a lossless promise or target file size. The build must contain libx264. -n refuses an existing output filename; use a new name for each candidate. +faststart relocates MP4 playback metadata near the beginning, but does not repair codecs, corruption or sync. MP4 muxer documentation
Use a separate route for confirmed interlaced footage
A moving arm or camera pan can expose comb-like horizontal edges from interlaced fields. Read the source properties, its capture/export settings and the actual moving picture before selecting deinterlacing. Do not run the filter on every AVI just because it is old; a film transfer with repeated-field cadence needs its own analysis.
For a teaching example, imagine a 96-second robotics demonstration captured as 720 × 576, 25 frames per second, with a known 16:15 pixel aspect ratio and confirmed top-field-first interlacing. That is an illustrative source specification, not a tested recording. Its displayed picture is 4:3: 720 × 16/15 ÷ 576 = 4/3. The command keeps those even raster dimensions and the source pixel-aspect relationship while deinterlacing:
ffmpeg -n -i "robotics-demo-v03.avi" -map 0:V:0 -map "0:a:0?" -vf "yadif=mode=send_frame:parity=tff:deint=all,pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -fps_mode passthrough -c:a aac -b:a 160k -movflags +faststart "robotics-demo-v03-deinterlaced-h264.mp4"
This exact branch assumes all frames are interlaced and top field comes first. For confirmed bottom-field-first material, use parity=bff. Do not guess field order from the filename: wrong parity can make movement judder. Unknown parity is a reason to identify the capture format first; the filter's auto fallback can assume top field first when the decoder provides no information.
Here send_frame outputs one frame per input frame: the 25-frame-per-second example remains on that frame cadence rather than doubling to 50. It does not retain the full 50-fields-per-second motion sampling. If the delivery requires that temporal resolution, agree on a field-rate workflow rather than blindly adding -r 50. FFmpeg documents yadif modes, parity and interlaced-frame selection.
Protect timing, proportions and the intended sound
Neither command forces a new frame rate. -fps_mode passthrough passes frame timestamps through; it is not a repair for broken AVI timing, and the muxer may still adjust timestamps. If an old capture is 30000/1001 frames per second, do not relabel it as exactly 30 to make a dialog look tidy. A receiver needing constant frame rate needs a deliberate conversion and a new sync check. FFmpeg frame-rate modes
For the 96-second teaching case, mark a visible sound-producing action near 10, 48 and 90 seconds: a button press with a click or a speaker's mouth. These are review checkpoints, not automatically corrected sync points. A constant offset and a delay that grows toward the end are different symptoms. Compare the source at the same moments; don't use -shortest, change playback speed or replace timestamps simply to hide an unmatched duration. If the original is already out of sync, solve that explicitly before approving the delivery copy.
Watch for an ellipse becoming too wide or a machine part becoming too narrow. The teaching 720 × 576 / SAR 16:15 combination displays 4:3; it should not be stretched to 16:9 just because the destination has a widescreen player. Check rotation too. FFmpeg normally applies stored orientation during transcoding, so adding another turn without inspecting the result may rotate it twice.
AAC re-encodes the selected sound. It does not separate a noisy microphone from music already mixed into the same track. Neither command transfers external SRT files or all embedded subtitles. Keep separate captions with the matching version name; text burned into the picture is re-encoded as picture detail. If other audio or subtitle tracks are required, specify and verify a separate multitrack delivery rather than adding every stream indiscriminately.
Reopen the saved MP4 in the actual destination
After the chosen command completes without errors, inspect that exact output. For the interlaced example:
ffprobe -v error -show_streams -show_format -of json "robotics-demo-v03-deinterlaced-h264.mp4"
Confirm H.264 picture and the intended AAC audio when the source has sound; check dimensions, pixel/display aspect ratio, frame-rate information and duration against the source. Then open the MP4 outside the converter in the receiving app or player. Play the full file, including the last explanation. Check the start/middle/end action-and-sound pairs, fine labels on the robot, moving edges, framing and color. A completed terminal command or visible thumbnail is not that playback check.
If the MP4 contains sound but the app is silent, distinguish the selected track, player mute state and destination codec support before redoing everything. If encoding stops, preserve the source and error rather than passing on a partial file. Name the accepted copy clearly, for example robotics-demo-v03-delivery.mp4, and keep its original AVI and matching captions.
Conversion gives you a readable working copy; it does not decide which demonstration moment tells the story. Continue with CutNow's AI first-cut workflow when useful passages still need finding. Use timestamp trimming when you already know the interval, or extract the selected audio for a separate sound handoff. Explore CutNow for editing existing footage.