ffmpeg - convert flv to mp4 without losing quality

June 15, 2017 - Reading time: ~1 minute
ffmpeg -i filename.flv -c:v libx264 -crf 19 -strict experimental filename.mp4

This command only changes container without reencoding:

ffmpeg -i input.flv -codec copy output.mp4

According to this guide, the proper command to convert FLV to MP4 without any AV recoding is this:
ffmpeg -i input.flv -c copy -copyts output.mp4

It worked perfectly for me in all cases with AVC video and AAC or MP3 audio.