The video sequencer does not correctly decode an AVI file #101981

Closed
opened 2022-10-21 14:26:00 +02:00 by Alexey · 19 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 522.30

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-10-14 22:00, hash: bc06fcca47
Worked: (newest version of Blender that worked as expected)

Short description of error
Input File:
2022-10-21 15-07-36.avi
Output file:
0001-0110.mp4

Exact steps for others to reproduce the error
video_sec_buf.blend

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 522.30 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-10-14 22:00, hash: `bc06fcca47` Worked: (newest version of Blender that worked as expected) **Short description of error** Input File: [2022-10-21 15-07-36.avi](https://archive.blender.org/developer/F13738076/2022-10-21_15-07-36.avi) Output file: [0001-0110.mp4](https://archive.blender.org/developer/F13738101/0001-0110.mp4) **Exact steps for others to reproduce the error** [video_sec_buf.blend](https://archive.blender.org/developer/F13738104/video_sec_buf.blend)
Author

Added subscriber: @pseudoua

Added subscriber: @pseudoua
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Can you clarify what the issue with the output file is? Is it the quality, the speed or something else?

Can you clarify what the issue with the output file is? Is it the quality, the speed or something else?
Author

Input file - OBSStudio screen capture.
Output file (with preview) - how it is played and saved in Blender (part of the video is simply missing, the picture twitches).
In VLC, the original file opens fine.
And here is how it is clamped with the help of HandBrake...
2022-10-21 15-07-36.m4v
I noticed the problem a long time ago .. it interfered with cutting for instagram. Now I have drawn up a bunch of problems and decided to voice this one too.

Those. Because of such glitches, I had to use third-party editors. I want to be a patriot)

!!!

Perhaps the main nuance is that immediately upon opening it can be played correctly, but you just need to change something (cutting or shifting the beginning and end of playback) - jerks and skips start right in the player window!

