Convertendo nel formato mp4 può verificarsi l’ errore “pts has no value error” ripetuto moltissime volte.
Spiegazione e correzione:
First, a background on why this error exists. AVI does not support variable frame rate video. So somewhere at the start of the file the frame rate is recorded. mp4 does support variable frame rate, so it is required that the duration of each frame is known. In ffmpeg the pts generation for fixed frame rate video is usually handled by the decoder. but by using -codec copy, you are bypassing the decoder.
The solution is specifying -fflags +genpts (must be before the input file is specified with -i).