[FFmpeg-user] Transcoding from mp4 to avi is too slow

Ted Park kumowoon1025 at gmail.com
Tue Feb 12 20:43:13 EET 2019


> All is good but the duration of the output vidéo is two time
> long than the input video duration.
> For example, if I the duration of the input vidéo is 10s the
> duration of the output will be 20s (10sx2) and the output video
> is slow.

Is it possible you are setting the timebase to be twice what it should be

>            /* In this example, we transcode to same properties (picture
> size,
>             * sample rate etc.). These properties can be changed for output
>             * streams easily using filters */
>            if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO)
>            {

>                 enc_ctx->time_base=dec_ctx->time_base;

>                /* video time_base can be set to whatever is handy and
> supported by encoder */
>                enc_ctx->time_base = av_inv_q(dec_ctx->framerate);






More information about the ffmpeg-user mailing list