I have been trying to scale and avi file, converting it to mp4 at the same time, but the output it horrible. I am using ffmpeg, and found several posts about this conversion without loosing quality. Yet my output gets worse as the video plays.
I have tried using these commands, some found right here on superuser:
ffmpeg -v verbose -i hd.avi -c:v libx264 -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 scaledoutput.mp4
ffmpeg -i hd.avi -strict -2 scaledoutput.mp4
ffmpeg -v verbose -re -i hd.avi -vf scale=640:480 scaledoutput.mp4
I think it would help if I could attache a sample video of input and output, but don't know how to do that, so a description will have to do. The output starts clear, but starts going downhills as the video plays. The colors are skewed and weird. Audio is clear, but the video is almost unrecognizable.
Any ideas?
ffmpeg -ss N -t 10 -i file -c copy -avoid_negative_ts make_zero file_sample
to extract a portion from both files. Keep sample extension same as source. N should be chosen so that the distortion is visible in the output. – Gyan Jul 20 '17 at 5:35