I never used the video mode on my K-x very much, but now I wanted to make some quick YT vids and figured 720p @ 24 fps and 32 kHz mono audio from the built-in omni mic would be just fine for that. Turns out one of them had a nasty crackle about once a second in the audio after transcoding via FFmpeg, even though VLC played it fine (MPC-HC shows the same crackle though). That's really unacceptable. To make a long story short, there seems to be something iffy about the files generated by the K-x, possibly the number of audio samples does not match the video frames or the playtime is saved wrong (always seems to be in whole seconds).
Salvaging the files turns out to be quite easy:
You can use VLC's converter function for this. (JFTR, version 2.2.4 here.) So open that and drag the file(s) there, right-click, Save.
I'd recommend creating a new converter preset. Encapsulation: AVI, enable audio, copy original audio stream, enable video, copy original video stream. Call it "Video - AVI, copy streams" or somesuch.
Give the output a fancy name.
Since there is nothing computing-intensive involved, this is super-fast, mostly limited by I/O.
The result may be cut about a second short at the end, but that's easily taken into account beforehand. (Trying to do a direct transcode in VLC resulted in the first second getting cut off, which is a lot more annoying.)
That's it! You should now have AVIs that are behaving themselves and transcode fine. This stupid problem cost me more than 2 hours to figure out.
That's what my transcoding batch file looks right now - I guess I should use the AAC LC encoder for audio once I figure out how to do that:
Code:
<path to FFmpeg goes here>\bin\ffmpeg -i %1 -af aresample=resampler=soxr -ar 44100 -acodec libvorbis -q:a 7 -c:v libx264 -preset fast -profile:v high -movflags faststart %1.mp4