Video Duration Truncated / Incorrect Due to Frame Rate Metadata Mismatch (MPEG-PS to AVI Conversion)
Last updated: Oct 29, 2026
Problem
Video files recorded for a set duration (e.g., 5 minutes) display a shorter duration (e.g., 3:59 or ~4:00) in both Windows Media Player and EthoVision XT. EthoVision stops playback prematurely, cutting off the final portion of the recording.
Details
Root cause: MPEG-PS (.mpg) container files embed a nominal frame rate in their metadata. If the actual recorded frame rate differs slightly from this nominal value, the calculated duration is shorter than the real duration. Windows Media Player may show a short timestamp but continue playing past it; however, EthoVision strictly uses the metadata-derived duration and stops at that point, truncating real data. Affects any workflow where .mpg files are imported into EthoVision for analysis.
Solution
Re-mux the video from MPEG-PS (.mpg) to AVI format using ffmpeg. AVI calculates duration from actual frame timestamps rather than the nominal frame rate metadata, so the correct duration is preserved.
1. Download and install ffmpeg (https://ffmpeg.org) if not already installed.
2. Open a command prompt and run the following command (no re-encoding occurs — this is a fast container-only conversion):
ffmpeg -i "input.mpg" -c copy "output.avi"
3. Verify the output .avi file shows the correct duration in Windows Media Player.
4. Import the .avi file into EthoVision and confirm full-length playback.
5. Apply this conversion to all affected .mpg files before importing into EthoVision.
Note: The -c copy flag copies all streams without re-encoding, preserving video quality and processing quickly.