Opened 13 years ago
Closed 12 years ago
#1483 closed enhancement (fixed)
Allow a list of keyframe numbers that are valid for starting a new segment
Reported by: | gordon | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | unspecified | Keywords: | segment |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
It would be beneficial to have an option with the segmenter to white list keyframes that can be used to start new segments. The duration of the segment would not cause a new segment to be created until a keyframe in the white list is reached.
This will allow videos that have a subset of common keyframes to be segmented and maintain common starting points. Otherwise, a constant gop is required which is not optimal.
My feature request will allow the encoder to optimize keyframe placement for different quality levels of the encode in variant streams without risking playback getting out of sync between the variant streams which makes swapping between streams impossible.
Adding a command line option to input a comma separated list of frame numbers would be an easy way to implement this. Then the list can be checked against the current frame number when outputting packets into segments.
Attachments (2)
Change History (8)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
by , 13 years ago
Attachment: | 0001-support-a-keyframe-white-list-in-the-segment-format..patch added |
---|
patch
comment:3 by , 13 years ago
Please consider sending patches to ffmpeg-devel, they usually receive more attention there.
by , 12 years ago
Attachment: | 0001-lavf-segment-add-segment_frames-option.patch added |
---|
follow-up: 5 comment:4 by , 12 years ago
See patch in attachment. Test and comments are welcome.
Also I'm not sure the patch is still useful, considering that there is already the segment_times option.
follow-up: 6 comment:5 by , 12 years ago
Replying to saste:
See patch in attachment. Test and comments are welcome.
Also I'm not sure the patch is still useful, considering that there is already the segment_times option.
I think that are cases where it is still useful. I will use it. Thanks!
comment:6 by , 12 years ago
Analyzed by developer: | set |
---|---|
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | new → closed |
Replying to gordon:
Replying to saste:
See patch in attachment. Test and comments are welcome.
Also I'm not sure the patch is still useful, considering that there is already the segment_times option.
I think there are cases where it is still useful. I will use it. Thanks!
Should be fixed in:
commit 0156dd6530b998923405e0b21f31bc1fbe68e009 Author: Stefano Sabatini <stefasab@gmail.com> Date: Sun Dec 9 20:26:30 2012 +0100 lavf/segment: add segment_frames option This is meant to address trac ticket #1483.
Patch on github: https://github.com/thenewguy/FFmpeg/commit/89e145636a5812c93ba9dbf419e1b4771faadbde