Opened 4 hours ago
#11451 new defect
Duplicate frames dropped when copying Theora streams
Reported by: | Bernat | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Bernat | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hi. I'm working on Theora decoding support for Godot. Almost everything is working fine except for some kind of video streams.
Theora encodes duplicate frames (frames identical to the previous one) as empty packets. Those empty packets seem to be discarded by FFmpeg when doing an operation that involves copying a Theora stream.
Example: ffmpeg -i input.ogv -c:v copy -a:n copy output.ogv
I've tried to find the issue in the source code, and although I'm not familiar with FFmpeg, I think the issue is here: https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavformat/oggenc.c#l693
I've read on some commit that empty packets are dropped to fix some issue with FLAC streams but they shouldn't be discarded for Theora streams as they encode duplicate frames.
I hope this can be easily fixed. Thanks in advance. Cheers.