Opened 3 weeks ago

Last modified 2 weeks ago

#7644 new enhancement

print warning for "-c:v copy" + "-ss non-key-frame"

Reported by: hanshenrik Owned by:
Priority: wish Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

as explained in comment 1 of https://trac.ffmpeg.org/ticket/7640#comment:1 , if you cut a video using -c:v copy + -ss and the frame at -ss is not a keyframe, then everything until the first keyframe is usually rendered black / random colors. it would be nice if ffmpeg printed a stderr warning in this scenario, warning that the black/random-color frames are expected behavior and not a bug in ffmpeg.

Change History (4)

comment:1 Changed 3 weeks ago by hanshenrik

(such a warning could also save people debugging time by making the problem obvious, and help prevent tickets like #7640 from being created)

comment:2 Changed 3 weeks ago by cehoyos

Please explain how you get “random colours”.

comment:3 Changed 3 weeks ago by hanshenrik

@cehoyos i got from reading comment 1 of ticket #7640 , hopefully @erikbs can explain it.

(i don't know, but my best guess is that the color is player-implementation-defined and some video players decided to add a random color instead of black. - but that is just a guess, i don't know. - or maybe some video players render pre-key-frame from uninitialized memory, and random colors come from whatever garbage was in that uninitialized memory? malloc instead of calloc or a re-purposed block of memory?)

Last edited 3 weeks ago by hanshenrik (previous) (diff)

comment:4 Changed 2 weeks ago by v0lt

I have a similar bug #7651.

Last edited 2 weeks ago by v0lt (previous) (diff)
Note: See TracTickets for help on using tickets.