Tips for Encoding Video for Playback on Windows Media Player
It's often helpful to be able to play back video on Windows Media Player, as this won't require a Windows user to install any special software. This page contains tips for accomplishing this.
Check the Frame Rate
Consider a FLV file converted to MPEG using the following command:
ffmpeg -i foo.flv -codec:v mpeg4 -flags:v +qscale -global_quality:v 0 -codec:a libmp3lame foo.avi
This results in an AVI file that's not playable by all versions of Windows Media Player.
You can reveal the frame rate of the processed video by using this command:
ffprobe foo.avi -show_entries stream=time_base -select_streams v -of compact=nk=1:p=0
In the above case, the frame rate was reported as being 1/1000. By adding -r 30 to the above command one can force the frame rate to be 1/30. Doing so produces a video file that is playable by Windows Media Player.
The complete and working command:
ffmpeg -r 30 -i foo.flv -codec:v mpeg4 -flags:v +qscale -global_quality:v 0 -codec:a libmp3lame foo.avi