[FFmpeg-user] Poor quality output when converting avi to mp4
gyandoshi at gmail.com
Mon Jul 24 21:55:36 EEST 2017
On Mon, Jul 24, 2017 at 11:56 PM, Ute Willmore <uwillmore at remotegeo.com>
> Hi everyone,
> I am hoping someone on this list can help me with a problem I am having
> when converting a .avi video to .mp4 using FFmpeg. The output I get starts
> out looking good, but then degrades and by the time the 18 second video
> finishes it is hard to recognize what's on the screen. The colors are all
> off, some areas are just single color blobs where there used to be trees.
Running your conversion command on your source, I see
Input stream #0:0 (video): 856 packets read (18695093 bytes); 104 frames
Muxing to TS and playing that throws invalid NAL warnings.
So I ran
mp4box -aviraw video hd.avi
which produced hd_video.h264. This plays fine with ffplay.
ffmpeg -v verbose -i hd_video.h264 -i hd.avi -map 0 -map 1:a -vf
produces an undistorted output.
As best as I can tell, ffmpeg does have issues with parsing non-standard
H.264 bitstreams. It's certainly not as resilient as other decoders.
More information about the ffmpeg-user