When setting the output codec get the time_base (which indicates the
framerate) from the video stream, not from the input codec context, this
is the correct way to do it.
On some systems (Windows) the time_base from the input codec context is
set different from the one of the video stream, and timebase.num ends up
being 0 which results in the output codec initialization failing with
the message "framerate not set".