<p>Though not a free solution, I have had quite a bit of success upconverting to MP4 using AVS Video Converter; even when the data source was not in perfect shape or completely corrupted. My initial thought on this is that your headers may be corrupted.  I am not super-familiar with FFmpeg (save that it is included with the K-Lite Codec Pack!), but I would assume that there is a way to submit the repair sans headers.<br />
Hope this helps!</p>

CC BY-SA 4.0
2022-09-20T04:39:14.790Z
2022-09-20T18:13:49.417Z
2022-09-20T18:13:49.417Z
J. Breneman
<p>I have a 3.6gb mpeg2 video file the length should be about 25min but the file is corrupt after about 13 minutes and it stops there.</p>
<p>This is the result I got when I tried to correct it:</p>
<pre><code>Z:\Recovery\bin&gt;ffmpeg -i BrokenFile.mpg FixedFile.mpg
ffmpeg version 5.1.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
[mpeg @ 0000022832230440] stream 0 : no PTS found at end of file, duration not set
[mpeg @ 0000022832230440] stream 1 : no PTS found at end of file, duration not set
Input #0, mpeg, from 'BrokenFile.mpg':
  Duration: N/A, start: 0.685389, bitrate: N/A
  Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 15000 kb/s, 25 fps, 25 tbr, 90k tbn
BrokenFile.mpg: corrupt decoded frame in stream 0
frame=23478 fps=505 q=31.0 Lsize=  340586kB time=00:15:39.04 
bitrate=2971.2kbits/s dup=2 drop=0 speed=20.2x
video:294684kB audio:43989kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.564961%
</code></pre>
<p>Can anyone suggest me how to fix the problem?</p>

<ffmpeg>
Mpeg file not playing to the end - how to fix corruption
Paul
# Mpeg file not playing to the end - how to fix corruption

(Asked by: username_0 on 2022-09-19)

I have a 3.6gb mpeg2 video file the length should be about 25min but the file is corrupt after about 13 minutes and it stops there.
This is the result I got when I tried to correct it:
Z:\Recovery\bin>ffmpeg -i BrokenFile.mpg FixedFile.mpg
ffmpeg version 5.1.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
[mpeg @ 0000022832230440] stream 0 : no PTS found at end of file, duration not set
[mpeg @ 0000022832230440] stream 1 : no PTS found at end of file, duration not set
Input #0, mpeg, from 'BrokenFile.mpg':
  Duration: N/A, start: 0.685389, bitrate: N/A
  Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 15000 kb/s, 25 fps, 25 tbr, 90k tbn
BrokenFile.mpg: corrupt decoded frame in stream 0
frame=23478 fps=505 q=31.0 Lsize=  340586kB time=00:15:39.04 
bitrate=2971.2kbits/s dup=2 drop=0 speed=20.2x
video:294684kB audio:43989kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.564961%

Can anyone suggest me how to fix the problem?

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2022-09-20. Score: 0

Though not a free solution, I have had quite a bit of success upconverting to MP4 using AVS Video Converter; even when the data source was not in perfect shape or completely corrupted. My initial thought on this is that your headers may be corrupted. I am not super-familiar with FFmpeg (save that it is included with the K-Lite Codec Pack!), but I would assume that there is a way to submit the repair sans headers.  
Hope this helps!


---

