Page MenuHome

unwanted conversion to 600fps
Closed, ResolvedPublicBUG


Blender Version
Broken: 2.8
when rendering out videos in the video editor it outputs them as 600fps

if you upload a video into the video sequencer and set the framerate for 23.98 it outputs as 600fps. This can be seen by putting the rendered video back into the sequencer or checking the properties of the video itself.

Simplified file:

Event Timeline

Christopher_Anderssarian lowered the priority of this task from 90 to 30.Aug 7 2019, 10:20 AM

There was a similar fix a while ago.

What export setting are you using? Can you share a .blend?

I can share the .blend file along with the video I was trying to edit

Christopher_Anderssarian raised the priority of this task from 30 to 80.

Thanks, I'll check later today...

Christopher_Anderssarian lowered the priority of this task from 80 to 50.EditedAug 8 2019, 10:43 AM
Christopher_Anderssarian updated the task description. (Show Details)

This seems to be similar to T53687: VSE Detecting and setting incorrect frame rate (further reading here: T53857)
but (in this example) does happen with AVI and speed control. It works in 2.79b, but fails in 2.8...

@Richard Antalik (ISS) not sure if you want to dig in to this or not...

Additional information from another affected user:

File FormatFFmpeg Video
Encoding ContainerAVI
Video Codech.264

Is there a workaround for this, some different setting I can try?

Here's a fix using ffmpeg:

ffmpeg -i input_600fps.avi -codec copy -r 30 output_30fps.avi
Richard Antalik (ISS) changed the task status from Confirmed to Needs Information from User.Jan 21 2020, 3:20 PM

I can not remember If I was looking into this, but I can not reproduce this issue anymore.

Thing with AVI container and speed fx is strange. Sequencer should have absolutely no influence on output frame rate.

Can anybody involved still reproduce this?

Christopher_Anderssarian changed the task status from Needs Information from User to Needs Triage.Jan 22 2020, 5:38 PM

Can anybody involved still reproduce this?


re-tested with

Complete name                            : M:\Blender\BugFinds\T68343 unwanted conversion to 600fps\yes0001-0025.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 104 KiB
Duration                                 : 1 s 56 ms
Overall bit rate                         : 807 kb/s
Recorded date                            : 2020/01/22 16:31:05
Writing application                      : Lavf58.12.100

ID                                       : 0
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : 4 Ref Frames
Format settings, CABAC                   : No
Format settings, RefFrames               : 4 frames
Codec ID                                 : H264
Duration                                 : 1 s 2 ms
Bit rate                                 : 463 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 600.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.000
Stream size                              : 56.6 KiB (54%)
Writing library                          : x264 core 155
Encoding settings                        : cabac=0 / ref=2 / deblock=1:0:0 / analyse=0x3:0x100 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=0 / b_bias=0 / direct=1 / weightb=1 / open_gop=1 / weightp=2 / keyint=18 / keyint_min=10 / scenecut=0 / intra_refresh=0 / rc_lookahead=18 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.41 / aq=1:1.00

ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Codec ID                                 : 55
Codec ID/Hint                            : MP3
Duration                                 : 1 s 56 ms
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 22.5 KiB (22%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 23  ms (13.66 video frames)
Writing library                          : LAME3.100

tested with on blender-2.83-ddda1af97afc-windows64

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Jan 22 2020, 5:54 PM
Richard Antalik (ISS) changed the subtype of this task from "Report" to "Bug".

I'm not familiar with the source code of Blender and FFmpeg, but I have tried to find the bug and if I insert one line in writeffmpeg.c
it export fine with the right fps ... maybe it helps to solve the problem in the right way.
Because its a hack, I put as example 25fps in the source-file.

The base code is from Blender 2.91.0 Alpha
In the file writeffmpeg.c I have inserted the following at line 1090.

// if the fps (example 25fps) match the VSE scene file it works fine... else I got after some time coloured bad frames while playing
context->video_stream->time_base = (AVRational){ 1, 25 }; // TODO try to fix T68343

I have tested it in Sony Vegas Video, VirtualDub, MediaInfo (
Edit: I'm working with Windows 10

@Daniel (salvation) Thanks for help, I haven't looked at this problem so far so I don't know much more than you. But looking that you used AVRational type, now I suspect that this could be caused by overflow perhaps. Will have a look and see if I get anywhere.

@Richard Antalik (ISS) Or the value was never set before?
I set it directly after the memory request and it looks like the value never changed after that?... maybe the value was always 0 and therefore ffmpeg set it to a maximum of 600fps?

I have looked into this - bug happens, when fps time base in render settings is whole number.

else if ((float)((int)rd->frs_sec_base) == rd->frs_sec_base) {
  c->time_base.den = rd->frs_sec;
  c->time_base.num = (int)rd->frs_sec_base;

The code looks pretty much OK, but c->time_base.num was always 0. I have even tried to change offending line to c->time_base.num = (int)(rd->frs_sec_base + 0.5f); bu no luck.
I re-checked in debug build and this didn't happen, so it looks like that compiler optimized this line out or something like that.

I don't know X86 asm so I can't read this immediately, but here is dissassembly (note current instruction vs watch window):


Good - here I have only swapped lines around, but it would be probably weak fix:

fix is working.. that was a easy bugfix after 1 year :)
open source is cool