Incorrect Framerate for videos imported from OBS (2.79+) #53857
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
10 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#53857
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 7, 8GB RAM, GeForce 1060 with 6GB VRAM
Blender Version
Broken: All versions above 2.79, including 2.79 and 2.8 test builds
Worked: 2.78 and any previous version I've used for video editing, as far back as 2.5.
Short description of error
Videos which are correctly interpreted as being 30fps in 2.78 are being loaded in as 1000fps in 2.79. Somehow, the video playback is still fine, but the number of frames is incorrect and zoom in the vse panel is limited. A 2 minute video has over 120,000 frames. Altering the framerate in the rendering panel only alters the duration of the audio. mp4 files files produced by ffmpeg/blender seem to be fine, but mp4/mkv containers produced by OBS induce the issue.
Exact steps for others to reproduce the error
Launch blender or reload startup file. Open VSE. Add attached video file to VSE by any method. Check the render properties panel. Blender has set framerate to "Custom (1000.0)" with some other unfamiliar variables defined below. Repeat process in 2.78 and notice that the correct framerate (30) is automatically detected, meaning this is a recent change in how blender handles frame rate detection.
Attached is a video that demonstrates the issue for testing purposes.
2018-01-22 15-30-49.mkv
Added subscriber: @r_widget
#54148 was marked as duplicate of this issue
Added subscriber: @LazyDodo
i'm pretty sure this one is already fixed, please try a build from http://builder.blender.org to validate the issue indeed is already solved.
I just downloaded blender-2.79-42a5624-win64 and blender-2.80-4d3d002-win64 a few hours ago, and the bug occurs in both, so I would say it is not fixed.
The issue existed on the export side, not the import side, the mkv attached is actually set to 1000 fps
But the same file loads fine in 2.78 and all previous versions of blender, and although it's odd to see that OBS is exporting a video with 1k fps, tbr defines the frame rate that the demuxer should use.
Added subscriber: @ChristopherAnderssarian
This comment was removed by @ChristopherAnderssarian
Added subscriber: @lichtwerk
where is this information from?
Added subscribers: @Sergey, @troy_s
maybe @troy_s or @Sergey know better [about the fps vs. tbr]?
Shows reported results in blender-2.79-66521b3
Added subscriber: @cyaoeu
The video playback is only fine because by default Blender sets the scene fps to the video fps. If you disable use video fps when adding the file (down left) you get an extremely slow video.
There is indeed something wrong with Blender's autodetection of fps. Using tbr instead of fps could be useful if the fps value is wrong (like the "1000 fps" OBS videos which play normally in any video player).
Also from what I could see the code uses r_frame_rate for detecting the fps, but the video I loaded in Blender showed 1000 fps even though ffprobe showed 60/1 fps for the video which made me even more confused. The avg_frame_rate did show 1000/1 though.
Maybe some matroska (.mkv) weirdness? https://matroska.org/technical/specs/notes.html
Added subscribers: @Mapper720-4, @mont29
This looks more like an FFMPEG issue tbh…
tbr
is indeed what one is supposed to be using here, at least as per FFmpeg documentation. The issue is:libav
removed it (probably, because it was "guessed" value).tbn
is what exists in both libav and FFmpeg, but seems it is not trustful value. Since FFmpeg is what all distors are coming back to, and what is was supposed to be used will try to get code back to usetbr
when using FFmpeg.This issue was referenced by
370a2d6917
Changed status from 'Open' to: 'Resolved'
Added subscriber: @Twitching_astronaut
having this issue still in 2.83.9
Blender appears to trim the last 2 seconds of MKV clips exported from OBS
Added subscriber: @iss
@Twitching_astronaut This should be fixed in 2.83.9. Please create new report with all required info and example files to reproduce.