Input file - OBSStudio screen capture. Output file (with preview) - how it is played and saved in Blender (part of the video is simply missing, the picture twitches). In VLC, the original file opens fine. And here is how it is clamped with the help of HandBrake... [2022-10-21 15-07-36.m4v](https://archive.blender.org/developer/F13757789/2022-10-21_15-07-36.m4v) I noticed the problem a long time ago .. it interfered with cutting for instagram. Now I have drawn up a bunch of problems and decided to voice this one too. Those. Because of such glitches, I had to use third-party editors. I want to be a patriot) !!! Perhaps the main nuance is that immediately upon opening it can be played correctly, but you just need to change something (cutting or shifting the beginning and end of playback) - jerks and skips start right in the player window!
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

I can confirm bad decoding of the attached file. I can see some errors from FFMPEG, but I am not sure what the issue is or what it really means.

[avi @ 0x1de8ccc0]   FRAME DONE: cur_pts=2, guessed_pts=2
[avi @ 0x1de8ccc0] SCAN: Frame belongs to an unexpected GOP!
[avi @ 0x1de8ccc0] DECODE UNHAPPY: PTS not matched!
[avi @ 0x1de8ccc0]   POSTPROC: AVFrame planes: 0x7fd65c01ac80 0x7fd65c100d00 0x7fd65c13a580 (nil)
[utvideo @ 0x1c1c98c0] frame information flags 100
[utvideo @ 0x1cbe99c0] frame information flags 100
[utvideo @ 0x1ca55240] frame information flags 100
[avi @ 0x1de8ccc0] METADATA FETCH
[NULL @ 0x1c48ba40] Opening '/home/omar/Desktop/BL_proxy/2022-10-21 15-07-36.avi/proxy_100.avi' for reading
[file @ 0x1c4dc400] Setting default whitelist 'file,crypto,data'
[avi @ 0x1de8ccc0] FETCH: seek_pos=0
[avi @ 0x1de8ccc0] FETCH: looking for PTS=0 (pts_timebase=0.0333333, frame_rate=30, start_pts=0)
[avi @ 0x1de8ccc0] NO INDEX final seek seek_pos = -3
[avi @ 0x1de8ccc0] Failed to find timestamp -3 in index 0 .. 110
[avi @ 0x1de8ccc0] Failed to find timestamp -3 in index 0 .. 110
[avi @ 0x1de8ccc0] FETCH: error while seeking to DTS = -3 (frameno = 0, PTS = 0): errcode = -1
[avi @ 0x1de8ccc0]   SCAN WHILE: PTS range 2 - 3 in search of 0
[avi @ 0x1de8ccc0]   DECODE VIDEO FRAME
[avi @ 0x1de8ccc0] READ: strID=0 dts=19 pts=19  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=20 pts=20  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=21 pts=21  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=22 pts=22  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=23 pts=23  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=24 pts=24  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=25 pts=25  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=26 pts=26  KEY
[utvideo @ 0x1de811c0] frame information flags 100
[utvideo @ 0x18cf39c0] frame information flags 100
[utvideo @ 0x1dfb8b80] frame information flags 100
[utvideo @ 0x1c8f5700] frame information flags 100
[utvideo @ 0x1bf11ec0] frame information flags 100
[utvideo @ 0x1c91a580] frame information flags 100
[utvideo @ 0x1de57d00] frame information flags 100
[utvideo @ 0x1dfaeac0] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=27 pts=27  KEY
[utvideo @ 0x1cbe1640] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=28 pts=28  KEY
[utvideo @ 0x1c4d9040] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=29 pts=29  KEY
[utvideo @ 0x1cbf8980] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=30 pts=30  KEY
[utvideo @ 0x1de5b340] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=31 pts=31  KEY
[utvideo @ 0x1c4ac100] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=32 pts=32  KEY
[avi @ 0x1de8ccc0] READ: strID=0 dts=33 pts=33  KEY
[utvideo @ 0x1c1c98c0] frame information flags 100
[avi @ 0x1de8ccc0] READ: strID=0 dts=34 pts=34  KEY
[utvideo @ 0x1cbe99c0] frame information flags 100
[utvideo @ 0x1ca55240] frame information flags 100
[avi @ 0x1de8ccc0]   FRAME DONE: cur_pts=19, guessed_pts=19
[avi @ 0x1de8ccc0] SCAN: Frame belongs to an unexpected GOP!
[avi @ 0x1de8ccc0] DECODE UNHAPPY: PTS not matched!
[avi @ 0x1de8ccc0]   POSTPROC: AVFrame planes: 0x7fd65c188640 0x7fd65c26e6c0 0x7fd65c2a7fc0 (nil)
I can confirm bad decoding of the attached file. I can see some errors from FFMPEG, but I am not sure what the issue is or what it really means. ```lines=20 [avi @ 0x1de8ccc0] FRAME DONE: cur_pts=2, guessed_pts=2 [avi @ 0x1de8ccc0] SCAN: Frame belongs to an unexpected GOP! [avi @ 0x1de8ccc0] DECODE UNHAPPY: PTS not matched! [avi @ 0x1de8ccc0] POSTPROC: AVFrame planes: 0x7fd65c01ac80 0x7fd65c100d00 0x7fd65c13a580 (nil) [utvideo @ 0x1c1c98c0] frame information flags 100 [utvideo @ 0x1cbe99c0] frame information flags 100 [utvideo @ 0x1ca55240] frame information flags 100 [avi @ 0x1de8ccc0] METADATA FETCH [NULL @ 0x1c48ba40] Opening '/home/omar/Desktop/BL_proxy/2022-10-21 15-07-36.avi/proxy_100.avi' for reading [file @ 0x1c4dc400] Setting default whitelist 'file,crypto,data' [avi @ 0x1de8ccc0] FETCH: seek_pos=0 [avi @ 0x1de8ccc0] FETCH: looking for PTS=0 (pts_timebase=0.0333333, frame_rate=30, start_pts=0) [avi @ 0x1de8ccc0] NO INDEX final seek seek_pos = -3 [avi @ 0x1de8ccc0] Failed to find timestamp -3 in index 0 .. 110 [avi @ 0x1de8ccc0] Failed to find timestamp -3 in index 0 .. 110 [avi @ 0x1de8ccc0] FETCH: error while seeking to DTS = -3 (frameno = 0, PTS = 0): errcode = -1 [avi @ 0x1de8ccc0] SCAN WHILE: PTS range 2 - 3 in search of 0 [avi @ 0x1de8ccc0] DECODE VIDEO FRAME [avi @ 0x1de8ccc0] READ: strID=0 dts=19 pts=19 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=20 pts=20 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=21 pts=21 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=22 pts=22 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=23 pts=23 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=24 pts=24 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=25 pts=25 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=26 pts=26 KEY [utvideo @ 0x1de811c0] frame information flags 100 [utvideo @ 0x18cf39c0] frame information flags 100 [utvideo @ 0x1dfb8b80] frame information flags 100 [utvideo @ 0x1c8f5700] frame information flags 100 [utvideo @ 0x1bf11ec0] frame information flags 100 [utvideo @ 0x1c91a580] frame information flags 100 [utvideo @ 0x1de57d00] frame information flags 100 [utvideo @ 0x1dfaeac0] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=27 pts=27 KEY [utvideo @ 0x1cbe1640] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=28 pts=28 KEY [utvideo @ 0x1c4d9040] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=29 pts=29 KEY [utvideo @ 0x1cbf8980] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=30 pts=30 KEY [utvideo @ 0x1de5b340] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=31 pts=31 KEY [utvideo @ 0x1c4ac100] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=32 pts=32 KEY [avi @ 0x1de8ccc0] READ: strID=0 dts=33 pts=33 KEY [utvideo @ 0x1c1c98c0] frame information flags 100 [avi @ 0x1de8ccc0] READ: strID=0 dts=34 pts=34 KEY [utvideo @ 0x1cbe99c0] frame information flags 100 [utvideo @ 0x1ca55240] frame information flags 100 [avi @ 0x1de8ccc0] FRAME DONE: cur_pts=19, guessed_pts=19 [avi @ 0x1de8ccc0] SCAN: Frame belongs to an unexpected GOP! [avi @ 0x1de8ccc0] DECODE UNHAPPY: PTS not matched! [avi @ 0x1de8ccc0] POSTPROC: AVFrame planes: 0x7fd65c188640 0x7fd65c26e6c0 0x7fd65c2a7fc0 (nil) ```
Omar Emara changed title from The video sequencer does not correctly play and save the output file to The video sequencer does not correctly decode an AVI file 2022-10-24 16:19:26 +02:00

Added subscriber: @iss

Added subscriber: @iss

I see that this report is filed with version older than bcc56253e2, but even more curious is, that I see proxy being used causing trouble. /home/omar/Desktop/BL_proxy/2022-10-21 15-07-36.avi/proxy_100.avi in log from @OmarSquircleArt.

@pseudoua please check if this happens when you disable proxies for strip. If you can run Blender from console with --debug-ffmpeg argument and upload log, that would be best.

I have checked seeking to each frame of original video and never got DECODE UNHAPPY message (meaning that requested frame was not found in stream). Will check proxies though.

I see that this report is filed with version older than bcc56253e26e, but even more curious is, that I see proxy being used causing trouble. `/home/omar/Desktop/BL_proxy/2022-10-21 15-07-36.avi/proxy_100.avi` in log from @OmarSquircleArt. @pseudoua please check if this happens when you disable proxies for strip. If you can run Blender from console with `--debug-ffmpeg` argument and upload log, that would be best. I have checked seeking to each frame of original video and never got `DECODE UNHAPPY` message (meaning that requested frame was not found in stream). Will check proxies though.

After further investigation, I was not able to reproduce issue when proxies are used, so i would appreciate steps to reproduce that issue.

But I have found issue that looks like provided video if proxies are built, but not used. This is because timecodes are used even if proxies are disabled, but generated timecode seems to be invalid in the first place. So I think it would be best to not use timecodes if "Proxy & Timecode" checkbox is not checked. Broken timecode I will have to investigate.

After further investigation, I was not able to reproduce issue when proxies are used, so i would appreciate steps to reproduce that issue. But I have found issue that looks like provided video if proxies are built, but not used. This is because timecodes are used even if proxies are disabled, but generated timecode seems to be invalid in the first place. So I think it would be best to not use timecodes if "Proxy & Timecode" checkbox is not checked. Broken timecode I will have to investigate.
Member

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'
Member

The errors I get in my log are reproducible just by opening the file and changing the source path of the video to the attached video.
The issue that the first frame persists seems to happen regardless if proxy is used or not.

The errors I get in my log are reproducible just by opening the file and changing the source path of the video to the attached video. The issue that the first frame persists seems to happen regardless if proxy is used or not.
Author

log_sec.txt
2022-10-24 19-36-35.m4v
Sorry the picture is cropped (OBS trubled)
But the essence is visible!

[log_sec.txt](https://archive.blender.org/developer/F13758583/log_sec.txt) [2022-10-24 19-36-35.m4v](https://archive.blender.org/developer/F13758580/2022-10-24_19-36-35.m4v) Sorry the picture is cropped (OBS trubled) But the essence is visible!
Author

This comment was removed by @pseudoua

*This comment was removed by @pseudoua*
Author
[2022-10-24 20-04-44.m4v](https://archive.blender.org/developer/F13758655/2022-10-24_20-04-44.m4v)

In #101981#1436739, @OmarEmaraDev wrote:
The errors I get in my log are reproducible just by opening the file and changing the source path of the video to the attached video.
The issue that the first frame persists seems to happen regardless if proxy is used or not.

Thanks, now I see error FETCH: error while seeking to DTS = -3 (frameno = 0, PTS = 0): errcode = -1, which could be introduced by bcc56253e2. That should be easy fix. Seems like same issue as actually reported.

For issue with timecodes I am not quite sure, 2.83 seems to work, but timecode usage may have been hardcoded back then. Technically timecodes should be EOL and removed soon if all goes as planned so not sure if I will be able to fix.

@pseudoua Thanks for logs and video. I wasn't able to follow the video (written steps are always preferred), but I was able to reproduce symptoms at least. Rest is clear from logs.

> In #101981#1436739, @OmarEmaraDev wrote: > The errors I get in my log are reproducible just by opening the file and changing the source path of the video to the attached video. > The issue that the first frame persists seems to happen regardless if proxy is used or not. Thanks, now I see error `FETCH: error while seeking to DTS = -3 (frameno = 0, PTS = 0): errcode = -1`, which could be introduced by bcc56253e26e. That should be easy fix. Seems like same issue as actually reported. For issue with timecodes I am not quite sure, 2.83 seems to work, but timecode usage may have been hardcoded back then. Technically timecodes should be EOL and removed soon if all goes as planned so not sure if I will be able to fix. @pseudoua Thanks for logs and video. I wasn't able to follow the video (written steps are always preferred), but I was able to reproduce symptoms at least. Rest is clear from logs.

This issue was referenced by 47868c8a4f

This issue was referenced by 47868c8a4ffea0a9a8fe58f5ae69915654db57d3

This issue was referenced by a67876103a

This issue was referenced by a67876103a6bb4554317f09ebd57c1997a45ed89

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Richard Antalik self-assigned this 2022-10-24 19:48:20 +02:00
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#101981
No description provided.