Adding a corrupt video crashes/confuses Blender #68091
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#68091
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
Operating system: Windows 7
GPU: Radeon Vega 64, Divider version: 19.4.1
CPU: Intel Core i7-5960X
Blender Version
Broken:
blender-2.81.0-git.d8fb63661b32-windows64
Broken: 2.80
Worked: 2.79b
Short description of error
Loading a corrupted video in 2.80 will crash Blender, in 2.79b the video simply won't load.
This can happen in two ways:
When first opening the VSE, having the frame rate try to match the first video that's imported.
If the frame rate is already set, once the playhead reaches the corrupt part of the video.
Exact file for others to reproduce the error from scratch
I can't find a corrupt video other than this one (and I didn't have the heart to upload 4 gigs to phab)
The video stream in intact upto about 2:20. Download Here
See description for reproduction steps.
Added subscriber: @ChristopherAnderssarian
Added subscriber: @dfelinto
Can't you reproduce this messing with a smaller file in a text editor?
Thing is: other corrupt videos give errors like in 2.7X, but I'll give it a go...
Added subscriber: @Sergey
I will have to ask @Sergey if he will be able to look into this.
Unfortunately I don't have enouh RAM(4gig) to debug this.
I will hopefully have new workstation, but that would be near 2.82 cycle
Added subscriber: @dr.sybren
I don't think you need a huge amount of ram to debug this, just set a breakpoint in
startffmpeg
and step through untilanim->duration
is assigned.The video file is claiming to have
5,175,604,057,416
frames, which is obviously wrong.The average framerate is set to weird value of
2603 / 902820173
.The deprecated framerate field is set to
30 / 1
.Blender's logic is so that:
avg_frame_rate
unless either of those are true:avg_frame_rate
is set to 0.In other cases
r_frame_rate
is used.In order to solve the issue we need to make it so duration in frames is deducted to some sane value in
startffmpeg
.If we somehow use
r_frame_rate
in this case then the duration will be calculated to 0, making Blender to show corrupted/unsupported warning (which is kind of expected).But it is unclear to me what should the policy be between using
nb_frames
,r_frame_rate
andavg_frame_rate
. Someone need to dig into the history and see why those were added and possibly tweak code around.P.S. There is no-so-much-comprehensive tests which one can run with
ctest -R ffmpeg
.P.P.S. CCing Sybren, he was solving some of the duration detection issues not so far in the past.
P.P.P.S. We should be able to cut the video after few kilobytes and add it to the regression suit once we're done with this if that's ok with @Christopher_Anderssarian.
ffprobe -v error -hide_banner -print_format json -show_streams -show_format
shows the following framerate/time related fields for the video stream in that file:So Blender "correctly" reads the fields from the video file at least. The question now is how to recognise that the data is useless, or to turn the at-the-moment-useless data into correct data.
ffplay thefile.mp4
does play back the file correctly, so there must be a way to handle this.Added subscriber: @iss
I can confirm problems with this video file, but I cannot confirm the crash of Blender. I have some ideas to handle the corruption, though.
Here is a smaller example file that's corrupted in a similar manner: the number of frames is way too high: F7758185. The patch in D5853 has a heuristic that corrects this error.
Adding a corrupt video crashes Blenderto Adding a corrupt video crashes/confuses BlenderThis issue was referenced by
71f2229b0d
Are you saying you can play the entire video?
For me playing the video in Blender and VLC work upto ~2:20 then both crash...
On my system both Blender and ffplay play the video until ~2:20 and then stop playback. Neither of them crash.
Changed status from 'Open' to: 'Resolved'