Ticket #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
Change History
Changed 11 months ago by gordon
-
attachment
0001-support-a-keyframe-white-list-in-the-segment-format..patch
added
patch
comment:3 Changed 11 months ago by cehoyos
Please consider sending patches to ffmpeg-devel, they usually receive more attention there.
comment:4 follow-up: ↓ 5 Changed 5 months ago by 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.
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 5 months ago by 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!
comment:6 in reply to: ↑ 5 Changed 5 months ago by saste
- Analyzed by developer set
- Status changed from new to closed
- Resolution set to fixed
- Reproduced by developer set
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